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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 19 Sep 2023 18:20:31 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: boot warning after merge of the mm tree

On Tue, Sep 19, 2023 at 04:25:18PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next qemu opbbt test (powerpc
> pseries_le_defconfig) produced this warning:
> 
> vmap allocation for size 131072 failed: use vmalloc=<size> to increase size
> swapper/0: vmalloc error: size 65536, vm_struct allocation failed, mode:0xcc0(GFP_KERNEL), nodemask=(null),cpuset=/,mems_allowed=0
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc2-06327-g52a3bc18f36c #1
> Hardware name: IBM pSeries (emulated by qemu) POWER8 (raw) 0x4d0200 0xf000004 of:SLOF,HEAD pSeries
> Call Trace:
> [c00000000478f780] [c000000001174678] dump_stack_lvl+0x6c/0x9c (unreliable)
> [c00000000478f7b0] [c0000000004b7450] warn_alloc+0x150/0x210
> [c00000000478f850] [c0000000004abcd0] __vmalloc_node_range+0x4c0/0xab0
> [c00000000478f9d0] [c0000000005534dc] execmem_alloc+0xec/0x180
> [c00000000478fa70] [c0000000002c1ef8] alloc_insn_page+0x28/0x80
> [c00000000478fa90] [c0000000002c5624] __get_insn_slot+0x1c4/0x2a0
> [c00000000478fad0] [c00000000005cd68] arch_prepare_kprobe+0x168/0x2e0
> [c00000000478fb50] [c0000000002c69c0] register_kprobe+0x550/0x880
> [c00000000478fbc0] [c000000002012968] arch_init_kprobes+0x28/0x3c
> [c00000000478fbe0] [c000000002038a50] init_kprobes+0x118/0x1a0
> [c00000000478fc50] [c000000000010bc0] do_one_initcall+0x80/0x300
> [c00000000478fd20] [c000000002004848] kernel_init_freeable+0x1dc/0x3b4
> [c00000000478fdf0] [c0000000000111b0] kernel_init+0x30/0x1a0
> [c00000000478fe50] [c00000000000debc] ret_from_kernel_user_thread+0x14/0x1c
> --- interrupt: 0 at 0x0
> NIP:  0000000000000000 LR: 0000000000000000 CTR: 0000000000000000
> REGS: c00000000478fe80 TRAP: 0000   Not tainted  (6.6.0-rc2-06327-g52a3bc18f36c)
> MSR:  0000000000000000 <>  CR: 00000000  XER: 00000000
> CFAR: 0000000000000000 IRQMASK: 0 
> GPR00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR12: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR28: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> NIP [0000000000000000] 0x0
> LR [0000000000000000] 0x0
> --- interrupt: 0
> Mem-Info:
> active_anon:0 inactive_anon:0 isolated_anon:0
>  active_file:0 inactive_file:0 isolated_file:0
>  unevictable:0 dirty:0 writeback:0
>  slab_reclaimable:4 slab_unreclaimable:94
>  mapped:0 shmem:0 pagetables:1
>  sec_pagetables:0 bounce:0
>  kernel_misc_reclaimable:0
>  free:31798 free_pcp:10 free_cma:0
> Node 0 active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:0kB writeback_tmp:0kB kernel_stack:272kB pagetables:64kB sec_pagetables:0kB all_unreclaimable? no
> Node 0 Normal free:2035072kB boost:0kB min:0kB low:0kB high:0kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:2097152kB managed:2043904kB mlocked:0kB bounce:0kB free_pcp:640kB local_pcp:640kB free_cma:0kB
> lowmem_reserve[]: 0 0 0
> Node 0 Normal: 4*64kB (M) 5*128kB (UM) 6*256kB (ME) 6*512kB (UME) 6*1024kB (UME) 6*2048kB (UME) 5*4096kB (UME) 5*8192kB (ME) 119*16384kB (M) = 2035072kB
> 0 total pagecache pages
> 0 pages in swap cache
> Free swap  = 0kB
> Total swap = 0kB
> 32768 pages RAM
> 0 pages HighMem/MovableOnly
> 832 pages reserved
> 0 pages cma reserved
> 
> Introduced by commit (via bisection)
> 
>   2d278773305d ("powerpc: extend execmem_params for kprobes allocations")

This fixes this commit:

diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
index bf2c62aef628..e4ecee1c87ef 100644
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@ -138,8 +138,8 @@ struct execmem_params __init *execmem_arch_params(void)
 
 	range->pgprot = prot;
 
-	execmem_params.ranges[EXECMEM_KPROBES].start = VMALLOC_START;
-	execmem_params.ranges[EXECMEM_KPROBES].start = VMALLOC_END;
+	execmem_params.ranges[EXECMEM_KPROBES].start = range->start;
+	execmem_params.ranges[EXECMEM_KPROBES].end = range->end;
 
 	if (strict_module_rwx_enabled())
 		execmem_params.ranges[EXECMEM_KPROBES].pgprot = PAGE_KERNEL_ROX;
 
> I have reverted the following commits for today.
> 
>   be2e02ac422f ("bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of")
>   68f60fd96f9d ("kprobes: remove dependency on CONFIG_MODULES")
>   2177ac117a8e ("x86/ftrace: enable dynamic ftrace without CONFIG_MODULES")
>   3300c3af2009 ("arch: make execmem setup available regardless of CONFIG_MODULES")

And attached is the new version of "arch: make execmem setup available
regardless of CONFIG_MODULES" patch with resolved conflict.

Andrew, please let me know if you'd like me to send these differently. I'd
prefer to wait with v4 to see if there are other fallouts though.

>   2d278773305d ("powerpc: extend execmem_params for kprobes allocations")
> 
> -- 
> Cheers,
> Stephen Rothwell

-- 
Sincerely yours,
Mike.

View attachment "0001-arch-make-execmem-setup-available-regardless-of-CONF.patch" of type "text/x-diff" (33025 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ