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]
Message-Id: <20200512063728.17785-2-leon@kernel.org>
Date:   Tue, 12 May 2020 09:37:27 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Konovalov <adech.fo@...il.com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc:     Leon Romanovsky <leonro@...lanox.com>, kasan-dev@...glegroups.com,
        linux-mm@...ck.org, Michal Marek <mmarek@...e.cz>,
        linux-kernel@...r.kernel.org
Subject: [PATCH rdma-next 1/2] kasan: fix compilation warnings due to missing function prototypes

From: Leon Romanovsky <leonro@...lanox.com>

__asan_report_* function generates the following warnings while compiling
kernel, add them to the internal header to be aligned with other __asan_*
function prototypes.

mm/kasan/generic_report.c:130:6: warning: no previous prototype for '__asan_report_load1_noabort' [-Wmissing-prototypes]
  130 | void __asan_report_load##size##_noabort(unsigned long addr) \
      |      ^~~~~~~~~~~~~~~~~~
mm/kasan/generic_report.c:143:1: note: in expansion of macro 'DEFINE_ASAN_REPORT_LOAD'
  143 | DEFINE_ASAN_REPORT_LOAD(1);
      | ^~~~~~~~~~~~~~~~~~~~~~~

<...>

mm/kasan/generic_report.c:137:6: warning: no previous prototype for '__asan_report_store1_noabort' [-Wmissing-prototypes]
  137 | void __asan_report_store##size##_noabort(unsigned long addr) \
      |      ^~~~~~~~~~~~~~~~~~~
mm/kasan/generic_report.c:148:1: note: in expansion of macro 'DEFINE_ASAN_REPORT_STORE'
  148 | DEFINE_ASAN_REPORT_STORE(1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 0b24becc810d ("kasan: add kernel address sanitizer infrastructure")
Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
---
 mm/kasan/kasan.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index e8f37199d885..d428e588c700 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -230,15 +230,27 @@ void __asan_load16(unsigned long addr);
 void __asan_store16(unsigned long addr);

 void __asan_load1_noabort(unsigned long addr);
+void __asan_report_load1_noabort(unsigned long addr);
 void __asan_store1_noabort(unsigned long addr);
+void __asan_report_store1_noabort(unsigned long addr);
 void __asan_load2_noabort(unsigned long addr);
+void __asan_report_load2_noabort(unsigned long addr);
 void __asan_store2_noabort(unsigned long addr);
+void __asan_report_store2_noabort(unsigned long addr);
 void __asan_load4_noabort(unsigned long addr);
+void __asan_report_load4_noabort(unsigned long addr);
 void __asan_store4_noabort(unsigned long addr);
+void __asan_report_store4_noabort(unsigned long addr);
 void __asan_load8_noabort(unsigned long addr);
+void __asan_report_load8_noabort(unsigned long addr);
 void __asan_store8_noabort(unsigned long addr);
+void __asan_report_store8_noabort(unsigned long addr);
 void __asan_load16_noabort(unsigned long addr);
+void __asan_report_load16_noabort(unsigned long addr);
 void __asan_store16_noabort(unsigned long addr);
+void __asan_report_store16_noabort(unsigned long addr);
+void __asan_report_load_n_noabort(unsigned long addr, size_t size);
+void __asan_report_store_n_noabort(unsigned long addr, size_t size);

 void __asan_set_shadow_00(const void *addr, size_t size);
 void __asan_set_shadow_f1(const void *addr, size_t size);
--
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ