[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1295479952.1952.59.camel@Joe-Laptop>
Date: Wed, 19 Jan 2011 15:32:32 -0800
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Dan Rosenberg <drosenberg@...curity.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vsprintf: Neaten %pK kptr_restrict, save a bit of code
space
On Wed, 2011-01-19 at 15:16 -0800, Andrew Morton wrote:
> On Wed, 19 Jan 2011 15:11:02 -0800
> Joe Perches <joe@...ches.com> wrote:
> > On Wed, 2011-01-19 at 14:50 -0800, Andrew Morton wrote:
> > > On Thu, 13 Jan 2011 12:21:12 -0800
> > > Joe Perches <joe@...ches.com> wrote:
> > > > If kptr restrictions are on, just set the passed pointer to NULL.
> > > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> > []
> > > > + if (!((kptr_restrict == 0) ||
> > > > + (kptr_restrict == 1 &&
> > > > + has_capability_noaudit(current, CAP_SYSLOG))))
> > > > + ptr = NULL;
> > > > + break;
> > > This hurts my brain. Does it work?
> > Some say mentally challenging puzzles help deter/delay
> > onset of cognitive decline/Alzheimer's. See: www.dakim.com
> That wasn't the bit which hurt.
Sure.
> You still haven't told me if it works. How thoroughly was it tested?
Very lightly (x86 only).
It's a logic only change.
cheers, Joe
--
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