Message ID | cover.1535462971.git.andreyknvl@google.com (mailing list archive) |
---|---|
Headers | show |
Series | khwasan: kernel hardware assisted address sanitizer | expand |
On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: > This patchset adds a new mode to KASAN [1], which is called KHWASAN > (Kernel HardWare assisted Address SANitizer). We're at v6 and there are no reviewed-by's or acked-by's to be seen. Is that a fair commentary on what has been happening, or have people been remiss in sending and gathering such things?
On Wed, Sep 5, 2018 at 2:10 PM Andrew Morton <akpm@linux-foundation.org> wrote: > > On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: > > > This patchset adds a new mode to KASAN [1], which is called KHWASAN > > (Kernel HardWare assisted Address SANitizer). > > We're at v6 and there are no reviewed-by's or acked-by's to be seen. > Is that a fair commentary on what has been happening, or have people > been remiss in sending and gathering such things? > I'm anxious to use these for Pixel Android devices. Looks like the series has been aggregating changes from valuable feedback. Maybe if the ARM maintainers and KASAN maintainers could Ack or Nack these, we could decide to merge these or what needs more work?
On Wed, Sep 05, 2018 at 02:10:32PM -0700, Andrew Morton wrote: > On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: > > > This patchset adds a new mode to KASAN [1], which is called KHWASAN > > (Kernel HardWare assisted Address SANitizer). > > We're at v6 and there are no reviewed-by's or acked-by's to be seen. > Is that a fair commentary on what has been happening, or have people > been remiss in sending and gathering such things? I still have concerns about the consequences of merging this as anything other than a debug option [1]. Unfortunately, merging it as a debug option defeats the whole point, so I think we need to spend more effort on developing tools that can help us to find and fix the subtle bugs which will arise from enabling tagged pointers in the kernel. Will [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-August/596077.html
On Thu, Sep 6, 2018 at 12:05 PM, Will Deacon <will.deacon@arm.com> wrote: > On Wed, Sep 05, 2018 at 02:10:32PM -0700, Andrew Morton wrote: >> On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: >> >> > This patchset adds a new mode to KASAN [1], which is called KHWASAN >> > (Kernel HardWare assisted Address SANitizer). >> >> We're at v6 and there are no reviewed-by's or acked-by's to be seen. >> Is that a fair commentary on what has been happening, or have people >> been remiss in sending and gathering such things? > > I still have concerns about the consequences of merging this as anything > other than a debug option [1]. Unfortunately, merging it as a debug option > defeats the whole point, so I think we need to spend more effort on developing > tools that can help us to find and fix the subtle bugs which will arise from > enabling tagged pointers in the kernel. I totally don't mind calling it a debug option. Do I need to somehow specify it somewhere? Why does it defeat the point? The point is to ease KASAN-like testing on devices with limited memory.
On Thu, Sep 6, 2018 at 4:06 AM Andrey Konovalov <andreyknvl@google.com> wrote: > > On Thu, Sep 6, 2018 at 12:05 PM, Will Deacon <will.deacon@arm.com> wrote: > > On Wed, Sep 05, 2018 at 02:10:32PM -0700, Andrew Morton wrote: > >> On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: > >> > >> > This patchset adds a new mode to KASAN [1], which is called KHWASAN > >> > (Kernel HardWare assisted Address SANitizer). > >> > >> We're at v6 and there are no reviewed-by's or acked-by's to be seen. > >> Is that a fair commentary on what has been happening, or have people > >> been remiss in sending and gathering such things? > > > > I still have concerns about the consequences of merging this as anything > > other than a debug option [1]. Unfortunately, merging it as a debug option > > defeats the whole point, so I think we need to spend more effort on developing > > tools that can help us to find and fix the subtle bugs which will arise from > > enabling tagged pointers in the kernel. > > I totally don't mind calling it a debug option. Do I need to somehow > specify it somewhere? > > Why does it defeat the point? The point is to ease KASAN-like testing > on devices with limited memory. I don't disagree with using it strictly for debug. When I say I want the series for Pixel phones, I should have been clearer that my intent is for a limited pool of internal testers to walk around with KHWASAN enabled devices; not general end users. It's hard enough today to get anyone to test KASAN/ASAN on their "daily driver" due to the memory usage and resulting performance. We don't ship KASAN or KUBSAN on by default to end users (nor plan to); it's used strictly for fuzzing through syzkaller (or by brave "dogfooders" on the internal kernel teams). KHWASAN would let these dogfooders go from being brave to fearless.
On 08/29/2018 02:35 PM, Andrey Konovalov wrote: > Andrey Konovalov (18): > khwasan, mm: change kasan hooks signatures > khwasan: move common kasan and khwasan code to common.c > khwasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_HW > khwasan, arm64: adjust shadow size for CONFIG_KASAN_HW > khwasan: initialize shadow to 0xff > khwasan, arm64: untag virt address in __kimg_to_phys and > _virt_addr_is_linear > khwasan: add tag related helper functions > khwasan: preassign tags to objects with ctors or SLAB_TYPESAFE_BY_RCU > khwasan, arm64: fix up fault handling logic > khwasan, arm64: enable top byte ignore for the kernel > khwasan, mm: perform untagged pointers comparison in krealloc > khwasan: split out kasan_report.c from report.c > khwasan: add bug reporting routines > khwasan: add hooks implementation > khwasan, arm64: add brk handler for inline instrumentation > khwasan, mm, arm64: tag non slab memory allocated via pagealloc > khwasan: update kasan documentation > kasan: add SPDX-License-Identifier mark to source files > Aside from nit in 16/18 patch looks fine for me. Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
On Thu, Sep 06, 2018 at 01:06:23PM +0200, Andrey Konovalov wrote: > On Thu, Sep 6, 2018 at 12:05 PM, Will Deacon <will.deacon@arm.com> wrote: > > On Wed, Sep 05, 2018 at 02:10:32PM -0700, Andrew Morton wrote: > >> On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: > >> > >> > This patchset adds a new mode to KASAN [1], which is called KHWASAN > >> > (Kernel HardWare assisted Address SANitizer). > >> > >> We're at v6 and there are no reviewed-by's or acked-by's to be seen. > >> Is that a fair commentary on what has been happening, or have people > >> been remiss in sending and gathering such things? > > > > I still have concerns about the consequences of merging this as anything > > other than a debug option [1]. Unfortunately, merging it as a debug option > > defeats the whole point, so I think we need to spend more effort on developing > > tools that can help us to find and fix the subtle bugs which will arise from > > enabling tagged pointers in the kernel. > > I totally don't mind calling it a debug option. Do I need to somehow > specify it somewhere? Ok, sorry, I completely misunderstood you earlier on then! For some reason I thought you wanted this on by default. In which case, I'm ok with the overall idea as long as we make the caveats clear in the Kconfig text. In particular, that enabling this option may introduce problems relating to pointer casting and comparison, but can offer better coverage and lower memory consumption than a fully software-based KASAN solution. Will
On Fri, Sep 14, 2018 at 5:28 PM, Will Deacon <will.deacon@arm.com> wrote: > On Thu, Sep 06, 2018 at 01:06:23PM +0200, Andrey Konovalov wrote: >> On Thu, Sep 6, 2018 at 12:05 PM, Will Deacon <will.deacon@arm.com> wrote: >> > On Wed, Sep 05, 2018 at 02:10:32PM -0700, Andrew Morton wrote: >> >> On Wed, 29 Aug 2018 13:35:04 +0200 Andrey Konovalov <andreyknvl@google.com> wrote: >> >> >> >> > This patchset adds a new mode to KASAN [1], which is called KHWASAN >> >> > (Kernel HardWare assisted Address SANitizer). >> >> >> >> We're at v6 and there are no reviewed-by's or acked-by's to be seen. >> >> Is that a fair commentary on what has been happening, or have people >> >> been remiss in sending and gathering such things? >> > >> > I still have concerns about the consequences of merging this as anything >> > other than a debug option [1]. Unfortunately, merging it as a debug option >> > defeats the whole point, so I think we need to spend more effort on developing >> > tools that can help us to find and fix the subtle bugs which will arise from >> > enabling tagged pointers in the kernel. >> >> I totally don't mind calling it a debug option. Do I need to somehow >> specify it somewhere? > > Ok, sorry, I completely misunderstood you earlier on then! For some reason > I thought you wanted this on by default. > > In which case, I'm ok with the overall idea as long as we make the caveats > clear in the Kconfig text. In particular, that enabling this option may > introduce problems relating to pointer casting and comparison, but can > offer better coverage and lower memory consumption than a fully > software-based KASAN solution. Great! I'll explicitly call it debug feature and mention the caveats in v7. Thanks!