Thread (35 messages) flat view 35 messages, 6 authors, 2021-02-04

Re: [PATCH 01/12] kasan, mm: don't save alloc stacks twice

From: Marco Elver <elver@google.com>
Date: 2021-02-02 18:45:46
Also in: linux-arm-kernel, lkml

On Tue, 2 Feb 2021 at 19:01, 'Andrey Konovalov' via kasan-dev
[off-list ref] wrote:
[...]
quoted
quoted
@@ -83,6 +83,7 @@ static inline void kasan_disable_current(void) {}
 struct kasan_cache {
      int alloc_meta_offset;
      int free_meta_offset;
+     bool is_kmalloc;
[...]
quoted
quoted
      if (kasan_stack_collection_enabled())
-             set_alloc_info(cache, (void *)object, flags);
+             set_alloc_info(cache, (void *)object, flags, kmalloc);
It doesn't bother me too much, but: 'bool kmalloc' shadows function
'kmalloc' so this is technically fine, but using 'kmalloc' as the
variable name here might be confusing and there is a small chance it
might cause problems in a future refactor.
Good point. Does "is_kmalloc" sound good?
Sure, that's also consistent with the new struct field.

Thanks,
-- Marco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help