[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120130181639.GJ3355@google.com>
Date: Mon, 30 Jan 2012 10:16:39 -0800
From: Tejun Heo <tj@...nel.org>
To: Christoph Lameter <cl@...ux.com>
Cc: Dmitry Antipov <dmitry.antipov@...aro.org>,
Rusty Russell <rusty@...tcorp.com.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, patches@...aro.org,
linaro-dev@...ts.linaro.org
Subject: Re: [PATCH 1/3] percpu: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR
On Mon, Jan 30, 2012 at 12:12:18PM -0600, Christoph Lameter wrote:
> > I thought it didn't. I rememer thinking about this and determining
> > that NULL can't be allocated for dynamic addresses. Maybe I'm
> > imagining things. Anyways, if it can return NULL for valid
> > allocation, it is a bug and should be fixed.
>
> I dont see anything that would hinder an arbitrary value to be returned.
> NULL is also used for the failure case. Definitely a bug.
Given the address translation we do and kernel image layout, I don't
think this can happen on x86. It may theoretically possible on other
archs tho. Anyways, yeah, this one needs improving.
> > We don't have returned addr >= PAGE_SIZE guarantee yet but I'm fairly
> > sure that's the only acceptable direction if we want any improvement
> > in this area.
>
> The ZERO_SIZE_PTR patch would not make the situation that much worse.
I'm not objecting to marking zero-sized allocations per-se. I'm
saying the patch is pointless at this point. It doesn't contribute
anything while giving the illusion of better error checking than we
actually do. Let's do it when it can actually work.
Thanks.
--
tejun
--
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