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: <4A326ECB.3070607@cs.helsinki.fi>
Date:	Fri, 12 Jun 2009 18:05:47 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	linux-mm@...ck.org, linux-kernel@...r.kernel.org, mingo@...e.hu,
	npiggin@...e.de, benh@...nel.crashing.org,
	akpm@...ux-foundation.org, cl@...ux-foundation.org
Subject: Re: [PATCH v2] slab,slub: ignore __GFP_WAIT if we're booting or suspending

Hi Linus,

Linus Torvalds wrote:
> 
> On Fri, 12 Jun 2009, Pekka J Enberg wrote:
>>  
>> +	if (system_state != SYSTEM_RUNNING)
>> +		local_flags &= ~__GFP_WAIT;
>> +
>> +	might_sleep_if(local_flags & __GFP_WAIT);
> 
> This is pointless.
> 
> You're doing the "might_sleep_if()" way too late. At that point, you've 
> already lost 99% of all coverage, since now none of the cases of just 
> finding a free slab entry on the list will ever trigger that 
> "might_sleep()" case.
> 
> So you need to do this _early_, at the entry-point, not late, at cache 
> re-fill time.
> 
> So rather than removing the might_sleep_if() at the early point, and then 
> moving it to this late stage (because you only do the local_flags fixups 
> late), you need to move the local-flags fixup early instead, and do the 
> might_sleep_it() there.
> 
> The whole point of "might_sleep()" is that it triggers every time if 
> something is called in the wrong context - not just for the cases where it 
> actually _does_ sleep.

OK, makes sense. So what do you think of this patch then:

http://patchwork.kernel.org/patch/29733/

It's what Ben has been proposing all along in a slightly edited form.

			Pekka
--
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