linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Potapenko <glider@google.com>
To: Marco Elver <elver@google.com>,
	Dmitriy Vyukov <dvyukov@google.com>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Andrey Konovalov <andreyknvl@google.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	 Jann Horn <jannh@google.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Borislav Petkov" <bp@alien8.de>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Christoph Lameter" <cl@linux.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"David Rientjes" <rientjes@google.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Hillf Danton" <hdanton@sina.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	"Jörn Engel" <joern@purestorage.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Pekka Enberg" <penberg@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"SeongJae Park" <sjpark@amazon.com>,
	"Will Deacon" <will@kernel.org>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Linux Memory Management List" <linux-mm@kvack.org>
Subject: Re: [PATCH v7 0/9] KFENCE: A low-overhead sampling-based memory safety error detector
Date: Wed, 4 Nov 2020 16:16:49 +0100	[thread overview]
Message-ID: <CAG_fn=UJJqPiVi-rfih0XTSQOqQ15Pn+c5Ecj-4QKyoT8pRqdA@mail.gmail.com> (raw)
In-Reply-To: <CANpmjNM1HQ_TwqJ6Ad=Mr=oKVnud-qzD=-LhchPAouu1RDHLqw@mail.gmail.com>

On Wed, Nov 4, 2020 at 1:36 PM Marco Elver <elver@google.com> wrote:
>
> On Wed, 4 Nov 2020 at 01:31, Andrew Morton <akpm@linux-foundation.org> wrote:
> > On Tue,  3 Nov 2020 18:58:32 +0100 Marco Elver <elver@google.com> wrote:
> >
> > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a
> > > low-overhead sampling-based memory safety error detector of heap
> > > use-after-free, invalid-free, and out-of-bounds access errors.  This
> > > series enables KFENCE for the x86 and arm64 architectures, and adds
> > > KFENCE hooks to the SLAB and SLUB allocators.
> > >
> > > KFENCE is designed to be enabled in production kernels, and has near
> > > zero performance overhead. Compared to KASAN, KFENCE trades performance
> > > for precision. The main motivation behind KFENCE's design, is that with
> > > enough total uptime KFENCE will detect bugs in code paths not typically
> > > exercised by non-production test workloads. One way to quickly achieve a
> > > large enough total uptime is when the tool is deployed across a large
> > > fleet of machines.
> >
> > Has kfence detected any kernel bugs yet?  What is its track record?
>
> Not yet, but once we deploy in various production kernels, we expect
> to find new bugs (we'll report back with results once deployed).
> Especially in drivers or subsystems that syzkaller+KASAN can't touch,
> e.g. where real devices are required to get coverage. We expect to
> have first results on this within 3 months, and can start backports
> now that KFENCE for mainline is being finalized. This will likely also
> make it into Android, but deployment there will take much longer.
>
> The story is similar with the user space version of the tool
> (GWP-ASan), where results started to materialize once it was deployed
> across the fleet.
>
> > Will a kfence merge permit us to remove some other memory debugging
> > subsystem?  We seem to have rather a lot of them.
>
> Nothing obvious I think. KFENCE is unique in that it is meant for
> production fleets of machines (with ~zero overhead and no new HW
> features), with the caveat that due to it being sampling based, it's
> not so suitable for single machine testing. The other debugging tools
> are suitable for the latter, but not former.

Agreeing with everything Marco said I can only add that it would be
nice to have a separate discussion about the existing memory debugging
subsystems and the need to remove any of them.
Having many tools in a toolbox does not hurt, but we need to ensure
that all the tools in question are visible to the users (so that
people know when and how to use them), can find important bugs and do
not duplicate each other.


> Thanks,
> -- Marco



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg


      reply	other threads:[~2020-11-04 15:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 17:58 Marco Elver
2020-11-03 17:58 ` [PATCH v7 1/9] mm: add Kernel Electric-Fence infrastructure Marco Elver
2020-11-03 22:17   ` Jann Horn
2020-11-03 17:58 ` [PATCH v7 2/9] x86, kfence: enable KFENCE for x86 Marco Elver
2020-11-03 22:17   ` Jann Horn
2020-11-03 17:58 ` [PATCH v7 3/9] arm64, kfence: enable KFENCE for ARM64 Marco Elver
2020-11-03 22:17   ` Jann Horn
2020-11-04 13:06   ` Mark Rutland
2020-11-04 14:23     ` Marco Elver
2020-11-04 14:56       ` Mark Rutland
2020-11-03 17:58 ` [PATCH v7 4/9] mm, kfence: insert KFENCE hooks for SLAB Marco Elver
2020-11-03 17:58 ` [PATCH v7 5/9] mm, kfence: insert KFENCE hooks for SLUB Marco Elver
2020-11-03 17:58 ` [PATCH v7 6/9] kfence, kasan: make KFENCE compatible with KASAN Marco Elver
2020-11-03 17:58 ` [PATCH v7 7/9] kfence, Documentation: add KFENCE documentation Marco Elver
2020-11-03 22:17   ` Jann Horn
2020-11-03 17:58 ` [PATCH v7 8/9] kfence: add test suite Marco Elver
2020-11-03 22:17   ` Jann Horn
2020-11-03 17:58 ` [PATCH v7 9/9] MAINTAINERS: add entry for KFENCE Marco Elver
2020-11-04  0:31 ` [PATCH v7 0/9] KFENCE: A low-overhead sampling-based memory safety error detector Andrew Morton
2020-11-04 12:36   ` Marco Elver
2020-11-04 15:16     ` Alexander Potapenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG_fn=UJJqPiVi-rfih0XTSQOqQ15Pn+c5Ecj-4QKyoT8pRqdA@mail.gmail.com' \
    --to=glider@google.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=elver@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdanton@sina.com \
    --cc=hpa@zytor.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jannh@google.com \
    --cc=joern@purestorage.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=sjpark@amazon.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox