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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Feb 2010 15:29:34 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	"H. Peter Anvin" <hpa@...or.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 16/35] x86: make 64 bit use early_res instead of bootmem
 before slab

On 02/24/2010 02:59 PM, Peter Zijlstra wrote:
> On Tue, 2010-02-16 at 17:16 -0800, Yinghai Lu wrote:
> 
>> Subject: [PATCH -v3 16/35] x86: make 64 bit use early_res instead of bootmem before slab
>>
>> finally we can use early_res to replace bootmem for x86_64 now.
>>
>> still can use CONFIG_NO_BOOTMEM to enable it or not
>>
>> -v2: fix 32bit compiling about MAX_DMA32_PFN
>> -v3: fix PPC compiling
>> | mm/page_alloc.c:3468: error: implicit declaration of function 'find_early_area'
>> | mm/page_alloc.c:3483: error: implicit declaration of function 'reserve_early_without_check'
>>
>> | actually the function is only needed for no_bootmem
>>
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> 
> This makes my machine unhappy and panic.. machine works fine with
> CONFIG_NO_BOOTMEM=n
> 
> Kernel panic - not syncing: free_early on not reserved area: 2f80000-2f9ffff!
> Pid: 0, comm: swapper Not tainted 2.6.33-rc8-tip-00918-gb34d361 #159
> Call Trace:	
>  [<ffffffff815d12e2>] panic+0x84/0x147
>  [<ffffffff81cceecb>] free_early+0x64/0x6d
>  [<ffffffff81cd2231>] free_bootmem+0xc/0xe
>  [<ffffffff81cc1cd6>] pcpu_fc_free+0x1d/0x1f
>  [<ffffffff81cd6056>] pcpu_embed_first_chunk+0x13a/0x27f
>  [<ffffffff81cc1cd8>] ? pcpu_fc_alloc+0x0/0xac
>  [<ffffffff81cc1cb9>] ? pcpu_fc_free+0x0/0x1f
>  [<ffffffff81cc1af7>] setup_per_cpu_areas+0x82/0x239
>  [<ffffffff81cb5b3c>] start_kernel+0x1b8/0x43b
>  [<ffffffff81cb52bc>] x86_64_start_reservations+0xa7/0xab
>  [<ffffffff81cb53b8>] x86_64_start_kernel+0xf8/0x107
> 

we can not handle partial free, and current only user for that is pcpu_setup...

please check this debug patch

diff --git a/mm/percpu.c b/mm/percpu.c
index 841defe..6aa6d8d 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1923,8 +1923,10 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, ssize_t dyn_size,
 
 		for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) {
 			if (gi->cpu_map[i] == NR_CPUS) {
+#ifndef CONFIG_NO_BOOTMEM
 				/* unused unit, free whole */
 				free_fn(ptr, ai->unit_size);
+#endif
 				continue;
 			}
 			/* copy and return the unused part */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ