Commit fe69107e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'riscv-for-linux-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - Disable CFI with Rust for any platform other than x86 and ARM64

 - Keep task mm_cpumasks up-to-date to avoid triggering M-mode firmware
   warnings if the kernel tries to send an IPI to an offline CPU

 - Improve kprobe address validation performance and avoid desyncs
   (following x86)

 - Avoid duplicate device probes by avoiding DT hardware probing when
   ACPI is enabled in early boot

 - Use the correct set of dependencies for
   CONFIG_ARCH_HAS_ELF_CORE_EFLAGS, avoiding an allnoconfig warning

 - Fix a few other minor issues

* tag 'riscv-for-linux-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: kprobes: convert one final __ASSEMBLY__ to __ASSEMBLER__
  riscv: Respect dependencies of ARCH_HAS_ELF_CORE_EFLAGS
  riscv: acpi: avoid errors caused by probing DT devices when ACPI is used
  riscv: kprobes: Fix probe address validation
  riscv: entry: fix typo in comment 'instruciton' -> 'instruction'
  RISC-V: clear hot-unplugged cores from all task mm_cpumasks to avoid rfence errors
  riscv: kgdb: Ensure that BUFMAX > NUMREGBYTES
  rust: cfi: only 64-bit arm and x86 support CFI_CLANG
parents 6f3b6e91 852947be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -965,6 +965,7 @@ config HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
	def_bool y
	depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS
	depends on RUSTC_VERSION >= 107900
	depends on ARM64 || X86_64
	# With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373
	depends on (RUSTC_LLVM_VERSION >= 190103 && RUSTC_VERSION >= 108200) || \
		(!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS)
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ config RISCV
	select ARCH_HAS_DEBUG_VIRTUAL if MMU
	select ARCH_HAS_DEBUG_VM_PGTABLE
	select ARCH_HAS_DEBUG_WX
	select ARCH_HAS_ELF_CORE_EFLAGS
	select ARCH_HAS_ELF_CORE_EFLAGS if BINFMT_ELF && ELF_CORE
	select ARCH_HAS_FAST_MULTIPLIER
	select ARCH_HAS_FORTIFY_SOURCE
	select ARCH_HAS_GCOV_PROFILE_ALL
+7 −2
Original line number Diff line number Diff line
@@ -3,14 +3,18 @@
#ifndef __ASM_KGDB_H_
#define __ASM_KGDB_H_

#include <linux/build_bug.h>

#ifdef __KERNEL__

#define GDB_SIZEOF_REG sizeof(unsigned long)

#define DBG_MAX_REG_NUM (36)
#define NUMREGBYTES ((DBG_MAX_REG_NUM) * GDB_SIZEOF_REG)
#define DBG_MAX_REG_NUM 36
#define NUMREGBYTES (DBG_MAX_REG_NUM * GDB_SIZEOF_REG)
#define CACHE_FLUSH_IS_SAFE     1
#define BUFMAX                  2048
static_assert(BUFMAX > NUMREGBYTES,
	      "As per KGDB documentation, BUFMAX must be larger than NUMREGBYTES");
#ifdef CONFIG_RISCV_ISA_C
#define BREAK_INSTR_SIZE	2
#else
@@ -97,6 +101,7 @@ extern unsigned long kgdb_compiled_break;
#define DBG_REG_STATUS_OFF 33
#define DBG_REG_BADADDR_OFF 34
#define DBG_REG_CAUSE_OFF 35
/* NOTE: increase DBG_MAX_REG_NUM if you add more values here. */

extern const char riscv_gdb_stub_feature[64];

+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)

	pr_notice("CPU%u: off\n", cpu);

	clear_tasks_mm_cpumask(cpu);
	/* Verify from the firmware if the cpu is really stopped*/
	if (cpu_ops->cpu_is_stopped)
		ret = cpu_ops->cpu_is_stopped(cpu);
+1 −1
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ SYM_DATA_START_LOCAL(excp_vect_table)
	RISCV_PTR do_trap_ecall_s
	RISCV_PTR do_trap_unknown
	RISCV_PTR do_trap_ecall_m
	/* instruciton page fault */
	/* instruction page fault */
	ALT_PAGE_FAULT(RISCV_PTR do_page_fault)
	RISCV_PTR do_page_fault   /* load page fault */
	RISCV_PTR do_trap_unknown
Loading