Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-12 Thread Marco Elver
[ Sorry for delay, just noticed this one doesn't have a reply yet. ] On Sat, 3 Oct 2020 at 00:27, Jann Horn wrote: > On Fri, Oct 2, 2020 at 11:28 PM Marco Elver wrote: > > On Fri, 2 Oct 2020 at 21:32, Jann Horn wrote: > > > > That's another check; we don't want to make this more expensive. > >

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-05 Thread Marco Elver
On Fri, 2 Oct 2020 at 20:28, Jann Horn wrote: [...] > > > > > > Do you have performance numbers or a description of why you believe > > > that this part of kfence is exceptionally performance-sensitive? If > > > not, it might be a good idea to remove this optimization, at least for > > > the initi

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Jann Horn
On Fri, Oct 2, 2020 at 11:28 PM Marco Elver wrote: > On Fri, 2 Oct 2020 at 21:32, Jann Horn wrote: > > > That's another check; we don't want to make this more expensive. > > > > Ah, right, I missed that this is the one piece of KFENCE that is > > actually really hot code until Dmitry pointed that

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Marco Elver
On Fri, 2 Oct 2020 at 21:32, Jann Horn wrote: > > That's another check; we don't want to make this more expensive. > > Ah, right, I missed that this is the one piece of KFENCE that is > actually really hot code until Dmitry pointed that out. > > But actually, can't you reduce how hot this is for

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Marco Elver
On Fri, Oct 02, 2020 at 09:31PM +0200, Jann Horn wrote: [...] > > > > > > If !CONFIG_HAVE_ARCH_KFENCE_STATIC_POOL, this should probably always > > > return false if __kfence_pool is NULL, right? > > > > That's another check; we don't want to make this more expensive. > > Ah, right, I missed that t

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Jann Horn
On Fri, Oct 2, 2020 at 7:20 PM Marco Elver wrote: > On Fri, Oct 02, 2020 at 08:33AM +0200, Jann Horn wrote: > > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote: > > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a > > > low-overhead sampling-based memory safety error d

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Jann Horn
On Fri, Oct 2, 2020 at 4:23 PM Dmitry Vyukov wrote: > On Fri, Oct 2, 2020 at 9:54 AM Jann Horn wrote: > > On Fri, Oct 2, 2020 at 8:33 AM Jann Horn wrote: > > > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote: > > > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a > >

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Marco Elver
Hi Jann, Thanks for your comments!! On Fri, Oct 02, 2020 at 08:33AM +0200, Jann Horn wrote: > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote: > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a > > low-overhead sampling-based memory safety error detector of heap > > u

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Mark Rutland
On Fri, Oct 02, 2020 at 04:22:59PM +0200, Dmitry Vyukov wrote: > On Fri, Oct 2, 2020 at 9:54 AM Jann Horn wrote: > > > > On Fri, Oct 2, 2020 at 8:33 AM Jann Horn wrote: > > > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote: > > > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. K

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Dmitry Vyukov
On Fri, Oct 2, 2020 at 9:54 AM Jann Horn wrote: > > On Fri, Oct 2, 2020 at 8:33 AM Jann Horn wrote: > > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver wrote: > > > This adds the Kernel Electric-Fence (KFENCE) infrastructure. KFENCE is a > > > low-overhead sampling-based memory safety error detector

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-02 Thread Jann Horn
On Fri, Oct 2, 2020 at 8:33 AM Jann Horn wrote: > On Tue, Sep 29, 2020 at 3:38 PM Marco Elver 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-bound

Re: [PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-10-01 Thread Jann Horn
On Tue, Sep 29, 2020 at 3:38 PM Marco Elver 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. > > KFENCE is designed to be enabled in

[PATCH v4 01/11] mm: add Kernel Electric-Fence infrastructure

2020-09-29 Thread Marco Elver
From: Alexander Potapenko 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. KFENCE is designed to be enabled in production kernels, and has near