public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David Sterba <dsterba@suse.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCHv2] refcount: always allow checked forms
Date: Thu, 12 Jul 2018 23:34:58 +0200	[thread overview]
Message-ID: <20180712213458.GA14004@gmail.com> (raw)
In-Reply-To: <CAGXu5j+hfVmB_+wPn=-hx3w+sNoKQBRLAbf2M0WrNY3Y+tYCQQ@mail.gmail.com>


* Kees Cook <keescook@chromium.org> wrote:

> On Thu, Jul 12, 2018 at 10:01 AM, Will Deacon <will.deacon@arm.com> wrote:
> > On Wed, Jul 11, 2018 at 10:36:07AM +0100, Mark Rutland wrote:
> >> In many cases, it would be useful to be able to use the full
> >> sanity-checked refcount helpers regardless of CONFIG_REFCOUNT_FULL, as
> >> this would help to avoid duplicate warnings where callers try to
> >> sanity-check refcount manipulation.
> >>
> >> This patch refactors things such that the full refcount helpers were
> >> always built, as refcount_${op}_checked(), such that they can be used
> >> regardless of CONFIG_REFCOUNT_FULL. This will allow code which *always*
> >> wants a checked refcount to opt-in, avoiding the need to duplicate the
> >> logic for warnings.
> >>
> >> There should be no functional change as a result of this patch.
> >>
> >> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> >> Acked-by: Kees Cook <keescook@chromium.org>
> >> Reviewed-by: David Sterba <dsterba@suse.com>
> >> Cc: Boqun Feng <boqun.feng@gmail.com>
> >> Cc: Ingo Molnar <mingo@kernel.org>
> >> Cc: Peter Zijlstra <peterz@infradead.org>
> >> Cc: Will Deacon <will.deacon@arm.com>
> >> ---
> >>  include/linux/refcount.h | 27 +++++++++++++++++-------
> >>  lib/refcount.c           | 53 +++++++++++++++++++++++-------------------------
> >>  2 files changed, 45 insertions(+), 35 deletions(-)
> >
> > Looks good to me:
> >
> > Acked-by: Will Deacon <will.deacon@arm.com>
> 
> Peter, Ingo, can this go via the atomics tree? That's been the
> traditional location for the refcount patches.

Sure, will have a look tomorrow!

	Ingo

  reply	other threads:[~2018-07-12 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  9:36 [PATCHv2] refcount: always allow checked forms Mark Rutland
2018-07-12 17:01 ` Will Deacon
2018-07-12 19:50   ` Kees Cook
2018-07-12 21:34     ` Ingo Molnar [this message]
2018-07-13 13:39 ` [tip:locking/core] locking/refcount: Always " tip-bot for Mark Rutland

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=20180712213458.GA14004@gmail.com \
    --to=mingo@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=dsterba@suse.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /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