lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 May 2022 10:08:40 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     kernel test robot <lkp@...el.com>
Cc:     "Liam R. Howlett" <Liam.Howlett@...cle.com>, llvm@...ts.linux.dev,
        kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Linux Memory Management List <linux-mm@...ck.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [akpm-mm:mm-unstable 338/431] mm/nommu.c:579:2: error: call to
 undeclared function 'vma_mas_store'; ISO C99 and later do not support
 implicit function declarations

On Tue, 10 May 2022 20:52:04 +0800 kernel test robot <lkp@...el.com> wrote:

> >> mm/nommu.c:579:2: error: call to undeclared function 'vma_mas_store'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>            vma_mas_store(vma, &mas);

Thanks.

I queued the below temp fix for now.   Hopefully it makes sense for nommu.



From: Andrew Morton <akpm@...ux-foundation.org>
Subject: mapletree: build fix

Fix the vma_mas_store/vma_mas_remove issues.  Missing prototypes, missing
implementation on nommu.

Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 include/linux/mm.h |    3 +++
 mm/mmap.c          |    4 ++--
 mm/nommu.c         |   13 +++++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

--- a/mm/nommu.c~mapletree-build-fix
+++ a/mm/nommu.c
@@ -544,6 +544,19 @@ static void put_nommu_region(struct vm_r
 	__put_nommu_region(region);
 }
 
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+{
+	mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
+	mas_store_prealloc(mas, vma);
+}
+
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+{
+	mas->index = vma->vm_start;
+	mas->last = vma->vm_end - 1;
+	mas_store_prealloc(mas, NULL);
+}
+
 /*
  * add a VMA into a process's mm_struct in the appropriate place in the list
  * and tree and add to the address space's page tree also if not an anonymous
--- a/mm/mmap.c~mapletree-build-fix
+++ a/mm/mmap.c
@@ -475,7 +475,7 @@ static void __vma_link_file(struct vm_ar
  *
  * Note: the end address is inclusive in the maple tree.
  */
-inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
 {
 	trace_vma_store(mas->tree, vma);
 	mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
@@ -491,7 +491,7 @@ inline void vma_mas_store(struct vm_area
  * been established and points to the correct location.
  * Note: the end address is inclusive in the maple tree.
  */
-static inline void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
 {
 	trace_vma_mas_szero(mas->tree, vma->vm_start, vma->vm_end - 1);
 	mas->index = vma->vm_start;
--- a/include/linux/mm.h~mapletree-build-fix
+++ a/include/linux/mm.h
@@ -2669,6 +2669,9 @@ extern struct vm_area_struct *copy_vma(s
 	bool *need_rmap_locks);
 extern void exit_mmap(struct mm_struct *);
 
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas);
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas);
+
 static inline int check_data_rlimit(unsigned long rlim,
 				    unsigned long new,
 				    unsigned long start,
_

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ