All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kasan: Add a prototype of task_struct to avoid warning
@ 2017-03-13 14:14 Arnd Bergmann
  2017-03-13 14:28 ` Alexander Potapenko
  2017-03-13 15:01 ` Andrey Ryabinin
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-03-13 14:14 UTC (permalink / raw)
  To: Andrey Ryabinin
  Cc: Masami Hiramatsu, Alexander Potapenko, Dmitry Vyukov,
	Arnd Bergmann, Andrew Morton, kasan-dev, linux-kernel

From: Masami Hiramatsu <mhiramat@kernel.org>

Add a prototype of task_struct to fix below warning on arm64.

In file included from arch/arm64/kernel/probes/kprobes.c:19:0:
include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 static inline void kasan_unpoison_task_stack(struct task_struct *task) {}

As same as other types (kmem_cache, page, and vm_struct) this adds a
prototype of task_struct data structure on top of kasan.h.

[arnd] A related warning was fixed before, but now appears in a different
line in the same file in v4.11-rc2. The patch from Masami Hiramatsu
still seems appropriate, so let's take his version.

Link: https://patchwork.kernel.org/patch/9569839/
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/kasan.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 1c823bef4c15..5734480c9590 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -6,6 +6,7 @@
 struct kmem_cache;
 struct page;
 struct vm_struct;
+struct task_struct;
 
 #ifdef CONFIG_KASAN
 
-- 
2.9.0

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

* Re: [PATCH] kasan: Add a prototype of task_struct to avoid warning
  2017-03-13 14:14 [PATCH] kasan: Add a prototype of task_struct to avoid warning Arnd Bergmann
@ 2017-03-13 14:28 ` Alexander Potapenko
  2017-03-13 15:01 ` Andrey Ryabinin
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Potapenko @ 2017-03-13 14:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrey Ryabinin, Masami Hiramatsu, Dmitry Vyukov, Andrew Morton,
	kasan-dev, LKML

On Mon, Mar 13, 2017 at 3:14 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> From: Masami Hiramatsu <mhiramat@kernel.org>
>
> Add a prototype of task_struct to fix below warning on arm64.
>
> In file included from arch/arm64/kernel/probes/kprobes.c:19:0:
> include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>  static inline void kasan_unpoison_task_stack(struct task_struct *task) {}
>
> As same as other types (kmem_cache, page, and vm_struct) this adds a
> prototype of task_struct data structure on top of kasan.h.
>
> [arnd] A related warning was fixed before, but now appears in a different
> line in the same file in v4.11-rc2. The patch from Masami Hiramatsu
> still seems appropriate, so let's take his version.
>
> Link: https://patchwork.kernel.org/patch/9569839/
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alexander Potapenko <glider@google.com>
> ---
>  include/linux/kasan.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/kasan.h b/include/linux/kasan.h
> index 1c823bef4c15..5734480c9590 100644
> --- a/include/linux/kasan.h
> +++ b/include/linux/kasan.h
> @@ -6,6 +6,7 @@
>  struct kmem_cache;
>  struct page;
>  struct vm_struct;
> +struct task_struct;
>
>  #ifdef CONFIG_KASAN
>
> --
> 2.9.0
>



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

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

* Re: [PATCH] kasan: Add a prototype of task_struct to avoid warning
  2017-03-13 14:14 [PATCH] kasan: Add a prototype of task_struct to avoid warning Arnd Bergmann
  2017-03-13 14:28 ` Alexander Potapenko
@ 2017-03-13 15:01 ` Andrey Ryabinin
  1 sibling, 0 replies; 3+ messages in thread
From: Andrey Ryabinin @ 2017-03-13 15:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Masami Hiramatsu, Alexander Potapenko, Dmitry Vyukov,
	Andrew Morton, kasan-dev, linux-kernel



On 03/13/2017 05:14 PM, Arnd Bergmann wrote:
> From: Masami Hiramatsu <mhiramat@kernel.org>
> 
> Add a prototype of task_struct to fix below warning on arm64.
> 
> In file included from arch/arm64/kernel/probes/kprobes.c:19:0:
> include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>  static inline void kasan_unpoison_task_stack(struct task_struct *task) {}
> 
> As same as other types (kmem_cache, page, and vm_struct) this adds a
> prototype of task_struct data structure on top of kasan.h.
> 
> [arnd] A related warning was fixed before, but now appears in a different
> line in the same file in v4.11-rc2. The patch from Masami Hiramatsu
> still seems appropriate, so let's take his version.
> 
> Link: https://patchwork.kernel.org/patch/9569839/
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Fixes: 71af2ed5eeea ("kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h>")
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

> ---
>  include/linux/kasan.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/kasan.h b/include/linux/kasan.h
> index 1c823bef4c15..5734480c9590 100644
> --- a/include/linux/kasan.h
> +++ b/include/linux/kasan.h
> @@ -6,6 +6,7 @@
>  struct kmem_cache;
>  struct page;
>  struct vm_struct;
> +struct task_struct;
>  
>  #ifdef CONFIG_KASAN
>  
> 

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

end of thread, other threads:[~2017-03-13 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 14:14 [PATCH] kasan: Add a prototype of task_struct to avoid warning Arnd Bergmann
2017-03-13 14:28 ` Alexander Potapenko
2017-03-13 15:01 ` Andrey Ryabinin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.