lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 13 Jun 2023 18:22:15 -0300
From: Ricardo Nabinger Sanchez <rnsanchez@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>, Willem de Bruijn
 <willemdebruijn.kernel@...il.com>, netdev@...r.kernel.org
Subject: Re: panic in udp_init() when using FORCE_NR_CPUS

Hi Eric,

On Tue, 13 Jun 2023 22:19:33 +0200
Eric Dumazet <edumazet@...gle.com> wrote:

> Sure, but you did not give NR_CPUS value ?
> 
> Also posting the stack trace might be useful.

That's puzzling.  From menuconfig (which I always use), it is a bool:

[*] Set number of CPUs at compile time 

CONFIG_FORCE_NR_CPUS:

Say Yes if you have NR_CPUS set to an actual number of possible
CPUs in your system, not to a default value. This forces the core
code to rely on compile-time value and optimize kernel routines
better.

Symbol: FORCE_NR_CPUS [=y]
Type  : bool
Defined at lib/Kconfig:540
  Prompt: Set number of CPUs at compile time
  Depends on: SMP [=y] && EXPERT [=y] && !COMPILE_TEST [=n]
  Location:
    -> Library routines
      -> Set number of CPUs at compile time (FORCE_NR_CPUS [=y])



So I took another look into how I was setting these, and since I had
not realized I would need to disable MAXSMP and only then be able to
set NR_CPUS.  I must have misunderstood the help sections; the wording
suggests me that one of those knobs would trigger some automatic
enumeration.

Here is the diff on my resulting .config:

--- .config.old	2023-06-13 17:33:41.152720907 -0300
+++ .config	2023-06-13 17:46:48.515676191 -0300
@@ -388,11 +388,11 @@
 CONFIG_HPET_EMULATE_RTC=y
 CONFIG_DMI=y
 CONFIG_BOOT_VESA_SUPPORT=y
-CONFIG_MAXSMP=y
-CONFIG_NR_CPUS_RANGE_BEGIN=8192
-CONFIG_NR_CPUS_RANGE_END=8192
-CONFIG_NR_CPUS_DEFAULT=8192
-CONFIG_NR_CPUS=8192
+# CONFIG_MAXSMP is not set
+CONFIG_NR_CPUS_RANGE_BEGIN=2
+CONFIG_NR_CPUS_RANGE_END=512
+CONFIG_NR_CPUS_DEFAULT=64
+CONFIG_NR_CPUS=12
 CONFIG_SCHED_CLUSTER=y
 CONFIG_SCHED_SMT=y
 CONFIG_SCHED_MC=y
@@ -430,7 +430,7 @@
 # CONFIG_AMD_NUMA is not set
 CONFIG_X86_64_ACPI_NUMA=y
 # CONFIG_NUMA_EMU is not set
-CONFIG_NODES_SHIFT=10
+CONFIG_NODES_SHIFT=6
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
 CONFIG_ARCH_PROC_KCORE_TEXT=y
@@ -4995,8 +4995,7 @@
 # CONFIG_DMA_MAP_BENCHMARK is not set
 CONFIG_SGL_ALLOC=y
 CONFIG_CHECK_SIGNATURE=y
-CONFIG_CPUMASK_OFFSTACK=y
-# CONFIG_FORCE_NR_CPUS is not set
+CONFIG_FORCE_NR_CPUS=y
 CONFIG_CPU_RMAP=y
 CONFIG_DQL=y
 CONFIG_GLOB=y
@@ -5150,6 +5149,8 @@
 # CONFIG_DEBUG_VIRTUAL is not set
 CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
+# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set
 CONFIG_HAVE_ARCH_KASAN=y
 CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
 CONFIG_CC_HAS_KASAN_GENERIC=y


And I'm reporting from a freshly-rebuilt kernel, which succeeded in
booting.  So this was totally on me, I did not know about these
conflicts in my configuration.

Apologies on making noise about this panic.

Best regards,

-- 
Ricardo Nabinger Sanchez

    Dedique-se a melhorar seus esforços.
    Todas as suas conquistas evolutivas não foram resultado dos
    deuses, das outras consciências, ou do acaso, mas unicamente
    da sua transpiração. ---Waldo Vieira, Léxico de Ortopensatas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ