linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Marco Elver <elver@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	pcc@google.com, Catalin Marinas <catalin.marinas@arm.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Andrey Konovalov <andreyknvl@gmail.com>
Subject: Re: [PATCH] kasan: fix build by including kernel.h
Date: Tue, 6 Jul 2021 12:49:01 +0300	[thread overview]
Message-ID: <YOQnDWOJbNVSXM4i@smile.fi.intel.com> (raw)
In-Reply-To: <CANpmjNMZTe1Vs6Xx9bC9+azeRWJc7JvT-G4O7aQAq--wAp7f=g@mail.gmail.com>

On Mon, Jul 05, 2021 at 11:01:44AM +0200, Marco Elver wrote:
> On Mon, 5 Jul 2021 at 10:50, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > On Mon, Jul 5, 2021 at 10:28 AM Marco Elver <elver@google.com> wrote:
> > > 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.
> >
> > ...which I would like to avoid in the long term, but for now it's
> > probably the best quick fix, otherwise it will require the real split
> > of _RET_IP or at least rethinking its location.
> >
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.org>
> > Thanks!
> 
> Thanks!

Should be:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> > > Fixes: f39650de687e ("kernel.h: split out panic and oops helpers")
> >
> > P.S. I have tested the initial patch against full build of x86_64, and
> > it was long time available for different CIs/build bots, none
> > complained so far.
> 
> It only manifests on arm64 when using CONFIG_KASAN_HW_TAGS mode
> (requires Arm64 MTE extensions). The other 2 modes include
> <linux/pgtable.h> in kasan.h, and that seems to include kernel.h
> somewhere. The HW_TAGS mode, however, doesn't receive -next testing by
> a CI system AFAIK, so this was missed because it's not yet used by
> many (I'd expect that to change when CPUs with MTE are more
> widespread).

Got it.

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2021-07-06  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  7:27 Marco Elver
2021-07-05  8:49 ` Andy Shevchenko
2021-07-05  9:01   ` Marco Elver
2021-07-06  9:49     ` Andy Shevchenko [this message]
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=YOQnDWOJbNVSXM4i@smile.fi.intel.com \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=elver@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