linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kasan: hw_tags: include linux/vmalloc.h
@ 2024-04-04 12:44 Arnd Bergmann
  2024-04-04 18:17 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2024-04-04 12:44 UTC (permalink / raw)
  To: Andrey Ryabinin, Andrew Morton
  Cc: Arnd Bergmann, Alexander Potapenko, Andrey Konovalov,
	Dmitry Vyukov, Vincenzo Frascino, Mark Rutland, kasan-dev,
	linux-mm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

This header is no longer included implicitly and instead needs to be
pulled in directly:

mm/kasan/hw_tags.c: In function 'unpoison_vmalloc_pages':
mm/kasan/hw_tags.c:280:16: error: implicit declaration of function 'find_vm_area'; did you mean 'find_vma_prev'? [-Werror=implicit-function-declaration]
  280 |         area = find_vm_area((void *)addr);
      |                ^~~~~~~~~~~~
      |                find_vma_prev
mm/kasan/hw_tags.c:280:14: error: assignment to 'struct vm_struct *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  280 |         area = find_vm_area((void *)addr);
      |              ^
mm/kasan/hw_tags.c:284:29: error: invalid use of undefined type 'struct vm_struct'
  284 |         for (i = 0; i < area->nr_pages; i++) {
      |                             ^~
mm/kasan/hw_tags.c:285:41: error: invalid use of undefined type 'struct vm_struct'
  285 |                 struct page *page = area->pages[i];
      |                                         ^~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kasan/hw_tags.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c
index 2b994092a2d4..9958ebc15d38 100644
--- a/mm/kasan/hw_tags.c
+++ b/mm/kasan/hw_tags.c
@@ -16,6 +16,7 @@
 #include <linux/static_key.h>
 #include <linux/string.h>
 #include <linux/types.h>
+#include <linux/vmalloc.h>
 
 #include "kasan.h"
 
-- 
2.39.2



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

* Re: [PATCH] kasan: hw_tags: include linux/vmalloc.h
  2024-04-04 12:44 [PATCH] kasan: hw_tags: include linux/vmalloc.h Arnd Bergmann
@ 2024-04-04 18:17 ` Andrew Morton
  2024-04-04 19:48   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2024-04-04 18:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrey Ryabinin, Arnd Bergmann, Alexander Potapenko,
	Andrey Konovalov, Dmitry Vyukov, Vincenzo Frascino, Mark Rutland,
	kasan-dev, linux-mm, linux-kernel

On Thu,  4 Apr 2024 14:44:30 +0200 Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> This header is no longer included implicitly and instead needs to be
> pulled in directly:
> 
> mm/kasan/hw_tags.c: In function 'unpoison_vmalloc_pages':
> mm/kasan/hw_tags.c:280:16: error: implicit declaration of function 'find_vm_area'; did you mean 'find_vma_prev'? [-Werror=implicit-function-declaration]
>   280 |         area = find_vm_area((void *)addr);
>       |                ^~~~~~~~~~~~
>       |                find_vma_prev
> mm/kasan/hw_tags.c:280:14: error: assignment to 'struct vm_struct *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
>   280 |         area = find_vm_area((void *)addr);
>       |              ^
> mm/kasan/hw_tags.c:284:29: error: invalid use of undefined type 'struct vm_struct'
>   284 |         for (i = 0; i < area->nr_pages; i++) {
>       |                             ^~
> mm/kasan/hw_tags.c:285:41: error: invalid use of undefined type 'struct vm_struct'
>   285 |                 struct page *page = area->pages[i];
>       |                                         ^~

Thanks, but I'd like to know which patch this patch is fixing, please. 
Is it mainline or linux-next?  I'm suspecting it might be a fix for
fix-missing-vmalloch-includes.patch but without knowing how to
reproduce this I can't determine anything.

> --- a/mm/kasan/hw_tags.c
> +++ b/mm/kasan/hw_tags.c
> @@ -16,6 +16,7 @@
>  #include <linux/static_key.h>
>  #include <linux/string.h>
>  #include <linux/types.h>
> +#include <linux/vmalloc.h>
>  
>  #include "kasan.h"



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

* Re: [PATCH] kasan: hw_tags: include linux/vmalloc.h
  2024-04-04 18:17 ` Andrew Morton
@ 2024-04-04 19:48   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-04-04 19:48 UTC (permalink / raw)
  To: Andrew Morton, Arnd Bergmann
  Cc: Andrey Ryabinin, Alexander Potapenko, Andrey Konovalov,
	Dmitry Vyukov, Vincenzo Frascino, Mark Rutland, kasan-dev,
	linux-mm, linux-kernel

On Thu, Apr 4, 2024, at 20:17, Andrew Morton wrote:
> On Thu,  4 Apr 2024 14:44:30 +0200 Arnd Bergmann <arnd@kernel.org> wrote:
>
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> This header is no longer included implicitly and instead needs to be
>> pulled in directly:
>> 
>> mm/kasan/hw_tags.c: In function 'unpoison_vmalloc_pages':
>> mm/kasan/hw_tags.c:280:16: error: implicit declaration of function 'find_vm_area'; did you mean 'find_vma_prev'? [-Werror=implicit-function-declaration]
>>   280 |         area = find_vm_area((void *)addr);
>>       |                ^~~~~~~~~~~~
>>       |                find_vma_prev
>> mm/kasan/hw_tags.c:280:14: error: assignment to 'struct vm_struct *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
>>   280 |         area = find_vm_area((void *)addr);
>>       |              ^
>> mm/kasan/hw_tags.c:284:29: error: invalid use of undefined type 'struct vm_struct'
>>   284 |         for (i = 0; i < area->nr_pages; i++) {
>>       |                             ^~
>> mm/kasan/hw_tags.c:285:41: error: invalid use of undefined type 'struct vm_struct'
>>   285 |                 struct page *page = area->pages[i];
>>       |                                         ^~
>
> Thanks, but I'd like to know which patch this patch is fixing, please. 
> Is it mainline or linux-next?  I'm suspecting it might be a fix for
> fix-missing-vmalloch-includes.patch but without knowing how to
> reproduce this I can't determine anything.

It only showed up yesterday in linux-next. I thought about
bisecting it but ended up not doing it as it seemed simple
enough.

fix-missing-vmalloch-includes.patch looks like the right
place to me, given both the timing and contents, so please
fold my change into that.

      Arnd


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

end of thread, other threads:[~2024-04-04 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 12:44 [PATCH] kasan: hw_tags: include linux/vmalloc.h Arnd Bergmann
2024-04-04 18:17 ` Andrew Morton
2024-04-04 19:48   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox