From: Marco Elver <elver@google.com>
To: elver@google.com, akpm@linux-foundation.org
Cc: glider@google.com, dvyukov@google.com, pcc@google.com,
catalin.marinas@arm.com, vincenzo.frascino@arm.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com, ryabinin.a.a@gmail.com,
andreyknvl@gmail.com,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH] kasan: fix build by including kernel.h
Date: Mon, 5 Jul 2021 09:27:16 +0200 [thread overview]
Message-ID: <20210705072716.2125074-1-elver@google.com> (raw)
The <linux/kasan.h> header relies on _RET_IP_ being defined, and had
been receiving that definition via inclusion of bug.h which includes
kernel.h. However, since f39650de687e that is no longer the case and get
the following build error when building CONFIG_KASAN_HW_TAGS on arm64:
In file included from arch/arm64/mm/kasan_init.c:10:
./include/linux/kasan.h: In function 'kasan_slab_free':
./include/linux/kasan.h:230:39: error: '_RET_IP_' undeclared (first use in this function)
230 | return __kasan_slab_free(s, object, _RET_IP_, init);
Fix it by including kernel.h from kasan.h.
Fixes: f39650de687e ("kernel.h: split out panic and oops helpers")
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Marco Elver <elver@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 5310e217bd74..dd874a1ee862 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -3,6 +3,7 @@
#define _LINUX_KASAN_H
#include <linux/bug.h>
+#include <linux/kernel.h>
#include <linux/static_key.h>
#include <linux/types.h>
--
2.32.0.93.g670b81a890-goog
next reply other threads:[~2021-07-05 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 7:27 Marco Elver [this message]
2021-07-05 8:49 ` [PATCH] kasan: fix build by including kernel.h Andy Shevchenko
2021-07-05 9:01 ` Marco Elver
2021-07-06 9:49 ` Andy Shevchenko
2021-07-05 14:41 ` Andrey Konovalov
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=20210705072716.2125074-1-elver@google.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=catalin.marinas@arm.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pcc@google.com \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
/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).