Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1573534
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] refcount_t: A special purpose refcount type |
| Date | 2017-02-04 00:40 +0100 |
| Message-ID | <t6VCq-c7-19@gated-at.bofh.it> (permalink) |
| References | <t6MfM-29e-5@gated-at.bofh.it> <t6MfM-29e-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Feb 3, 2017 at 5:25 AM, Peter Zijlstra <peterz@infradead.org> wrote: > Provide refcount_t, an atomic_t like primitive built just for > refcounting. > > It provides saturation semantics such that overflow becomes impossible > and thereby 'spurious' use-after-free is avoided. > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > --- > include/linux/refcount.h | 294 +++++++++++++++++++++++++++++++++++++++++++++++ > lib/Kconfig.debug | 13 ++ > 2 files changed, 307 insertions(+) > > --- /dev/null > +++ b/include/linux/refcount.h > @@ -0,0 +1,294 @@ > [...] > +#if CONFIG_DEBUG_REFCOUNT Oh, and I just hit this too, it should be "#ifdef" ... I didn't notice until after I sent my improvement series. Whoops. :P Yay Friday. -Kees -- Kees Cook Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] refcount_t and various related bits Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
[PATCH 4/5] atomic: Introduce atomic_try_cmpxchg() Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
Re: [PATCH 4/5] atomic: Introduce atomic_try_cmpxchg() Boqun Feng <boqun.feng@gmail.com> - 2017-02-06 05:30 +0100
Re: [PATCH 4/5] atomic: Introduce atomic_try_cmpxchg() Boqun Feng <boqun.feng@gmail.com> - 2017-02-06 07:40 +0100
Re: [PATCH 4/5] atomic: Introduce atomic_try_cmpxchg() Peter Zijlstra <peterz@infradead.org> - 2017-02-06 09:20 +0100
[PATCH 2/5] kref: Implement using refcount_t Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
Re: [PATCH 2/5] kref: Implement using refcount_t Greg KH <gregkh@linuxfoundation.org> - 2017-02-06 14:10 +0100
[PATCH 5/5] refcount: Use atomic_try_cmpxchg() Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
[PATCH 1/5] refcount_t: A special purpose refcount type Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
Re: [PATCH 1/5] refcount_t: A special purpose refcount type Kees Cook <keescook@chromium.org> - 2017-02-03 19:10 +0100
Re: [PATCH 1/5] refcount_t: A special purpose refcount type Kees Cook <keescook@chromium.org> - 2017-02-04 00:40 +0100
[PATCH 3/5] x86: Implement __WARN using UD2 Peter Zijlstra <peterz@infradead.org> - 2017-02-03 14:40 +0100
csiph-web