linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] kasan: mark addr_has_metadata __always_inline
@ 2023-02-08 16:39 Arnd Bergmann
  2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Arnd Bergmann @ 2023-02-08 16:39 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Andrey Ryabinin, Andrew Morton
  Cc: kasan-dev, Marco Elver, Dmitry Vyukov, Alexander Potapenko,
	Vincenzo Frascino, Andrey Konovalov, Arnd Bergmann,
	Kuan-Ying Lee, linux-mm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When the compiler decides not to inline this function, objdump
complains about incorrect UACCESS state:

mm/kasan/generic.o: warning: objtool: __asan_load2+0x11: call to addr_has_metadata() with UACCESS enabled

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kasan/kasan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index 3231314e071f..9377b0789edc 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -297,7 +297,7 @@ static inline const void *kasan_shadow_to_mem(const void *shadow_addr)
 		<< KASAN_SHADOW_SCALE_SHIFT);
 }
 
-static inline bool addr_has_metadata(const void *addr)
+static __always_inline bool addr_has_metadata(const void *addr)
 {
 	return (kasan_reset_tag(addr) >=
 		kasan_shadow_to_mem((void *)KASAN_SHADOW_START));
@@ -316,7 +316,7 @@ bool kasan_check_range(unsigned long addr, size_t size, bool write,
 
 #else /* CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS */
 
-static inline bool addr_has_metadata(const void *addr)
+static __always_inline bool addr_has_metadata(const void *addr)
 {
 	return (is_vmalloc_addr(addr) || virt_addr_valid(addr));
 }
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] kmsan: disable ftrace in kmsan core code
  2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
@ 2023-02-08 16:39 ` Arnd Bergmann
  2023-02-08 17:00   ` Marco Elver
  2023-02-08 17:01 ` [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Marco Elver
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2023-02-08 16:39 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Alexander Potapenko,
	Andrew Morton, Marco Elver
  Cc: kasan-dev, Dmitry Vyukov, Andrey Ryabinin, Vincenzo Frascino,
	Andrey Konovalov, Arnd Bergmann, linux-mm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

objtool warns about some suspicous code inside of kmsan:

vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_n+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_n+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_1+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_1+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_2+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_2+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_4+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_4+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_8+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_8+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_instrument_asm_store+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_chain_origin+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_poison_alloca+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_warning+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: __msan_get_context_state+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: kmsan_copy_to_user+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: kmsan_unpoison_memory+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: kmsan_unpoison_entry_regs+0x4: call to __fentry__() with UACCESS enabled
vmlinux.o: warning: objtool: kmsan_report+0x4: call to __fentry__() with UACCESS enabled

Similar code already exists in kasan, which avoids this by skipping
ftrace annotations, so do the same thing here.

Fixes: f80be4571b19 ("kmsan: add KMSAN runtime core")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kmsan/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/kmsan/Makefile b/mm/kmsan/Makefile
index 98eab2856626..389fd767a11f 100644
--- a/mm/kmsan/Makefile
+++ b/mm/kmsan/Makefile
@@ -16,6 +16,14 @@ CC_FLAGS_KMSAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
 
 CFLAGS_REMOVE.o = $(CC_FLAGS_FTRACE)
 
+# Disable ftrace to avoid recursion.
+CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_hooks.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_instrumentation.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_shadow.o = $(CC_FLAGS_FTRACE)
+
 CFLAGS_core.o := $(CC_FLAGS_KMSAN_RUNTIME)
 CFLAGS_hooks.o := $(CC_FLAGS_KMSAN_RUNTIME)
 CFLAGS_init.o := $(CC_FLAGS_KMSAN_RUNTIME)
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] kmsan: disable ftrace in kmsan core code
  2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
@ 2023-02-08 17:00   ` Marco Elver
  2023-02-08 19:31     ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Elver @ 2023-02-08 17:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Josh Poimboeuf, Peter Zijlstra, Alexander Potapenko,
	Andrew Morton, kasan-dev, Dmitry Vyukov, Andrey Ryabinin,
	Vincenzo Frascino, Andrey Konovalov, Arnd Bergmann, linux-mm,
	linux-kernel

On Wed, 8 Feb 2023 at 17:40, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> objtool warns about some suspicous code inside of kmsan:
>
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_n+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_n+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_1+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_1+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_2+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_2+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_4+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_4+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_8+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_8+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_instrument_asm_store+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_chain_origin+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_poison_alloca+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_warning+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: __msan_get_context_state+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: kmsan_copy_to_user+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: kmsan_unpoison_memory+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: kmsan_unpoison_entry_regs+0x4: call to __fentry__() with UACCESS enabled
> vmlinux.o: warning: objtool: kmsan_report+0x4: call to __fentry__() with UACCESS enabled
>
> Similar code already exists in kasan, which avoids this by skipping
> ftrace annotations, so do the same thing here.
>
> Fixes: f80be4571b19 ("kmsan: add KMSAN runtime core")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  mm/kmsan/Makefile | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/mm/kmsan/Makefile b/mm/kmsan/Makefile
> index 98eab2856626..389fd767a11f 100644
> --- a/mm/kmsan/Makefile
> +++ b/mm/kmsan/Makefile
> @@ -16,6 +16,14 @@ CC_FLAGS_KMSAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
>
>  CFLAGS_REMOVE.o = $(CC_FLAGS_FTRACE)

That means this CFLAGS_REMOVE.o didn't work, right? Can it be removed?

> +# Disable ftrace to avoid recursion.
> +CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)
> +CFLAGS_REMOVE_hooks.o = $(CC_FLAGS_FTRACE)
> +CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
> +CFLAGS_REMOVE_instrumentation.o = $(CC_FLAGS_FTRACE)
> +CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
> +CFLAGS_REMOVE_shadow.o = $(CC_FLAGS_FTRACE)
> +
>  CFLAGS_core.o := $(CC_FLAGS_KMSAN_RUNTIME)
>  CFLAGS_hooks.o := $(CC_FLAGS_KMSAN_RUNTIME)
>  CFLAGS_init.o := $(CC_FLAGS_KMSAN_RUNTIME)
> --
> 2.39.1
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] kasan: mark addr_has_metadata __always_inline
  2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
  2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
@ 2023-02-08 17:01 ` Marco Elver
  2023-02-08 18:10 ` Peter Zijlstra
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Marco Elver @ 2023-02-08 17:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Josh Poimboeuf, Peter Zijlstra, Andrey Ryabinin, Andrew Morton,
	kasan-dev, Dmitry Vyukov, Alexander Potapenko, Vincenzo Frascino,
	Andrey Konovalov, Arnd Bergmann, Kuan-Ying Lee, linux-mm,
	linux-kernel

On Wed, 8 Feb 2023 at 17:40, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> When the compiler decides not to inline this function, objdump
> complains about incorrect UACCESS state:
>
> mm/kasan/generic.o: warning: objtool: __asan_load2+0x11: call to addr_has_metadata() with UACCESS enabled
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Marco Elver <elver@google.com>

> ---
>  mm/kasan/kasan.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
> index 3231314e071f..9377b0789edc 100644
> --- a/mm/kasan/kasan.h
> +++ b/mm/kasan/kasan.h
> @@ -297,7 +297,7 @@ static inline const void *kasan_shadow_to_mem(const void *shadow_addr)
>                 << KASAN_SHADOW_SCALE_SHIFT);
>  }
>
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>         return (kasan_reset_tag(addr) >=
>                 kasan_shadow_to_mem((void *)KASAN_SHADOW_START));
> @@ -316,7 +316,7 @@ bool kasan_check_range(unsigned long addr, size_t size, bool write,
>
>  #else /* CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS */
>
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>         return (is_vmalloc_addr(addr) || virt_addr_valid(addr));
>  }
> --
> 2.39.1
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] kasan: mark addr_has_metadata __always_inline
  2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
  2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
  2023-02-08 17:01 ` [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Marco Elver
@ 2023-02-08 18:10 ` Peter Zijlstra
  2023-02-09 19:26 ` Josh Poimboeuf
  2023-02-09 22:21 ` Andrey Konovalov
  4 siblings, 0 replies; 9+ messages in thread
From: Peter Zijlstra @ 2023-02-08 18:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Josh Poimboeuf, Andrey Ryabinin, Andrew Morton, kasan-dev,
	Marco Elver, Dmitry Vyukov, Alexander Potapenko,
	Vincenzo Frascino, Andrey Konovalov, Arnd Bergmann,
	Kuan-Ying Lee, linux-mm, linux-kernel

On Wed, Feb 08, 2023 at 05:39:55PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When the compiler decides not to inline this function, objdump
> complains about incorrect UACCESS state:
> 
> mm/kasan/generic.o: warning: objtool: __asan_load2+0x11: call to addr_has_metadata() with UACCESS enabled
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

> ---
>  mm/kasan/kasan.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
> index 3231314e071f..9377b0789edc 100644
> --- a/mm/kasan/kasan.h
> +++ b/mm/kasan/kasan.h
> @@ -297,7 +297,7 @@ static inline const void *kasan_shadow_to_mem(const void *shadow_addr)
>  		<< KASAN_SHADOW_SCALE_SHIFT);
>  }
>  
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>  	return (kasan_reset_tag(addr) >=
>  		kasan_shadow_to_mem((void *)KASAN_SHADOW_START));
> @@ -316,7 +316,7 @@ bool kasan_check_range(unsigned long addr, size_t size, bool write,
>  
>  #else /* CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS */
>  
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>  	return (is_vmalloc_addr(addr) || virt_addr_valid(addr));
>  }
> -- 
> 2.39.1
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] kmsan: disable ftrace in kmsan core code
  2023-02-08 17:00   ` Marco Elver
@ 2023-02-08 19:31     ` Arnd Bergmann
  2023-02-09 15:42       ` Alexander Potapenko
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2023-02-08 19:31 UTC (permalink / raw)
  To: Marco Elver, Arnd Bergmann
  Cc: Josh Poimboeuf, Peter Zijlstra, Alexander Potapenko,
	Andrew Morton, kasan-dev, Dmitry Vyukov, Andrey Ryabinin,
	Vincenzo Frascino, Andrey Konovalov, linux-mm, linux-kernel

On Wed, Feb 8, 2023, at 18:00, Marco Elver wrote:

>>  CFLAGS_REMOVE.o = $(CC_FLAGS_FTRACE)
>
> That means this CFLAGS_REMOVE.o didn't work, right? Can it be removed?
>

Ah, I missed this. Adjusted the patch and description accordingly.

    Arnd


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] kmsan: disable ftrace in kmsan core code
  2023-02-08 19:31     ` Arnd Bergmann
@ 2023-02-09 15:42       ` Alexander Potapenko
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Potapenko @ 2023-02-09 15:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marco Elver, Arnd Bergmann, Josh Poimboeuf, Peter Zijlstra,
	Andrew Morton, kasan-dev, Dmitry Vyukov, Andrey Ryabinin,
	Vincenzo Frascino, Andrey Konovalov, linux-mm, linux-kernel

On Wed, Feb 8, 2023 at 8:32 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Feb 8, 2023, at 18:00, Marco Elver wrote:
>
> >>  CFLAGS_REMOVE.o = $(CC_FLAGS_FTRACE)
> >
> > That means this CFLAGS_REMOVE.o didn't work, right? Can it be removed?
> >
>
> Ah, I missed this. Adjusted the patch and description accordingly.
>
>     Arnd

Acked-by: Alexander Potapenko <glider@google.com>

(assuming you did, b/c I couldn't find the new version)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] kasan: mark addr_has_metadata __always_inline
  2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
                   ` (2 preceding siblings ...)
  2023-02-08 18:10 ` Peter Zijlstra
@ 2023-02-09 19:26 ` Josh Poimboeuf
  2023-02-09 22:21 ` Andrey Konovalov
  4 siblings, 0 replies; 9+ messages in thread
From: Josh Poimboeuf @ 2023-02-09 19:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Peter Zijlstra, Andrey Ryabinin, Andrew Morton, kasan-dev,
	Marco Elver, Dmitry Vyukov, Alexander Potapenko,
	Vincenzo Frascino, Andrey Konovalov, Arnd Bergmann,
	Kuan-Ying Lee, linux-mm, linux-kernel

On Wed, Feb 08, 2023 at 05:39:55PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When the compiler decides not to inline this function, objdump

"objdump" -> "objtool" here and in patch subject.

-- 
Josh


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] kasan: mark addr_has_metadata __always_inline
  2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
                   ` (3 preceding siblings ...)
  2023-02-09 19:26 ` Josh Poimboeuf
@ 2023-02-09 22:21 ` Andrey Konovalov
  4 siblings, 0 replies; 9+ messages in thread
From: Andrey Konovalov @ 2023-02-09 22:21 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Josh Poimboeuf, Peter Zijlstra, Andrey Ryabinin, Andrew Morton,
	kasan-dev, Marco Elver, Dmitry Vyukov, Alexander Potapenko,
	Vincenzo Frascino, Arnd Bergmann, Kuan-Ying Lee, linux-mm,
	linux-kernel

On Wed, Feb 8, 2023 at 5:40 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> When the compiler decides not to inline this function, objdump
> complains about incorrect UACCESS state:
>
> mm/kasan/generic.o: warning: objtool: __asan_load2+0x11: call to addr_has_metadata() with UACCESS enabled
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  mm/kasan/kasan.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
> index 3231314e071f..9377b0789edc 100644
> --- a/mm/kasan/kasan.h
> +++ b/mm/kasan/kasan.h
> @@ -297,7 +297,7 @@ static inline const void *kasan_shadow_to_mem(const void *shadow_addr)
>                 << KASAN_SHADOW_SCALE_SHIFT);
>  }
>
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>         return (kasan_reset_tag(addr) >=
>                 kasan_shadow_to_mem((void *)KASAN_SHADOW_START));
> @@ -316,7 +316,7 @@ bool kasan_check_range(unsigned long addr, size_t size, bool write,
>
>  #else /* CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS */
>
> -static inline bool addr_has_metadata(const void *addr)
> +static __always_inline bool addr_has_metadata(const void *addr)
>  {
>         return (is_vmalloc_addr(addr) || virt_addr_valid(addr));
>  }
> --
> 2.39.1
>

Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>

Thanks!


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-09 22:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 16:39 [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Arnd Bergmann
2023-02-08 16:39 ` [PATCH 2/4] kmsan: disable ftrace in kmsan core code Arnd Bergmann
2023-02-08 17:00   ` Marco Elver
2023-02-08 19:31     ` Arnd Bergmann
2023-02-09 15:42       ` Alexander Potapenko
2023-02-08 17:01 ` [PATCH 1/4] kasan: mark addr_has_metadata __always_inline Marco Elver
2023-02-08 18:10 ` Peter Zijlstra
2023-02-09 19:26 ` Josh Poimboeuf
2023-02-09 22:21 ` Andrey Konovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).