[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190618091811.GC2790@e103592.cambridge.arm.com>
Date: Tue, 18 Jun 2019 10:18:12 +0100
From: Dave Martin <Dave.Martin@....com>
To: Kees Cook <keescook@...omium.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Mark Rutland <mark.rutland@....com>, kvm@...r.kernel.org,
Christian Koenig <Christian.Koenig@....com>,
Szabolcs Nagy <Szabolcs.Nagy@....com>,
Will Deacon <will.deacon@....com>,
dri-devel@...ts.freedesktop.org,
Kostya Serebryany <kcc@...gle.com>,
Khalid Aziz <khalid.aziz@...cle.com>,
Lee Smith <Lee.Smith@....com>, linux-kselftest@...r.kernel.org,
Vincenzo Frascino <vincenzo.frascino@....com>,
Jacob Bramley <Jacob.Bramley@....com>,
Leon Romanovsky <leon@...nel.org>, linux-rdma@...r.kernel.org,
amd-gfx@...ts.freedesktop.org,
Christoph Hellwig <hch@...radead.org>,
Jason Gunthorpe <jgg@...pe.ca>,
Dmitry Vyukov <dvyukov@...gle.com>,
Evgeniy Stepanov <eugenis@...gle.com>,
linux-media@...r.kernel.org,
Ruben Ayrapetyan <Ruben.Ayrapetyan@....com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Kevin Brodsky <kevin.brodsky@....com>,
Alex Williamson <alex.williamson@...hat.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felix Kuehling <Felix.Kuehling@....com>,
linux-kernel@...r.kernel.org,
Jens Wiklander <jens.wiklander@...aro.org>,
Ramana Radhakrishnan <Ramana.Radhakrishnan@....com>,
Alexander Deucher <Alexander.Deucher@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
enh <enh@...gle.com>, Robin Murphy <robin.murphy@....com>,
Yishai Hadas <yishaih@...lanox.com>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control
the tagged user addresses ABI
On Thu, Jun 13, 2019 at 10:13:54PM -0700, Kees Cook wrote:
> On Thu, Jun 13, 2019 at 04:26:32PM +0100, Catalin Marinas wrote:
> > On Thu, Jun 13, 2019 at 12:02:35PM +0100, Dave P Martin wrote:
> > > On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote:
> > > > +static int zero;
> > > > +static int one = 1;
> > >
> > > !!!
> > >
> > > And these can't even be const without a cast. Yuk.
> > >
> > > (Not your fault though, but it would be nice to have a proc_dobool() to
> > > avoid this.)
> >
> > I had the same reaction. Maybe for another patch sanitising this pattern
> > across the kernel.
>
> That's actually already happening (via -mm tree last I looked). tl;dr:
> it ends up using a cast hidden in a macro. It's in linux-next already
> along with a checkpatch.pl addition to yell about doing what's being
> done here. ;)
>
> https://lore.kernel.org/lkml/20190430180111.10688-1-mcroce@redhat.com/#r
Hmmm, that is marginally less bad.
Ideally we'd have a union in there, not just a bunch of void *. I may
look at that someday...
Cheers
---Dave
Powered by blists - more mailing lists