Re: [PATCH v2] kasan: fix kasan_byte_accessible() to be consistent with actual checks

2021-04-05 Thread Marco Elver
On Tue, 6 Apr 2021 at 00:43, Andrey Konovalov wrote: > On Tue, Apr 6, 2021 at 12:07 AM Peter Collingbourne wrote: > > > > We can sometimes end up with kasan_byte_accessible() being called > > on non-slab memory. For example ksize() and krealloc() may end up > > calling it on KFENCE allocated

Re: [PATCH v2] kasan: fix kasan_byte_accessible() to be consistent with actual checks

2021-04-05 Thread Andrey Konovalov
On Tue, Apr 6, 2021 at 12:07 AM Peter Collingbourne wrote: > > We can sometimes end up with kasan_byte_accessible() being called > on non-slab memory. For example ksize() and krealloc() may end up > calling it on KFENCE allocated memory. In this case the memory will > be tagged with

[PATCH v2] kasan: fix kasan_byte_accessible() to be consistent with actual checks

2021-04-05 Thread Peter Collingbourne
We can sometimes end up with kasan_byte_accessible() being called on non-slab memory. For example ksize() and krealloc() may end up calling it on KFENCE allocated memory. In this case the memory will be tagged with KASAN_SHADOW_INIT, which a subsequent patch ("kasan: initialize shadow to