From pabeni at redhat.com Thu Dec 4 08:37:32 2025 From: pabeni at redhat.com (Paolo Abeni) Date: Thu, 4 Dec 2025 09:37:32 +0100 Subject: [ANN] poll on EoY break Message-ID: <3a2cf402-cba2-49d1-a87e-a4d3f35107d0@redhat.com> Hi all, Due to some unfortunate calendar, conference and personal schedule circumstances we (the netdev maintainers) are strongly considering an end-of-year break similar to 2024'one, but for a longer period: effectively re-opening net-next after Jan 2. Since this comes out-of-the blue and with a very strict timing, please express your opinion using the poll below: http://poll-maker.com/poll5664619x19774f43-166 The poll will be open for the next 24H. Thanks, Paolo From pabeni at redhat.com Fri Dec 5 10:55:46 2025 From: pabeni at redhat.com (Paolo Abeni) Date: Fri, 5 Dec 2025 11:55:46 +0100 Subject: [ANN] End of year break up to January 2 In-Reply-To: <3a2cf402-cba2-49d1-a87e-a4d3f35107d0@redhat.com> References: <3a2cf402-cba2-49d1-a87e-a4d3f35107d0@redhat.com> Message-ID: <15b104e5-7e8d-4a7c-a500-5632a4f3f9a8@redhat.com> Hi, The EOY break poll concluded with a substantial agreement WRT the break; the final figures are: Voters Percentage it's great 28 41% it's fine 23 33% I don't care 11 16% mildly inconvenient 5 7% unacceptable 2 3% Given the above, and that the capacity in this period will be severely negatively impacted - most of the maintainers will be traveling to LPC the next week(s) - net-next will stay closed for new features until January 2. Fixes (for both trees) and RFCs will be processed as usual. Thanks, Paolo From lirongqing at baidu.com Tue Dec 16 07:45:21 2025 From: lirongqing at baidu.com (lirongqing) Date: Tue, 16 Dec 2025 02:45:21 -0500 Subject: [PATCH] watchdog: softlockup: panic when lockup duration exceeds N thresholds Message-ID: <20251216074521.2796-1-lirongqing@baidu.com> From: Li RongQing The softlockup_panic sysctl is currently a binary option: panic immediately or never panic on soft lockups. Panicking on any soft lockup, regardless of duration, can be overly aggressive for brief stalls that may be caused by legitimate operations. Conversely, never panicking may allow severe system hangs to persist undetected. Extend softlockup_panic to accept an integer threshold, allowing the kernel to panic only when the normalized lockup duration exceeds N watchdog threshold periods. This provides finer-grained control to distinguish between transient delays and persistent system failures. The accepted values are: - 0: Don't panic (unchanged) - 1: Panic when duration >= 1 * threshold (20s default, original behavior) - N > 1: Panic when duration >= N * threshold (e.g., 2 = 40s, 3 = 60s.) The original behavior is preserved for values 0 and 1, maintaining full backward compatibility while allowing systems to tolerate brief lockups while still catching severe, persistent hangs. Signed-off-by: Li RongQing --- Documentation/admin-guide/kernel-parameters.txt | 10 +++++----- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 2 +- arch/openrisc/configs/or1klitex_defconfig | 2 +- arch/powerpc/configs/skiroot_defconfig | 2 +- drivers/gpu/drm/ci/arm.config | 2 +- drivers/gpu/drm/ci/arm64.config | 2 +- drivers/gpu/drm/ci/x86_64.config | 2 +- kernel/watchdog.c | 8 +++++--- lib/Kconfig.debug | 13 +++++++------ tools/testing/selftests/bpf/config | 2 +- tools/testing/selftests/wireguard/qemu/kernel.config | 2 +- 12 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a8d0afd..27c5f96 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6934,12 +6934,12 @@ Kernel parameters softlockup_panic= [KNL] Should the soft-lockup detector generate panics. - Format: 0 | 1 + Format: - A value of 1 instructs the soft-lockup detector - to panic the machine when a soft-lockup occurs. It is - also controlled by the kernel.softlockup_panic sysctl - and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the + A value of non-zero instructs the soft-lockup detector + to panic the machine when a soft-lockup duration exceeds + N thresholds. It is also controlled by the kernel.softlockup_panic + sysctl and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the respective build-time switch to that functionality. softlockup_all_cpu_backtrace= diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 2e6ea13..ec558e5 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -306,7 +306,7 @@ CONFIG_SCHED_STACK_END_CHECK=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=-1 CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 CONFIG_WQ_WATCHDOG=y # CONFIG_SCHED_DEBUG is not set diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig index 07d422f..fb272e3 100644 --- a/arch/arm/configs/pxa3xx_defconfig +++ b/arch/arm/configs/pxa3xx_defconfig @@ -100,7 +100,7 @@ CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_SHIRQ=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 # CONFIG_SCHED_DEBUG is not set CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_SPINLOCK_SLEEP=y diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig index fb1eb9a..984b0e3 100644 --- a/arch/openrisc/configs/or1klitex_defconfig +++ b/arch/openrisc/configs/or1klitex_defconfig @@ -52,5 +52,5 @@ CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" CONFIG_PRINTK_TIME=y CONFIG_PANIC_ON_OOPS=y CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BUG_ON_DATA_CORRUPTION=y diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 2b71a6d..a4114fc 100644 --- a/arch/powerpc/configs/skiroot_defconfig +++ b/arch/powerpc/configs/skiroot_defconfig @@ -289,7 +289,7 @@ CONFIG_SCHED_STACK_END_CHECK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_PANIC_ON_OOPS=y CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y CONFIG_WQ_WATCHDOG=y diff --git a/drivers/gpu/drm/ci/arm.config b/drivers/gpu/drm/ci/arm.config index 411e814..d7c5167 100644 --- a/drivers/gpu/drm/ci/arm.config +++ b/drivers/gpu/drm/ci/arm.config @@ -52,7 +52,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=n -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 CONFIG_FW_LOADER_COMPRESS=y diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config index fddfbd4..ea0e307 100644 --- a/drivers/gpu/drm/ci/arm64.config +++ b/drivers/gpu/drm/ci/arm64.config @@ -161,7 +161,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_DETECT_HUNG_TASK=y diff --git a/drivers/gpu/drm/ci/x86_64.config b/drivers/gpu/drm/ci/x86_64.config index 8eaba388..7ac98a7 100644 --- a/drivers/gpu/drm/ci/x86_64.config +++ b/drivers/gpu/drm/ci/x86_64.config @@ -47,7 +47,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_DETECT_HUNG_TASK=y diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 0685e3a..a5fa116 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -363,7 +363,7 @@ static struct cpumask watchdog_allowed_mask __read_mostly; /* Global variables, exported for sysctl */ unsigned int __read_mostly softlockup_panic = - IS_ENABLED(CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC); + CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC; static bool softlockup_initialized __read_mostly; static u64 __read_mostly sample_period; @@ -879,7 +879,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT); - if (softlockup_panic) + duration = duration / get_softlockup_thresh(); + + if (softlockup_panic && duration >= softlockup_panic) panic("softlockup: hung tasks"); } @@ -1228,7 +1230,7 @@ static const struct ctl_table watchdog_sysctls[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, - .extra2 = SYSCTL_ONE, + .extra2 = SYSCTL_INT_MAX, }, { .procname = "softlockup_sys_info", diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ba36939..17a7a77 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1110,13 +1110,14 @@ config SOFTLOCKUP_DETECTOR_INTR_STORM the CPU stats and the interrupt counts during the "soft lockups". config BOOTPARAM_SOFTLOCKUP_PANIC - bool "Panic (Reboot) On Soft Lockups" + int "Panic (Reboot) On Soft Lockups" depends on SOFTLOCKUP_DETECTOR + default 0 help - Say Y here to enable the kernel to panic on "soft lockups", - which are bugs that cause the kernel to loop in kernel - mode for more than 20 seconds (configurable using the watchdog_thresh - sysctl), without giving other tasks a chance to run. + Set to a non-zero value N to enable the kernel to panic on "soft + lockups", which are bugs that cause the kernel to loop in kernel + mode for more than (N * 20 seconds) (configurable using the + watchdog_thresh sysctl), without giving other tasks a chance to run. The panic can be used in combination with panic_timeout, to cause the system to reboot automatically after a @@ -1124,7 +1125,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC high-availability systems that have uptime guarantees and where a lockup must be resolved ASAP. - Say N if unsure. + Say 0 if unsure. config HAVE_HARDLOCKUP_DETECTOR_BUDDY bool diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config index 558839e..2485538 100644 --- a/tools/testing/selftests/bpf/config +++ b/tools/testing/selftests/bpf/config @@ -1,6 +1,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BPF=y CONFIG_BPF_EVENTS=y CONFIG_BPF_JIT=y diff --git a/tools/testing/selftests/wireguard/qemu/kernel.config b/tools/testing/selftests/wireguard/qemu/kernel.config index 0504c11..bb89d2d 100644 --- a/tools/testing/selftests/wireguard/qemu/kernel.config +++ b/tools/testing/selftests/wireguard/qemu/kernel.config @@ -80,7 +80,7 @@ CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_WQ_WATCHDOG=y CONFIG_DETECT_HUNG_TASK=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 CONFIG_PANIC_TIMEOUT=-1 CONFIG_STACKTRACE=y -- 2.9.4 From lance.yang at linux.dev Wed Dec 17 06:27:22 2025 From: lance.yang at linux.dev (Lance Yang) Date: Wed, 17 Dec 2025 14:27:22 +0800 Subject: [PATCH] watchdog: softlockup: panic when lockup duration exceeds N thresholds In-Reply-To: <20251216074521.2796-1-lirongqing@baidu.com> References: <20251216074521.2796-1-lirongqing@baidu.com> Message-ID: On 2025/12/16 15:45, lirongqing wrote: > From: Li RongQing > > The softlockup_panic sysctl is currently a binary option: panic immediately > or never panic on soft lockups. > > Panicking on any soft lockup, regardless of duration, can be overly > aggressive for brief stalls that may be caused by legitimate operations. > Conversely, never panicking may allow severe system hangs to persist > undetected. > > Extend softlockup_panic to accept an integer threshold, allowing the kernel > to panic only when the normalized lockup duration exceeds N watchdog > threshold periods. This provides finer-grained control to distinguish > between transient delays and persistent system failures. > > The accepted values are: > - 0: Don't panic (unchanged) > - 1: Panic when duration >= 1 * threshold (20s default, original behavior) > - N > 1: Panic when duration >= N * threshold (e.g., 2 = 40s, 3 = 60s.) > > The original behavior is preserved for values 0 and 1, maintaining full > backward compatibility while allowing systems to tolerate brief lockups > while still catching severe, persistent hangs. Thanks! Just a couple of minor things below ;) > > Signed-off-by: Li RongQing > --- > Documentation/admin-guide/kernel-parameters.txt | 10 +++++----- > arch/arm/configs/aspeed_g5_defconfig | 2 +- > arch/arm/configs/pxa3xx_defconfig | 2 +- > arch/openrisc/configs/or1klitex_defconfig | 2 +- > arch/powerpc/configs/skiroot_defconfig | 2 +- > drivers/gpu/drm/ci/arm.config | 2 +- > drivers/gpu/drm/ci/arm64.config | 2 +- > drivers/gpu/drm/ci/x86_64.config | 2 +- > kernel/watchdog.c | 8 +++++--- > lib/Kconfig.debug | 13 +++++++------ > tools/testing/selftests/bpf/config | 2 +- > tools/testing/selftests/wireguard/qemu/kernel.config | 2 +- > 12 files changed, 26 insertions(+), 23 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index a8d0afd..27c5f96 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -6934,12 +6934,12 @@ Kernel parameters > > softlockup_panic= > [KNL] Should the soft-lockup detector generate panics. > - Format: 0 | 1 > + Format: > > - A value of 1 instructs the soft-lockup detector > - to panic the machine when a soft-lockup occurs. It is > - also controlled by the kernel.softlockup_panic sysctl > - and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the > + A value of non-zero instructs the soft-lockup detector > + to panic the machine when a soft-lockup duration exceeds > + N thresholds. It is also controlled by the kernel.softlockup_panic > + sysctl and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the > respective build-time switch to that functionality. Seems like kernel/configs/debug.config still has the old format "# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set" ... Should be updated to "CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0", right? > > softlockup_all_cpu_backtrace= > diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig > index 2e6ea13..ec558e5 100644 > --- a/arch/arm/configs/aspeed_g5_defconfig > +++ b/arch/arm/configs/aspeed_g5_defconfig > @@ -306,7 +306,7 @@ CONFIG_SCHED_STACK_END_CHECK=y > CONFIG_PANIC_ON_OOPS=y > CONFIG_PANIC_TIMEOUT=-1 > CONFIG_SOFTLOCKUP_DETECTOR=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 > CONFIG_WQ_WATCHDOG=y > # CONFIG_SCHED_DEBUG is not set > diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig > index 07d422f..fb272e3 100644 > --- a/arch/arm/configs/pxa3xx_defconfig > +++ b/arch/arm/configs/pxa3xx_defconfig > @@ -100,7 +100,7 @@ CONFIG_PRINTK_TIME=y > CONFIG_DEBUG_KERNEL=y > CONFIG_MAGIC_SYSRQ=y > CONFIG_DEBUG_SHIRQ=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > # CONFIG_SCHED_DEBUG is not set > CONFIG_DEBUG_SPINLOCK=y > CONFIG_DEBUG_SPINLOCK_SLEEP=y > diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig > index fb1eb9a..984b0e3 100644 > --- a/arch/openrisc/configs/or1klitex_defconfig > +++ b/arch/openrisc/configs/or1klitex_defconfig > @@ -52,5 +52,5 @@ CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" > CONFIG_PRINTK_TIME=y > CONFIG_PANIC_ON_OOPS=y > CONFIG_SOFTLOCKUP_DETECTOR=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > CONFIG_BUG_ON_DATA_CORRUPTION=y > diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig > index 2b71a6d..a4114fc 100644 > --- a/arch/powerpc/configs/skiroot_defconfig > +++ b/arch/powerpc/configs/skiroot_defconfig > @@ -289,7 +289,7 @@ CONFIG_SCHED_STACK_END_CHECK=y > CONFIG_DEBUG_STACKOVERFLOW=y > CONFIG_PANIC_ON_OOPS=y > CONFIG_SOFTLOCKUP_DETECTOR=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > CONFIG_HARDLOCKUP_DETECTOR=y > CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y > CONFIG_WQ_WATCHDOG=y > diff --git a/drivers/gpu/drm/ci/arm.config b/drivers/gpu/drm/ci/arm.config > index 411e814..d7c5167 100644 > --- a/drivers/gpu/drm/ci/arm.config > +++ b/drivers/gpu/drm/ci/arm.config > @@ -52,7 +52,7 @@ CONFIG_TMPFS=y > CONFIG_PROVE_LOCKING=n > CONFIG_DEBUG_LOCKDEP=n > CONFIG_SOFTLOCKUP_DETECTOR=n > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 > > CONFIG_FW_LOADER_COMPRESS=y > > diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config > index fddfbd4..ea0e307 100644 > --- a/drivers/gpu/drm/ci/arm64.config > +++ b/drivers/gpu/drm/ci/arm64.config > @@ -161,7 +161,7 @@ CONFIG_TMPFS=y > CONFIG_PROVE_LOCKING=n > CONFIG_DEBUG_LOCKDEP=n > CONFIG_SOFTLOCKUP_DETECTOR=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > CONFIG_DETECT_HUNG_TASK=y > > diff --git a/drivers/gpu/drm/ci/x86_64.config b/drivers/gpu/drm/ci/x86_64.config > index 8eaba388..7ac98a7 100644 > --- a/drivers/gpu/drm/ci/x86_64.config > +++ b/drivers/gpu/drm/ci/x86_64.config > @@ -47,7 +47,7 @@ CONFIG_TMPFS=y > CONFIG_PROVE_LOCKING=n > CONFIG_DEBUG_LOCKDEP=n > CONFIG_SOFTLOCKUP_DETECTOR=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > CONFIG_DETECT_HUNG_TASK=y > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c > index 0685e3a..a5fa116 100644 > --- a/kernel/watchdog.c > +++ b/kernel/watchdog.c > @@ -363,7 +363,7 @@ static struct cpumask watchdog_allowed_mask __read_mostly; > > /* Global variables, exported for sysctl */ > unsigned int __read_mostly softlockup_panic = > - IS_ENABLED(CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC); > + CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC; > > static bool softlockup_initialized __read_mostly; > static u64 __read_mostly sample_period; > @@ -879,7 +879,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) > > add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); > sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT); > - if (softlockup_panic) > + duration = duration / get_softlockup_thresh(); Nit: reusing "duration" here makes things a bit confusing, maybe just use a temp variable? thresh_count = duration / get_softlockup_thresh(); if (softlockup_panic && thresh_count >= softlockup_panic) panic("softlockup: hung tasks"); Cheers, Lance > + > + if (softlockup_panic && duration >= softlockup_panic) > panic("softlockup: hung tasks"); > } > > @@ -1228,7 +1230,7 @@ static const struct ctl_table watchdog_sysctls[] = { > .mode = 0644, > .proc_handler = proc_dointvec_minmax, > .extra1 = SYSCTL_ZERO, > - .extra2 = SYSCTL_ONE, > + .extra2 = SYSCTL_INT_MAX, > }, > { > .procname = "softlockup_sys_info", > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index ba36939..17a7a77 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1110,13 +1110,14 @@ config SOFTLOCKUP_DETECTOR_INTR_STORM > the CPU stats and the interrupt counts during the "soft lockups". > > config BOOTPARAM_SOFTLOCKUP_PANIC > - bool "Panic (Reboot) On Soft Lockups" > + int "Panic (Reboot) On Soft Lockups" > depends on SOFTLOCKUP_DETECTOR > + default 0 > help > - Say Y here to enable the kernel to panic on "soft lockups", > - which are bugs that cause the kernel to loop in kernel > - mode for more than 20 seconds (configurable using the watchdog_thresh > - sysctl), without giving other tasks a chance to run. > + Set to a non-zero value N to enable the kernel to panic on "soft > + lockups", which are bugs that cause the kernel to loop in kernel > + mode for more than (N * 20 seconds) (configurable using the > + watchdog_thresh sysctl), without giving other tasks a chance to run. > > The panic can be used in combination with panic_timeout, > to cause the system to reboot automatically after a > @@ -1124,7 +1125,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC > high-availability systems that have uptime guarantees and > where a lockup must be resolved ASAP. > > - Say N if unsure. > + Say 0 if unsure. > > config HAVE_HARDLOCKUP_DETECTOR_BUDDY > bool > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config > index 558839e..2485538 100644 > --- a/tools/testing/selftests/bpf/config > +++ b/tools/testing/selftests/bpf/config > @@ -1,6 +1,6 @@ > CONFIG_BLK_DEV_LOOP=y > CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > CONFIG_BPF=y > CONFIG_BPF_EVENTS=y > CONFIG_BPF_JIT=y > diff --git a/tools/testing/selftests/wireguard/qemu/kernel.config b/tools/testing/selftests/wireguard/qemu/kernel.config > index 0504c11..bb89d2d 100644 > --- a/tools/testing/selftests/wireguard/qemu/kernel.config > +++ b/tools/testing/selftests/wireguard/qemu/kernel.config > @@ -80,7 +80,7 @@ CONFIG_HARDLOCKUP_DETECTOR=y > CONFIG_WQ_WATCHDOG=y > CONFIG_DETECT_HUNG_TASK=y > CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 > CONFIG_PANIC_TIMEOUT=-1 > CONFIG_STACKTRACE=y From lirongqing at baidu.com Wed Dec 17 07:43:48 2025 From: lirongqing at baidu.com (Li,Rongqing) Date: Wed, 17 Dec 2025 07:43:48 +0000 Subject: =?utf-8?B?562U5aSNOiBb5aSW6YOo6YKu5Lu2XSBSZTogW1BBVENIXSB3YXRjaGRvZzog?= =?utf-8?B?c29mdGxvY2t1cDogcGFuaWMgd2hlbiBsb2NrdXAgZHVyYXRpb24gZXhjZWVk?= =?utf-8?Q?s_N_thresholds?= In-Reply-To: References: <20251216074521.2796-1-lirongqing@baidu.com> Message-ID: > > diff --git a/Documentation/admin-guide/kernel-parameters.txt > > b/Documentation/admin-guide/kernel-parameters.txt > > index a8d0afd..27c5f96 100644 > > --- a/Documentation/admin-guide/kernel-parameters.txt > > +++ b/Documentation/admin-guide/kernel-parameters.txt > > @@ -6934,12 +6934,12 @@ Kernel parameters > > > > softlockup_panic= > > [KNL] Should the soft-lockup detector generate panics. > > - Format: 0 | 1 > > + Format: > > > > - A value of 1 instructs the soft-lockup detector > > - to panic the machine when a soft-lockup occurs. It is > > - also controlled by the kernel.softlockup_panic sysctl > > - and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the > > + A value of non-zero instructs the soft-lockup detector > > + to panic the machine when a soft-lockup duration exceeds > > + N thresholds. It is also controlled by the kernel.softlockup_panic > > + sysctl and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is > the > > respective build-time switch to that functionality. > > Seems like kernel/configs/debug.config still has the old format "# > CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set" ... > > Should be updated to "CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0", right? > Will fix > > > > softlockup_all_cpu_backtrace= > > diff --git a/arch/arm/configs/aspeed_g5_defconfig > > b/arch/arm/configs/aspeed_g5_defconfig > > index 2e6ea13..ec558e5 100644 > > --- a/arch/arm/configs/aspeed_g5_defconfig > > +++ b/arch/arm/configs/aspeed_g5_defconfig > > @@ -306,7 +306,7 @@ CONFIG_SCHED_STACK_END_CHECK=y > > CONFIG_PANIC_ON_OOPS=y > > CONFIG_PANIC_TIMEOUT=-1 > > CONFIG_SOFTLOCKUP_DETECTOR=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 > > CONFIG_WQ_WATCHDOG=y > > # CONFIG_SCHED_DEBUG is not set > > diff --git a/arch/arm/configs/pxa3xx_defconfig > > b/arch/arm/configs/pxa3xx_defconfig > > index 07d422f..fb272e3 100644 > > --- a/arch/arm/configs/pxa3xx_defconfig > > +++ b/arch/arm/configs/pxa3xx_defconfig > > @@ -100,7 +100,7 @@ CONFIG_PRINTK_TIME=y > > CONFIG_DEBUG_KERNEL=y > > CONFIG_MAGIC_SYSRQ=y > > CONFIG_DEBUG_SHIRQ=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > # CONFIG_SCHED_DEBUG is not set > > CONFIG_DEBUG_SPINLOCK=y > > CONFIG_DEBUG_SPINLOCK_SLEEP=y > > diff --git a/arch/openrisc/configs/or1klitex_defconfig > > b/arch/openrisc/configs/or1klitex_defconfig > > index fb1eb9a..984b0e3 100644 > > --- a/arch/openrisc/configs/or1klitex_defconfig > > +++ b/arch/openrisc/configs/or1klitex_defconfig > > @@ -52,5 +52,5 @@ > CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" > > CONFIG_PRINTK_TIME=y > > CONFIG_PANIC_ON_OOPS=y > > CONFIG_SOFTLOCKUP_DETECTOR=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > CONFIG_BUG_ON_DATA_CORRUPTION=y > > diff --git a/arch/powerpc/configs/skiroot_defconfig > > b/arch/powerpc/configs/skiroot_defconfig > > index 2b71a6d..a4114fc 100644 > > --- a/arch/powerpc/configs/skiroot_defconfig > > +++ b/arch/powerpc/configs/skiroot_defconfig > > @@ -289,7 +289,7 @@ CONFIG_SCHED_STACK_END_CHECK=y > > CONFIG_DEBUG_STACKOVERFLOW=y > > CONFIG_PANIC_ON_OOPS=y > > CONFIG_SOFTLOCKUP_DETECTOR=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > CONFIG_HARDLOCKUP_DETECTOR=y > > CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y > > CONFIG_WQ_WATCHDOG=y > > diff --git a/drivers/gpu/drm/ci/arm.config > > b/drivers/gpu/drm/ci/arm.config index 411e814..d7c5167 100644 > > --- a/drivers/gpu/drm/ci/arm.config > > +++ b/drivers/gpu/drm/ci/arm.config > > @@ -52,7 +52,7 @@ CONFIG_TMPFS=y > > CONFIG_PROVE_LOCKING=n > > CONFIG_DEBUG_LOCKDEP=n > > CONFIG_SOFTLOCKUP_DETECTOR=n > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 > > > > CONFIG_FW_LOADER_COMPRESS=y > > > > diff --git a/drivers/gpu/drm/ci/arm64.config > > b/drivers/gpu/drm/ci/arm64.config index fddfbd4..ea0e307 100644 > > --- a/drivers/gpu/drm/ci/arm64.config > > +++ b/drivers/gpu/drm/ci/arm64.config > > @@ -161,7 +161,7 @@ CONFIG_TMPFS=y > > CONFIG_PROVE_LOCKING=n > > CONFIG_DEBUG_LOCKDEP=n > > CONFIG_SOFTLOCKUP_DETECTOR=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > > > CONFIG_DETECT_HUNG_TASK=y > > > > diff --git a/drivers/gpu/drm/ci/x86_64.config > > b/drivers/gpu/drm/ci/x86_64.config > > index 8eaba388..7ac98a7 100644 > > --- a/drivers/gpu/drm/ci/x86_64.config > > +++ b/drivers/gpu/drm/ci/x86_64.config > > @@ -47,7 +47,7 @@ CONFIG_TMPFS=y > > CONFIG_PROVE_LOCKING=n > > CONFIG_DEBUG_LOCKDEP=n > > CONFIG_SOFTLOCKUP_DETECTOR=y > > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y > > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 > > > > CONFIG_DETECT_HUNG_TASK=y > > > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c index > > 0685e3a..a5fa116 100644 > > --- a/kernel/watchdog.c > > +++ b/kernel/watchdog.c > > @@ -363,7 +363,7 @@ static struct cpumask watchdog_allowed_mask > > __read_mostly; > > > > /* Global variables, exported for sysctl */ > > unsigned int __read_mostly softlockup_panic = > > - IS_ENABLED(CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC); > > + CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC; > > > > static bool softlockup_initialized __read_mostly; > > static u64 __read_mostly sample_period; @@ -879,7 +879,9 @@ static > > enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) > > > > add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); > > sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT); > > - if (softlockup_panic) > > + duration = duration / get_softlockup_thresh(); > > Nit: reusing "duration" here makes things a bit confusing, maybe just use a temp > variable? > > thresh_count = duration / get_softlockup_thresh(); > > if (softlockup_panic && thresh_count >= softlockup_panic) > panic("softlockup: hung tasks"); > Will change in next version, thanks [Li,Rongqing] From lirongqing at baidu.com Thu Dec 18 07:43:00 2025 From: lirongqing at baidu.com (lirongqing) Date: Thu, 18 Dec 2025 02:43:00 -0500 Subject: [PATCH][v2] watchdog: softlockup: panic when lockup duration exceeds N thresholds Message-ID: <20251218074300.4080-1-lirongqing@baidu.com> From: Li RongQing The softlockup_panic sysctl is currently a binary option: panic immediately or never panic on soft lockups. Panicking on any soft lockup, regardless of duration, can be overly aggressive for brief stalls that may be caused by legitimate operations. Conversely, never panicking may allow severe system hangs to persist undetected. Extend softlockup_panic to accept an integer threshold, allowing the kernel to panic only when the normalized lockup duration exceeds N watchdog threshold periods. This provides finer-grained control to distinguish between transient delays and persistent system failures. The accepted values are: - 0: Don't panic (unchanged) - 1: Panic when duration >= 1 * threshold (20s default, original behavior) - N > 1: Panic when duration >= N * threshold (e.g., 2 = 40s, 3 = 60s.) The original behavior is preserved for values 0 and 1, maintaining full backward compatibility while allowing systems to tolerate brief lockups while still catching severe, persistent hangs. Signed-off-by: Li RongQing Cc: Eduard Zingerman Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Lance Yang Cc: Martin KaFai Lau Cc: Nicholas Piggin Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Cc: Andrew Morton --- Diff with v1: add a temp variable thresh_count chang config to 0 in kernel/configs/debug.config Documentation/admin-guide/kernel-parameters.txt | 10 +++++----- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 2 +- arch/openrisc/configs/or1klitex_defconfig | 2 +- arch/powerpc/configs/skiroot_defconfig | 2 +- drivers/gpu/drm/ci/arm.config | 2 +- drivers/gpu/drm/ci/arm64.config | 2 +- drivers/gpu/drm/ci/x86_64.config | 2 +- kernel/configs/debug.config | 2 +- kernel/watchdog.c | 10 ++++++---- lib/Kconfig.debug | 13 +++++++------ tools/testing/selftests/bpf/config | 2 +- tools/testing/selftests/wireguard/qemu/kernel.config | 2 +- 13 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a8d0afd..27c5f96 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6934,12 +6934,12 @@ Kernel parameters softlockup_panic= [KNL] Should the soft-lockup detector generate panics. - Format: 0 | 1 + Format: - A value of 1 instructs the soft-lockup detector - to panic the machine when a soft-lockup occurs. It is - also controlled by the kernel.softlockup_panic sysctl - and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the + A value of non-zero instructs the soft-lockup detector + to panic the machine when a soft-lockup duration exceeds + N thresholds. It is also controlled by the kernel.softlockup_panic + sysctl and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the respective build-time switch to that functionality. softlockup_all_cpu_backtrace= diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 2e6ea13..ec558e5 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -306,7 +306,7 @@ CONFIG_SCHED_STACK_END_CHECK=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=-1 CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 CONFIG_WQ_WATCHDOG=y # CONFIG_SCHED_DEBUG is not set diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig index 07d422f..fb272e3 100644 --- a/arch/arm/configs/pxa3xx_defconfig +++ b/arch/arm/configs/pxa3xx_defconfig @@ -100,7 +100,7 @@ CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_SHIRQ=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 # CONFIG_SCHED_DEBUG is not set CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_SPINLOCK_SLEEP=y diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig index fb1eb9a..984b0e3 100644 --- a/arch/openrisc/configs/or1klitex_defconfig +++ b/arch/openrisc/configs/or1klitex_defconfig @@ -52,5 +52,5 @@ CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" CONFIG_PRINTK_TIME=y CONFIG_PANIC_ON_OOPS=y CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BUG_ON_DATA_CORRUPTION=y diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 2b71a6d..a4114fc 100644 --- a/arch/powerpc/configs/skiroot_defconfig +++ b/arch/powerpc/configs/skiroot_defconfig @@ -289,7 +289,7 @@ CONFIG_SCHED_STACK_END_CHECK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_PANIC_ON_OOPS=y CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y CONFIG_WQ_WATCHDOG=y diff --git a/drivers/gpu/drm/ci/arm.config b/drivers/gpu/drm/ci/arm.config index 411e814..d7c5167 100644 --- a/drivers/gpu/drm/ci/arm.config +++ b/drivers/gpu/drm/ci/arm.config @@ -52,7 +52,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=n -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 CONFIG_FW_LOADER_COMPRESS=y diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config index fddfbd4..ea0e307 100644 --- a/drivers/gpu/drm/ci/arm64.config +++ b/drivers/gpu/drm/ci/arm64.config @@ -161,7 +161,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_DETECT_HUNG_TASK=y diff --git a/drivers/gpu/drm/ci/x86_64.config b/drivers/gpu/drm/ci/x86_64.config index 8eaba388..7ac98a7 100644 --- a/drivers/gpu/drm/ci/x86_64.config +++ b/drivers/gpu/drm/ci/x86_64.config @@ -47,7 +47,7 @@ CONFIG_TMPFS=y CONFIG_PROVE_LOCKING=n CONFIG_DEBUG_LOCKDEP=n CONFIG_SOFTLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_DETECT_HUNG_TASK=y diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config index 9f6ab7d..774702591 100644 --- a/kernel/configs/debug.config +++ b/kernel/configs/debug.config @@ -84,7 +84,7 @@ CONFIG_SLUB_DEBUG_ON=y # Debug Oops, Lockups and Hangs # CONFIG_BOOTPARAM_HUNG_TASK_PANIC=0 -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 CONFIG_DEBUG_ATOMIC_SLEEP=y CONFIG_DETECT_HUNG_TASK=y CONFIG_PANIC_ON_OOPS=y diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 0685e3a..8168e0d 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -363,7 +363,7 @@ static struct cpumask watchdog_allowed_mask __read_mostly; /* Global variables, exported for sysctl */ unsigned int __read_mostly softlockup_panic = - IS_ENABLED(CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC); + CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC; static bool softlockup_initialized __read_mostly; static u64 __read_mostly sample_period; @@ -774,8 +774,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) { unsigned long touch_ts, period_ts, now; struct pt_regs *regs = get_irq_regs(); - int duration; int softlockup_all_cpu_backtrace; + int duration, thresh_count; unsigned long flags; if (!watchdog_enabled) @@ -879,7 +879,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT); - if (softlockup_panic) + thresh_count = duration / get_softlockup_thresh(); + + if (softlockup_panic && thresh_count >= softlockup_panic) panic("softlockup: hung tasks"); } @@ -1228,7 +1230,7 @@ static const struct ctl_table watchdog_sysctls[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, - .extra2 = SYSCTL_ONE, + .extra2 = SYSCTL_INT_MAX, }, { .procname = "softlockup_sys_info", diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ba36939..17a7a77 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1110,13 +1110,14 @@ config SOFTLOCKUP_DETECTOR_INTR_STORM the CPU stats and the interrupt counts during the "soft lockups". config BOOTPARAM_SOFTLOCKUP_PANIC - bool "Panic (Reboot) On Soft Lockups" + int "Panic (Reboot) On Soft Lockups" depends on SOFTLOCKUP_DETECTOR + default 0 help - Say Y here to enable the kernel to panic on "soft lockups", - which are bugs that cause the kernel to loop in kernel - mode for more than 20 seconds (configurable using the watchdog_thresh - sysctl), without giving other tasks a chance to run. + Set to a non-zero value N to enable the kernel to panic on "soft + lockups", which are bugs that cause the kernel to loop in kernel + mode for more than (N * 20 seconds) (configurable using the + watchdog_thresh sysctl), without giving other tasks a chance to run. The panic can be used in combination with panic_timeout, to cause the system to reboot automatically after a @@ -1124,7 +1125,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC high-availability systems that have uptime guarantees and where a lockup must be resolved ASAP. - Say N if unsure. + Say 0 if unsure. config HAVE_HARDLOCKUP_DETECTOR_BUDDY bool diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config index 558839e..2485538 100644 --- a/tools/testing/selftests/bpf/config +++ b/tools/testing/selftests/bpf/config @@ -1,6 +1,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BPF=y CONFIG_BPF_EVENTS=y CONFIG_BPF_JIT=y diff --git a/tools/testing/selftests/wireguard/qemu/kernel.config b/tools/testing/selftests/wireguard/qemu/kernel.config index 0504c11..bb89d2d 100644 --- a/tools/testing/selftests/wireguard/qemu/kernel.config +++ b/tools/testing/selftests/wireguard/qemu/kernel.config @@ -80,7 +80,7 @@ CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_WQ_WATCHDOG=y CONFIG_DETECT_HUNG_TASK=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1 CONFIG_PANIC_TIMEOUT=-1 CONFIG_STACKTRACE=y -- 2.9.4 From cristiano.deana at megaweb.it Mon Dec 1 08:57:59 2025 From: cristiano.deana at megaweb.it (Cristiano Deana) Date: Mon, 01 Dec 2025 08:57:59 -0000 Subject: wg-quick: changes in freebsd Message-ID: Hi, in FreeBSD 15 `ifconfig' command required a specific netmask when assign an IP, but wg-quick extract (and save to .conf file) only the address, without mask. I just wrote a little patch (that's not my job, maybe awful) to save $address/$mask to $INTERFACE.conf: # diff freebsd.bash /usr/local/bin/wg-quick 347,348c347,349 < { read -r _; while read -r _ _ _ address _; do < new_config+="Address = $address"$'\n' --- > { read -r _; while read -r _ _ network address _; do > mask=$(echo "$network" | awk -F / '{print $2}') > new_config+="Address = $address/$mask"$'\n' Feel free to point me the correct way to submit a patch request, thank you. Cris From caveeman.caveman.11 at icloud.com Sat Dec 13 18:42:29 2025 From: caveeman.caveman.11 at icloud.com (caveeman.caveman.11 at icloud.com) Date: Sat, 13 Dec 2025 18:42:29 -0000 Subject: wg-quick: Separate files for interface and peer definitions? Message-ID: From u34 at net9.cf Wed Dec 17 19:03:00 2025 From: u34 at net9.cf (u34 at net9.cf) Date: Wed, 17 Dec 2025 19:03:00 -0000 Subject: A minor patch for wg.8 manual page Message-ID: The wg.8 manual page CONFIGURATION FILE FORMAT EXAMPLE section has a comment about comments in the configuration file. Since 1. I think such a comment belong to the CONFIGURATION FILE FORMAT section. 2. The example in the CONFIGURATION FILE FORMAT EXAMPLE section has no comments I propose --- a/wg.8 2025-12-17 18:34:56.023484459 +0000 +++ b/wg.8 2025-12-17 18:51:04.271960383 +0000 @@ -132,6 +132,7 @@ The configuration file format is based on \fIINI\fP. There are two top level sections -- \fIInterface\fP and \fIPeer\fP. Multiple \fIPeer\fP sections may be specified, but only one \fIInterface\fP section may be specified. +Characters after and including a '#' are considered comments and are thus ignored. .P The \fIInterface\fP section may contain the following fields: @@ -177,17 +178,20 @@ .SH CONFIGURATION FILE FORMAT EXAMPLE This example may be used as a model for writing configuration files, following an -INI-like syntax. Characters after and including a '#' are considered comments and -are thus ignored. +INI-like syntax. [Interface] .br + # A comment: only one [Interface] section may be specified. +.br PrivateKey = yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk= .br ListenPort = 51820 .br .br + # A comment: multiple [Peer] sections may be specified. +.br [Peer] .br PublicKey = xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg= From paymon at encs.concordia.ca Wed Dec 10 14:48:34 2025 From: paymon at encs.concordia.ca (Paymon) Date: Wed, 10 Dec 2025 14:48:34 -0000 Subject: plugging into wireguard clients Message-ID: <3a43yktovcw425zm7lexmqsysj35skly7f7emftcyirbwarkus@gocmz2oxt4l2> hello, posted a version of this earlier on #wireguard, posting here for those who missed it? hope it is in good form. > i'm pushing our organisation to use wireguard for vpn and the show stopper is > compliance. what they use at the moment is fortinet and the main feature the > windows admins are asking for is the compliance. what they care about is > mainly the os version of the staff's own devices atm. > > one question i have is, do you know of any open source solution for this? > (besides tailscale of course) > i have looked into implementing it myself and the main issue is the windows > platform, i'm unfamiliar with their package/distributing dance. > > nevertheless, i had a brief look into wireguard-windows and first thing i > notices was `supportedOS` in manifest.xml > > one idea would be to repackage and distribute wireguard-windows, with the old > version of os removed from that manifest file plus a logic that kicks in and > onboard the user. i.e. authenticate them to the backend, generate a pair of > keys for them and exchange it to the backend etc. > > i wonder what you think about this? in particular, any suggestion as to where > would be a good entry point for this? > i see fetcher has some comments related to intunes (not so much familiar with > that), is that a good place to start? -- Paymon