[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180712120821.3qw3erubpok5csd7@lakrids.cambridge.arm.com>
Date: Thu, 12 Jul 2018 13:08:21 +0100
From: Mark Rutland <mark.rutland@....com>
To: dsterba@...e.cz, Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org, Will Deacon <will.deacon@....com>,
Boqun Feng <boqun.feng@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] refcount: always allow checked forms
On Wed, Jul 11, 2018 at 07:37:05PM +0200, David Sterba wrote:
> On Wed, Jul 11, 2018 at 06:49:46AM +0100, Mark Rutland wrote:
> > > > Dave pointed out that it would be useful to be able to opt-in to full checks
> > > > regardless of CONFIG_REFCOUNT_FULL, so that we can simplify callsites where we
> > > > always want checks. I've spotted a few of these in code which is still awaiting
> > > > conversion.
> > >
> > > The motivation was code like
> > >
> > > WARN_ON(refcount_read(&ref));
> > > if (refcount_dec_and_test(&ref)) { ... }
> > >
> > > so the warning is redundant for REFCOUNT_FULL, but I'm going to use the
> > > _checked versions everywhere the performance of refcounts is not
> > > critical.
> >
> > If you will have conversion patches, do you want to pick this up as the start
> > of a series?
>
> The patches where I'd use the enhanced refcounts are nice-to-have and I
> don't have an ETA so it would be better if the patch gets merged
> independently. Thanks.
Ok.
Kees, I will leave this to you.
Mark.
Powered by blists - more mailing lists