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: <46646747.2080803@cs.helsinki.fi>
Date:	Mon, 04 Jun 2007 22:25:59 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Christoph Lameter <clameter@....com>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)

Christoph Lameter wrote:
> That is another patchset. See 
> http://marc.info/?l=linux-kernel&w=2&r=1&s=DEVELKERNEL&q=b

Oh my, I am totally confused now.

First you fix kmalloc(0) to be legal and safe. And then you want to 
DEVEL_WARN_ON_ONCE when size is zero so people can fix their code?

I don't get it.

I thought we wanted to support kmalloc(0) so that as long as you don't 
dereference the pointer, it's all legal and good. Right? So we obviously 
should shut up the WARN_ON because if you do oops, you can clearly see 
that it happened at ZERO_SIZE_PTR and have a nice stack trace anyway...

Btw, if I am again missing something totally obvious, could you please 
be so kind to send me a batch of the same pills that the smart people 
take. I am all out.

			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