]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wireguard: selftests: set panic_on_warn=1 from cmdline
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 4 May 2022 20:29:20 +0000 (22:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 May 2022 00:49:57 +0000 (17:49 -0700)
Rather than setting this once init is running, set panic_on_warn from
the kernel command line, so that it catches splats from WireGuard
initialization code and the various crypto selftests.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
18 files changed:
tools/testing/selftests/wireguard/qemu/arch/aarch64.config
tools/testing/selftests/wireguard/qemu/arch/aarch64_be.config
tools/testing/selftests/wireguard/qemu/arch/arm.config
tools/testing/selftests/wireguard/qemu/arch/armeb.config
tools/testing/selftests/wireguard/qemu/arch/i686.config
tools/testing/selftests/wireguard/qemu/arch/m68k.config
tools/testing/selftests/wireguard/qemu/arch/mips.config
tools/testing/selftests/wireguard/qemu/arch/mips64.config
tools/testing/selftests/wireguard/qemu/arch/mips64el.config
tools/testing/selftests/wireguard/qemu/arch/mipsel.config
tools/testing/selftests/wireguard/qemu/arch/powerpc.config
tools/testing/selftests/wireguard/qemu/arch/powerpc64.config
tools/testing/selftests/wireguard/qemu/arch/powerpc64le.config
tools/testing/selftests/wireguard/qemu/arch/riscv32.config
tools/testing/selftests/wireguard/qemu/arch/riscv64.config
tools/testing/selftests/wireguard/qemu/arch/s390x.config
tools/testing/selftests/wireguard/qemu/arch/x86_64.config
tools/testing/selftests/wireguard/qemu/init.c

index e9ac41f6b3ae8bf64d8305c2b9e29b14dc4e34be..09016880ce035ad391c5b98d7058bcb2410acc9d 100644 (file)
@@ -4,5 +4,5 @@ CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1280
index 03609a203e8ca0344ad7fe37b87ddb762a87ff7d..19ff66e4c602e270a3cf88ab5c119e91e1736bfe 100644 (file)
@@ -5,5 +5,5 @@ CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1280
index c616124fdd5935337f17ee4483e24fd5552f0bd4..fc7959bef9c252dc430da09283c1914692129784 100644 (file)
@@ -8,5 +8,5 @@ CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index d3a40a974e163321a2507f220a088440825dd3a1..f3066be81c1998e67f1827d784ec1fd2133d9794 100644 (file)
@@ -8,6 +8,6 @@ CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyAMA0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_FRAME_WARN=1024
index a9b4fe7950480fe842b0a819df5e429dc259d48a..6d90892a85a242040f71cb62a1aec559b2a88581 100644 (file)
@@ -2,5 +2,5 @@ CONFIG_ACPI=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index 62a15bdb877e7c999a2872f68a2312b328e17cbf..82c925e49beb7dd2794c6b726d6ee5f08f4d146d 100644 (file)
@@ -5,5 +5,5 @@ CONFIG_MAC=y
 CONFIG_SERIAL_PMACZILOG=y
 CONFIG_SERIAL_PMACZILOG_TTYS=y
 CONFIG_SERIAL_PMACZILOG_CONSOLE=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index df71d6b95546fb50a58021e5bdf36d27e8e25e85..d7ec63c17b30e664ccec04a01d6ab879e89df528 100644 (file)
@@ -7,5 +7,5 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index 90c783f725c4d6f04af74834cd1807679e3035f1..0994947e3392561de553f0e1a2371da048b89092 100644 (file)
@@ -10,5 +10,5 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1280
index 435b0b43e00cbce391b0804912673511bad86364..591184342f4715025500d01d24b569bd4555b637 100644 (file)
@@ -11,5 +11,5 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1280
index 62bb50c4a85fc89321b08038c8e6ac1eedb7e8ea..18a498293737637708824f28a360a6a104c6181c 100644 (file)
@@ -8,5 +8,5 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index 57957093b71b84223631829f5d0a1d953954fe76..5e04882e8e35b3f8d0b8fb2732460a3511193fea 100644 (file)
@@ -6,5 +6,5 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_MATH_EMULATION=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1024
index c19c7b519d8bf8f3e086c8dbb96b4b364e938054..737194b7619e0c50d16bd513058160201e7635aa 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_PPC_RADIX_MMU=y
 CONFIG_HVC_CONSOLE=y
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=hvc0 wg.success=hvc1"
+CONFIG_CMDLINE="console=hvc0 wg.success=hvc1 panic_on_warn=1"
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
 CONFIG_FRAME_WARN=1280
 CONFIG_THREAD_SHIFT=14
index f52f1e2bc7f64dba3c4d24d276fde663fed03909..8148b9d1220a494e99a41574cbf71161c184a9c2 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_PPC_RADIX_MMU=y
 CONFIG_HVC_CONSOLE=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=hvc0 wg.success=hvc1"
+CONFIG_CMDLINE="console=hvc0 wg.success=hvc1 panic_on_warn=1"
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
 CONFIG_FRAME_WARN=1280
 CONFIG_THREAD_SHIFT=14
index ea53e78e923e9fef8bebdcad181d4968c723c9fe..0bd0e72d95d49f67eb53b5c8ab5ff649d39c11c7 100644 (file)
@@ -8,5 +8,5 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_CMDLINE_FORCE=y
index 4a08d8c1d4afc175bd48caf64194aa134d494078..dc266f3b191557915c27a870c992e871c399e637 100644 (file)
@@ -8,5 +8,5 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_CONSOLE=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=vport0p1 panic_on_warn=1"
 CONFIG_CMDLINE_FORCE=y
index 274a44f4e49cf90ef941c88c770082c4b9830739..a7b44dca0b0ac273ff2784042790886477222b50 100644 (file)
@@ -3,4 +3,4 @@ CONFIG_SCLP_VT220_CONSOLE=y
 CONFIG_VIRTIO_MENU=y
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_S390_GUEST=y
-CONFIG_CMDLINE="console=ttysclp0 wg.success=vport0p1"
+CONFIG_CMDLINE="console=ttysclp0 wg.success=vport0p1 panic_on_warn=1"
index 45dd53a0d76005fec85c7b5513fbcc902ed3a006..efa00693e08bfac6992b70230ff92732413dfec5 100644 (file)
@@ -2,5 +2,5 @@ CONFIG_ACPI=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1"
+CONFIG_CMDLINE="console=ttyS0 wg.success=ttyS1 panic_on_warn=1"
 CONFIG_FRAME_WARN=1280
index 0b45055d9de0e1d19a1d84d7e116d3c15670ffdd..2a0f48fac925ac139a3dcac93e24dfcd5c83a735 100644 (file)
@@ -110,12 +110,6 @@ static void enable_logging(void)
                        panic("write(exception-trace)");
                close(fd);
        }
-       fd = open("/proc/sys/kernel/panic_on_warn", O_WRONLY);
-       if (fd >= 0) {
-               if (write(fd, "1\n", 2) != 2)
-                       panic("write(panic_on_warn)");
-               close(fd);
-       }
 }
 
 static void kmod_selftests(void)