|
Message-ID: <CAGXu5jL3fW+8_NMMw--Q2v3ZT_nXX=RyKVQ=9_HnBadkL+HNfw@mail.gmail.com> Date: Fri, 3 Feb 2017 10:09:18 -0800 From: Kees Cook <keescook@...omium.org> To: Peter Zijlstra <peterz@...radead.org> Cc: "Reshetova, Elena" <elena.reshetova@...el.com>, Greg KH <gregkh@...uxfoundation.org>, Arnd Bergmann <arnd@...db.de>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>, "H. Peter Anvin" <h.peter.anvin@...el.com>, Will Deacon <will.deacon@....com>, David Windsor <dwindsor@...il.com>, David Howells <dhowells@...hat.com>, LKML <linux-kernel@...r.kernel.org>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com> Subject: Re: [PATCH 1/5] refcount_t: A special purpose refcount type On Fri, Feb 3, 2017 at 5:25 AM, Peter Zijlstra <peterz@...radead.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. Wheee :) Thanks for working on this > > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org> > --- > [...] > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -716,6 +716,19 @@ source "lib/Kconfig.kmemcheck" > > source "lib/Kconfig.kasan" > > +config DEBUG_REFCOUNT > + bool "Verbose refcount checks" > + --help-- Quick feedback as I start playing with this: this isn't valid Kconfig syntax (build breaks). It should either be "---help---" or just "help", latter preferred. > + Say Y here if you want reference counters (refcount_t and kref) to > + generate WARNs on dubious usage. Without this refcount_t will still > + be a saturating counter and avoid Use-After-Free by turning it into > + a resource leak Denial-Of-Service. > + > + Use of this option will increase kernel text size but will alert the > + admin of potential abuse. > + > + If in doubt, say "N". > + > endmenu # "Memory Debugging" > > config ARCH_HAS_KCOV > > -Kees -- Kees Cook Pixel Security
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.