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]
Message-ID: <CAAmzW4MhCyYkdpOaHnJtoMoJeFsXQJXN=Cpo3s67=s+id-hrMg@mail.gmail.com>
Date:	Fri, 28 Dec 2012 23:42:24 +0900
From:	JoonSoo Kim <js1304@...il.com>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>,
	"David S. Miller" <davem@...emloft.net>, Tejun Heo <tj@...nel.org>,
	Yinghai Lu <yinghai@...nel.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even if
 slab is available

Hello, Sasha.

2012/12/28 Sasha Levin <sasha.levin@...cle.com>:
> On 12/27/2012 06:04 PM, David Rientjes wrote:
>> On Thu, 27 Dec 2012, Sasha Levin wrote:
>>
>>> That's exactly what happens with the patch. Note that in the current upstream
>>> version there are several slab checks scattered all over.
>>>
>>> In this case for example, I'm removing it from __alloc_bootmem_node(), but the
>>> first code line of__alloc_bootmem_node_nopanic() is:
>>>
>>>         if (WARN_ON_ONCE(slab_is_available()))
>>>                 return kzalloc(size, GFP_NOWAIT);
>>>
>>
>> You're only talking about mm/bootmem.c and not mm/nobootmem.c, and notice
>> that __alloc_bootmem_node() does not call __alloc_bootmem_node_nopanic(),
>> it calls ___alloc_bootmem_node_nopanic().
>
> Holy cow, this is an underscore hell.
>
>
> Thanks,
> Sasha
>

I have a different idea.
How about removing fallback allocation in bootmem.c completely?
I don't know why it is there exactly.
But, warning for 'slab_is_available()' is there for a long time.
So, most people who misuse fallback allocation change their code adequately.
I think that removing fallback at this time is valid. Isn't it?

Fallback allocation may cause possible bug.
If someone free a memory from fallback allocation,
it can't be handled properly.

So, IMHO, at this time, we should remove fallback allocation in
bootmem.c entirely.
Please let me know what I misunderstand.

Thanks.
--
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