Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-20 Thread Kees Cook
On Thu, Jul 20, 2017 at 5:34 AM, Eric W. Biederman wrote: > Ingo Molnar writes: > >> * Andrew Morton wrote: >> >>> On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso >>> wrote: >>> >>> > On Wed, 19 Jul 2017, Andrew Morton wrote: >>> > >>> > >I do rather dislike these conversions from the point

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-20 Thread Eric W. Biederman
Ingo Molnar writes: > * Andrew Morton wrote: > >> On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso wrote: >> >> > On Wed, 19 Jul 2017, Andrew Morton wrote: >> > >> > >I do rather dislike these conversions from the point of view of >> > >performance overhead and general code bloat. But I se

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-20 Thread Ingo Molnar
* Andrew Morton wrote: > On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso wrote: > > > On Wed, 19 Jul 2017, Andrew Morton wrote: > > > > >I do rather dislike these conversions from the point of view of > > >performance overhead and general code bloat. But I seem to have lost > > >that stru

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Kees Cook
On Wed, Jul 19, 2017 at 4:20 PM, Kees Cook wrote: > On Wed, Jul 19, 2017 at 4:11 PM, Davidlohr Bueso wrote: >> May I suggest using mmtests with the following config file: >> >> https://github.com/gormanm/mmtests/blob/7e070a810bc0af92e592e5121d0ea75fada51aeb/configs/config-global-dhp__workload-ipc

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Kees Cook
On Wed, Jul 19, 2017 at 4:11 PM, Davidlohr Bueso wrote: > On Wed, 19 Jul 2017, Andrew Morton wrote: > >> On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso >> wrote: >> >>> On Wed, 19 Jul 2017, Andrew Morton wrote: >>> >>> >I do rather dislike these conversions from the point of view of >>> >perf

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Davidlohr Bueso
On Wed, 19 Jul 2017, Andrew Morton wrote: On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso wrote: On Wed, 19 Jul 2017, Andrew Morton wrote: >I do rather dislike these conversions from the point of view of >performance overhead and general code bloat. But I seem to have lost >that struggle

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Andrew Morton
On Wed, 19 Jul 2017 15:54:27 -0700 Davidlohr Bueso wrote: > On Wed, 19 Jul 2017, Andrew Morton wrote: > > >I do rather dislike these conversions from the point of view of > >performance overhead and general code bloat. But I seem to have lost > >that struggle and I don't think any of these are

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Davidlohr Bueso
On Wed, 19 Jul 2017, Andrew Morton wrote: I do rather dislike these conversions from the point of view of performance overhead and general code bloat. But I seem to have lost that struggle and I don't think any of these are fastpath(?). Well, since we now have fd25d19 (locking/refcount: Creat

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-19 Thread Andrew Morton
On Sun, 09 Jul 2017 16:59:55 -0500 ebied...@xmission.com (Eric W. Biederman) wrote: > Elena Reshetova writes: > > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter o

RE: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-12 Thread Reshetova, Elena
> "Reshetova, Elena" writes: > > >> "Reshetova, Elena" writes: > >> > >> >> "Reshetova, Elena" writes: > >> >> > >> >> 2>> Elena Reshetova writes: > >> >> >> > >> >> >> > refcount_t type and corresponding API should be > >> >> >> > used instead of atomic_t when the variable is used as > >>

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Eric W. Biederman
"Reshetova, Elena" writes: >> "Reshetova, Elena" writes: >> >> >> "Reshetova, Elena" writes: >> >> >> >> 2>> Elena Reshetova writes: >> >> >> >> >> >> > refcount_t type and corresponding API should be >> >> >> > used instead of atomic_t when the variable is used as >> >> >> > a reference coun

RE: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Reshetova, Elena
> "Reshetova, Elena" writes: > > >> "Reshetova, Elena" writes: > >> > >> 2>> Elena Reshetova writes: > >> >> > >> >> > refcount_t type and corresponding API should be > >> >> > used instead of atomic_t when the variable is used as > >> >> > a reference counter. This allows to avoid accidental >

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Eric W. Biederman
"Reshetova, Elena" writes: >> "Reshetova, Elena" writes: >> >> 2>> Elena Reshetova writes: >> >> >> >> > refcount_t type and corresponding API should be >> >> > used instead of atomic_t when the variable is used as >> >> > a reference counter. This allows to avoid accidental >> >> > refcounter

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Eric W. Biederman
Alexey Dobriyan writes: > On Mon, Jul 10, 2017 at 11:37 AM, Eric W. Biederman > wrote: >> "Reshetova, Elena" writes: >> >> 2>> Elena Reshetova writes: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference cou

RE: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Reshetova, Elena
> "Reshetova, Elena" writes: > > 2>> Elena Reshetova writes: > >> > >> > refcount_t type and corresponding API should be > >> > used instead of atomic_t when the variable is used as > >> > a reference counter. This allows to avoid accidental > >> > refcounter overflows that might lead to use-aft

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Alexey Dobriyan
On Mon, Jul 10, 2017 at 11:37 AM, Eric W. Biederman wrote: > "Reshetova, Elena" writes: > > 2>> Elena Reshetova writes: >>> >>> > refcount_t type and corresponding API should be >>> > used instead of atomic_t when the variable is used as >>> > a reference counter. This allows to avoid accidental

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-10 Thread Eric W. Biederman
"Reshetova, Elena" writes: 2>> Elena Reshetova writes: >> >> > refcount_t type and corresponding API should be >> > used instead of atomic_t when the variable is used as >> > a reference counter. This allows to avoid accidental >> > refcounter overflows that might lead to use-after-free >> > si

RE: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-09 Thread Reshetova, Elena
> Elena Reshetova writes: > > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > situations. > > In this patch you can

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-07-09 Thread Eric W. Biederman
Elena Reshetova writes: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. In this patch you can see all of the use

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-05-28 Thread Manfred Spraul
On 05/27/2017 09:41 PM, Kees Cook wrote: On Mon, Feb 20, 2017 at 3:29 AM, Elena Reshetova wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use

Re: [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t

2017-05-27 Thread Kees Cook
On Mon, Feb 20, 2017 at 3:29 AM, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. > > Signed