Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Peter Zijlstra
On Mon, May 29, 2017 at 02:23:16PM +0200, Peter Zijlstra wrote: > On Mon, May 29, 2017 at 06:39:44AM -0500, Eric W. Biederman wrote: > > I failed to see that there is a refcount_inc. Too much noise in > > the header file I suppose. > > > > But implementing refcount_inc in terms of refcount_inc_no

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Peter Zijlstra
On Mon, May 29, 2017 at 06:39:44AM -0500, Eric W. Biederman wrote: > I failed to see that there is a refcount_inc. Too much noise in > the header file I suppose. > > But implementing refcount_inc in terms of refcount_inc_not_zero is > totally broken. The two operations are not the same and the g

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Peter Zijlstra
On Mon, May 29, 2017 at 05:49:53AM -0500, Eric W. Biederman wrote: > > It changes the semantics between inc_not_zero() and inc(). It also > > complicates the semantics of inc_not_zero(), where currently the failure > > implies the count is 0 and means no-such-object, you complicate matters > > by

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > ebied...@xmission.com (Eric W. Biederman) writes: > >> Peter Zijlstra writes: >> >>> On Mon, May 29, 2017 at 04:11:13AM -0500, Eric W. Biederman wrote: >>> Kees I I have a concern: __must_check bool refcount_add_not_zero(unsigned

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Peter Zijlstra writes: > >> On Mon, May 29, 2017 at 04:11:13AM -0500, Eric W. Biederman wrote: >> >>> Kees I I have a concern: >>> >>> __must_check bool refcount_add_not_zero(unsigned int i, refcount_t *r) >>> { >>> unsigned int new, va

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Eric W. Biederman
Peter Zijlstra writes: > On Mon, May 29, 2017 at 04:11:13AM -0500, Eric W. Biederman wrote: > >> Kees I I have a concern: >> >> __must_check bool refcount_add_not_zero(unsigned int i, refcount_t *r) >> { >> unsigned int new, val = atomic_read(&r->refs); >> >> do { >>

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Peter Zijlstra
On Mon, May 29, 2017 at 04:11:13AM -0500, Eric W. Biederman wrote: > Kees I I have a concern: > > __must_check bool refcount_add_not_zero(unsigned int i, refcount_t *r) > { > unsigned int new, val = atomic_read(&r->refs); > > do { > if (!val) >

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Eric W. Biederman
Christoph Hellwig writes: > On Sat, May 27, 2017 at 12:58:14PM -0700, Kees Cook wrote: >> FAST_REFCOUNT=n: use function-based refcount_t with cmpxvhg and >> full-verification >> FAST_REFCOUNT=y without arch-specific implementation: use atomic_t >> with no verification (i.e. no functional change f

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-29 Thread Christoph Hellwig
On Sat, May 27, 2017 at 12:58:14PM -0700, Kees Cook wrote: > FAST_REFCOUNT=n: use function-based refcount_t with cmpxvhg and > full-verification > FAST_REFCOUNT=y without arch-specific implementation: use atomic_t > with no verification (i.e. no functional change from now) > FAST_REFCOUNT=y with ar

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-05-27 Thread Kees Cook
On Fri, Mar 3, 2017 at 4:23 PM, Andrew Morton wrote: > On Mon, 20 Feb 2017 13:29:46 +0200 Elena Reshetova > wrote: > >> Now when new refcount_t type and API are finally merged >> (see include/linux/refcount.h), the following >> patches convert various refcounters in the ipc susystem from atomic_

RE: [PATCH 0/3] ipc subsystem refcounter conversions

2017-03-06 Thread Reshetova, Elena
> On Mon, 20 Feb 2017 13:29:46 +0200 Elena Reshetova > wrote: > > > Now when new refcount_t type and API are finally merged > > (see include/linux/refcount.h), the following > > patches convert various refcounters in the ipc susystem from atomic_t > > to refcount_t. By doing this we prevent inten

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-03-03 Thread Andrew Morton
On Mon, 20 Feb 2017 13:29:46 +0200 Elena Reshetova wrote: > Now when new refcount_t type and API are finally merged > (see include/linux/refcount.h), the following > patches convert various refcounters in the ipc susystem from atomic_t > to refcount_t. By doing this we prevent intentional or acc

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-02-22 Thread Davidlohr Bueso
On Mon, 20 Feb 2017, Elena Reshetova wrote: include/linux/ipc_namespace.h | 5 +++-- ipc/msgutil.c | 2 +- ipc/namespace.c | 4 ++-- ipc/sem.c | 8 ipc/util.c| 6 +++--- ipc/util.h| 3 ++- 6 files change

RE: [PATCH 0/3] ipc subsystem refcounter conversions

2017-02-20 Thread Reshetova, Elena
> On Mon, Feb 20, 2017 at 1:29 PM, Elena Reshetova > wrote: > > Now when new refcount_t type and API are finally merged > > (see include/linux/refcount.h), the following > > patches convert various refcounters in the ipc susystem from atomic_t > > to refcount_t. By doing this we prevent intentiona

Re: [PATCH 0/3] ipc subsystem refcounter conversions

2017-02-20 Thread Andy Shevchenko
On Mon, Feb 20, 2017 at 1:29 PM, Elena Reshetova wrote: > Now when new refcount_t type and API are finally merged > (see include/linux/refcount.h), the following > patches convert various refcounters in the ipc susystem from atomic_t > to refcount_t. By doing this we prevent intentional or acciden