From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] mm: Remove ZERO_SIZE_PTR.
Date: Fri, 26 Feb 2010 17:44:55 +0900 (JST) [thread overview]
Message-ID: <20100226174131.8DA9.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <201002260838.o1Q8cfr2068194@www262.sakura.ne.jp>
> KOSAKI Motohiro wrote:
> > > Therefore, at the cost of being unable to distinguish "NULL pointer
> > > dereference" and "ZERO_SIZE_PTR dereference" in some cases, removing
> > > ZERO_SIZE_PTR could reduce the risk of "ZERO_SIZE_PTR dereference" in many
> > > cases.
> >
> > NAK. yes, it could. but it is no worth. nobody want slower kernel.
> >
> This patch simplifies error checks of both callers/callees from
>
> ((unsigned long)(x) <= (unsigned long) 16)
>
> to
>
> !(x)
>
> . Why this patch makes the kernel slower?
You misunderstand your patch's effect. you try to change kmalloc
semantics. currently kmalloc(0) is valid and allowed. but you want
to change invalid. then, we need additional check into the caller of
using kmalloc(0). there is in real world.
IOW, your patch is broken and introduce incompatibility.
next prev parent reply other threads:[~2010-02-26 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 6:35 Tetsuo Handa
2010-02-26 6:59 ` KOSAKI Motohiro
2010-02-26 8:38 ` Tetsuo Handa
2010-02-26 8:44 ` KOSAKI Motohiro [this message]
2010-02-26 18:23 ` David Wagner
2010-02-26 7:26 ` David Wagner
2010-02-26 16:39 ` Christoph Lameter
2010-02-27 0:59 ` Tetsuo Handa
2010-03-03 21:54 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100226174131.8DA9.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®