Re: [PATCH v3 04/11] drivers/base/devcoredump: convert devcd_count to counter_atomic32

2020-10-09 Thread Peter Zijlstra
On Fri, Oct 09, 2020 at 09:55:59AM -0600, Shuah Khan wrote: > counter_atomic* is introduced to be used when a variable is used as > a simple counter and doesn't guard object lifetimes. This clearly > differentiates atomic_t usages that guard object lifetimes. > > counter_atomic* variables wrap aro

Re: [PATCH v3 04/11] drivers/base/devcoredump: convert devcd_count to counter_atomic32

2020-10-09 Thread Kees Cook
On Fri, Oct 09, 2020 at 09:55:59AM -0600, Shuah Khan wrote: > counter_atomic* is introduced to be used when a variable is used as > a simple counter and doesn't guard object lifetimes. This clearly > differentiates atomic_t usages that guard object lifetimes. > > counter_atomic* variables wrap aro

[PATCH v3 04/11] drivers/base/devcoredump: convert devcd_count to counter_atomic32

2020-10-09 Thread Shuah Khan
counter_atomic* is introduced to be used when a variable is used as a simple counter and doesn't guard object lifetimes. This clearly differentiates atomic_t usages that guard object lifetimes. counter_atomic* variables wrap around to INT_MIN when it overflows and should not be used to guard resou