diff options
| author | Steven Rostedt <rostedt@goodmis.org> | 2026-09-02 09:55:01 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-09-02 11:08:21 -0400 |
| commit | 4617721c502b2ddaa4e324e86da4997edf738fa5 (patch) | |
| tree | 350aa83b47da0b574a814795392b20b0bed83cbc /arch/m68k/Kconfig | |
| download | linux-stable-4617721c502b2ddaa4e324e86da4997edf738fa5.tar.gz linux-stable-4617721c502b2ddaa4e324e86da4997edf738fa5.zip | |
ftrace: Synchronize the initialization of ftrace_opsgrafted
There's some internal state that ftrace_ops needs to have set, but since
it can be declared outside of the ftrace.c code, it calls
ftrace_ops_init() on the ops in every global function. The issue is that
if two tasks call it on the same ops at the same time it is possible to
have the initialization of one corrupt the initialization of the other
call.
Create a ops_mutex to use to synchronize every initialization of the
ftrace_ops. The mutex is taken within checking the ftrace_ops flag that
states it was initializied but the flag is checked again after the mutex
has been taken. Checking first outside the mutex allows it to shortcut
having to take the mutex. But then the check needs to be done again after
the mute is taken in case of races.
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260902095501.6b59af20@gandalf.local.home
Fixes: f04f24fb7e48d ("ftrace, kprobes: Fix a deadlock on ftrace_regex_lock")
Reported-by: sashiko-bot@kernel.org
Close: https://lore.kernel.org/all/20260829025528.49A831F000E9@smtp.kernel.org/
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/m68k/Kconfig')
| -rw-r--r-- | arch/m68k/Kconfig | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig new file mode 100644 index 000000000..11835eb59 --- /dev/null +++ b/arch/m68k/Kconfig @@ -0,0 +1,137 @@ +# SPDX-License-Identifier: GPL-2.0 +config M68K + bool + default y + select ARCH_32BIT_OFF_T + select ARCH_HAS_BINFMT_FLAT + select ARCH_HAS_CPU_CACHE_ALIASING + select ARCH_HAS_CPU_FINALIZE_INIT if MMU + select ARCH_HAS_CURRENT_STACK_POINTER + select ARCH_HAS_DMA_PREP_COHERENT if M68K_NONCOHERENT_DMA && !COLDFIRE + select ARCH_HAS_SYNC_DMA_FOR_DEVICE if M68K_NONCOHERENT_DMA + select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS + select ARCH_MIGHT_HAVE_PC_PARPORT if ISA + select ARCH_NO_PREEMPT if !COLDFIRE + select ARCH_USE_MEMTEST if MMU_MOTOROLA + select ARCH_WANT_IPC_PARSE_VERSION + select BINFMT_FLAT_ARGVP_ENVP_ON_STACK + select DMA_DIRECT_REMAP if M68K_NONCOHERENT_DMA && !COLDFIRE + select GENERIC_ATOMIC64 + select GENERIC_CPU_DEVICES + select GENERIC_IOMAP if HAS_IOPORT && MMU && !COLDFIRE + select GENERIC_IRQ_SHOW + select GENERIC_LIB_ASHLDI3 + select GENERIC_LIB_ASHRDI3 + select GENERIC_LIB_LSHRDI3 + select GENERIC_LIB_MULDI3 + select GENERIC_PCI_IOMAP if PCI + select HAS_IOPORT if PCI || ISA || ATARI_ROM_ISA + select HAVE_ARCH_LIBGCC_H + select HAVE_ARCH_SECCOMP + select HAVE_ARCH_SECCOMP_FILTER + select HAVE_ASM_MODVERSIONS + select HAVE_DEBUG_BUGVERBOSE + select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_HAS_NO_UNALIGNED + select HAVE_LD_DEAD_CODE_DATA_ELIMINATION + select HAVE_MOD_ARCH_SPECIFIC + select HAVE_UID16 + select MMU_GATHER_NO_RANGE if MMU + select MODULES_USE_ELF_REL + select MODULES_USE_ELF_RELA + select NO_DMA if !MMU && !COLDFIRE + select OLD_SIGACTION + select OLD_SIGSUSPEND3 + select UACCESS_MEMCPY if !MMU + select ZONE_DMA + +config CPU_BIG_ENDIAN + def_bool y + +config ARCH_HAS_ILOG2_U32 + bool + +config ARCH_HAS_ILOG2_U64 + bool + +config GENERIC_HWEIGHT + bool + default y + +config GENERIC_CALIBRATE_DELAY + bool + default y + +config GENERIC_CSUM + bool + +config TIME_LOW_RES + bool + default y + +config NO_IOPORT_MAP + def_bool y + +config HZ + int + default 1000 if CLEOPATRA + default 100 + +config PGTABLE_LEVELS + default 2 if SUN3 || COLDFIRE + default 3 + +config MMU + bool "MMU-based Paged Memory Management Support" + default y + help + Select if you want MMU-based virtualised addressing space + support by paged memory management. If unsure, say 'Y'. + +config MMU_MOTOROLA + def_bool MMU && M68KCLASSIC + select HAVE_PAGE_SIZE_4KB + +config MMU_COLDFIRE + def_bool MMU && COLDFIRE + select HAVE_PAGE_SIZE_8KB + +config MMU_SUN3 + def_bool MMU && SUN3 + select HAVE_PAGE_SIZE_8KB + +config ARCH_SUPPORTS_KEXEC + def_bool (M68KCLASSIC || SUN3) && MMU + +config BOOTINFO_PROC + bool "Export bootinfo in procfs" + depends on KEXEC && (M68KCLASSIC || SUN3) + help + Say Y to export the bootinfo used to boot the kernel in a + "bootinfo" file in procfs. This is useful with kexec. + +menu "Platform setup" + +source "arch/m68k/Kconfig.cpu" + +source "arch/m68k/Kconfig.machine" + +source "arch/m68k/Kconfig.bus" + +endmenu + +menu "Kernel Features" + +endmenu + +if !MMU +menu "Power management options" + +config PM + bool "Power Management support" + help + Support processor power management modes + +endmenu +endif + +source "arch/m68k/Kconfig.devices" |
