From: Leon Romanovsky <leon@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
Ingo Molnar <mingo@kernel.org>,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH rdma-next 2/2] kasan: add missing prototypes to fix compilation warnings
Date: Tue, 12 May 2020 09:37:28 +0300 [thread overview]
Message-ID: <20200512063728.17785-3-leon@kernel.org> (raw)
In-Reply-To: <20200512063728.17785-1-leon@kernel.org>
From: Leon Romanovsky <leonro@mellanox.com>
Use internal kasan header to declare missing prototypes to fix the
following compilation warnings.
mm/kasan/report.c:457:6: warning: no previous prototype for 'report_enabled' [-Wmissing-prototypes]
457 | bool report_enabled(void)
| ^~~~~~~~~~~~~~
mm/kasan/report.c:482:6: warning: no previous prototype for '__kasan_report' [-Wmissing-prototypes]
482 | void __kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip)
| ^~~~~~~~~~~~~~
Fixes: 57b78a62e7f2 ("x86/uaccess, kasan: Fix KASAN vs SMAP")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
mm/kasan/common.c | 3 ---
mm/kasan/kasan.h | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 2906358e42f0..cbb119224330 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -613,9 +613,6 @@ void kasan_free_shadow(const struct vm_struct *vm)
}
#endif
-extern void __kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip);
-extern bool report_enabled(void);
-
bool kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip)
{
unsigned long flags = user_access_save();
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index d428e588c700..02d54a1d0b2d 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -153,6 +153,9 @@ bool check_memory_region(unsigned long addr, size_t size, bool write,
void *find_first_bad_addr(void *addr, size_t size);
const char *get_bug_type(struct kasan_access_info *info);
+bool report_enabled(void);
+void __kasan_report(unsigned long addr, size_t size, bool is_write,
+ unsigned long ip);
bool kasan_report(unsigned long addr, size_t size,
bool is_write, unsigned long ip);
void kasan_report_invalid_free(void *object, unsigned long ip);
--
2.26.2
next prev parent reply other threads:[~2020-05-12 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 6:37 [PATCH rdma-next 0/2] Fix kasan compilation warnings Leon Romanovsky
2020-05-12 6:37 ` [PATCH rdma-next 1/2] kasan: fix compilation warnings due to missing function prototypes Leon Romanovsky
2020-05-12 6:37 ` Leon Romanovsky [this message]
2020-05-12 10:09 ` [PATCH rdma-next 0/2] Fix kasan compilation warnings Leon Romanovsky
2020-05-12 15:34 ` Andrey Konovalov
2020-05-12 16:11 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200512063728.17785-3-leon@kernel.org \
--to=leon@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=kasan-dev@googlegroups.com \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).