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: <Pine.LNX.4.64.0706041532350.27125@schroedinger.engr.sgi.com>
Date:	Mon, 4 Jun 2007 15:39:08 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Pekka Enberg <penberg@...helsinki.fi>
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)

On Mon, 4 Jun 2007, Pekka Enberg wrote:

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

Sorry complex situation. Andrew wants the warnings, Linus wants the 
ZERO_SIZE_PTR. Not sure where we are going here.

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

Well so far we agreed to keep the warnings in at least till release data 
and I have not heard differently yet.

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

Heheheh.... Mind boogling isnt it? Patch duplicity....

Seriously: Andrew/Linus could you make up your mind which way we are 
going here? 

I'd say lets drop the DEVELKERNEL stuff and the warnings and go with 
ZERO_SIZE_PTR. The DEVELKERNEL patch has the danger that subtle changes 
occur at release time that we have not anticipated.

-
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