Re: [PATCH] refcount: always allow checked forms

2018-07-12 Thread Mark Rutland
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

Re: [PATCH] refcount: always allow checked forms

2018-07-11 Thread David Sterba
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 i

Re: [PATCH] refcount: always allow checked forms

2018-07-10 Thread Mark Rutland
On Wed, Jul 04, 2018 at 10:46:41AM +0200, David Sterba wrote: > On Tue, Jul 03, 2018 at 11:01:02AM +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 dupl

Re: [PATCH] refcount: always allow checked forms

2018-07-10 Thread Mark Rutland
On Tue, Jul 03, 2018 at 11:30:38AM -0700, Kees Cook wrote: > On Tue, Jul 3, 2018 at 3:01 AM, 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 warnin

Re: [PATCH] refcount: always allow checked forms

2018-07-04 Thread David Sterba
On Tue, Jul 03, 2018 at 11:01:02AM +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 manipulati

Re: [PATCH] refcount: always allow checked forms

2018-07-03 Thread Kees Cook
On Tue, Jul 3, 2018 at 3:01 AM, 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. > > T

Re: [PATCH] refcount: always allow checked forms

2018-07-03 Thread Mark Rutland
On Tue, Jul 03, 2018 at 12:33:20PM +0200, Andrea Parri wrote: > Hi Mark, > > a typo below: > > > > /** > > - * refcount_inc - increment a refcount > > + * refcount_inc_checked - increment a refcount > > * @r: the refcount to increment > > * > > * Similar to atomic_inc(), but will saturate

Re: [PATCH] refcount: always allow checked forms

2018-07-03 Thread Andrea Parri
Hi Mark, a typo below: > /** > - * refcount_inc - increment a refcount > + * refcount_inc_checked - increment a refcount > * @r: the refcount to increment > * > * Similar to atomic_inc(), but will saturate at UINT_MAX and WARN. > @@ -148,14 +146,14 @@ EXPORT_SYMBOL(refcount_inc_not_zero);

[PATCH] refcount: always allow checked forms

2018-07-03 Thread Mark Rutland
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 w