linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Alexander Potapenko <glider@google.com>,
	Peter Collingbourne <pcc@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH 3/3] arm64: kasan: mte: remove redundant mte_report_once logic
Date: Sat, 31 Jul 2021 03:44:32 -0700	[thread overview]
Message-ID: <20210731104430.GA1112@arm.com> (raw)
In-Reply-To: <CA+fCnZcLE=DcVcq1TfLxRSOnBfD-iy2iGgyxg7zHk28YxWTHbQ@mail.gmail.com>

On Sat, Jul 31, 2021 at 01:01:25AM +0200, Andrey Konovalov wrote:
> On Tue, Jul 27, 2021 at 8:54 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Wed, Jul 14, 2021 at 03:38:43PM +0100, Mark Rutland wrote:
> > > We have special logic to suppress MTE tag check fault reporting, based
> > > on a global `mte_report_once` and `reported` variables. These can be
> > > used to suppress calling kasan_report() when taking a tag check fault,
> > > but do not prevent taking the fault in the first place, nor does they
> > > affect the way we disable tag checks upon taking a fault.
> > >
> > > The core KASAN code already defaults to reporting a single fault, and
> > > has a `multi_shot` control to permit reporting multiple faults. The only
> > > place we transiently alter `mte_report_once` is in lib/test_kasan.c,
> > > where we also the `multi_shot` state as the same time. Thus
> > > `mte_report_once` and `reported` are redundant, and can be removed.
> > >
> > > When a tag check fault is taken, tag checking will be disabled by
> > > `do_tag_recovery` and must be explicitly re-enabled if desired. The test
> > > code does this by calling kasan_enable_tagging_sync().
> > >
> > > This patch removes the redundant mte_report_once() logic and associated
> > > variables.
> >
> > The first "reported" variable was added to avoid calling kasan_report on
> > each CPU as we are lazily disabling tag checking when faults are
> > triggered.
> 
> So we do not need "reported" anymore? Why?

Because kasan has its own mechanism with KASAN_BIT_REPORTED.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-07-31 10:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 14:38 [PATCH 0/3] arm64: MTE cleanups Mark Rutland
2021-07-14 14:38 ` [PATCH 1/3] arm64: mte: fix restoration of GCR_EL1 from suspend Mark Rutland
2021-07-14 14:38 ` [PATCH 2/3] arm64: kasan: mte: use a constant kernel GCR_EL1 value Mark Rutland
2021-07-27 18:29   ` Catalin Marinas
2021-08-02 11:57   ` Andrey Konovalov
2021-07-14 14:38 ` [PATCH 3/3] arm64: kasan: mte: remove redundant mte_report_once logic Mark Rutland
2021-07-27 18:54   ` Catalin Marinas
2021-07-30 23:01     ` Andrey Konovalov
2021-07-31 10:44       ` Catalin Marinas [this message]
2021-07-31 11:28         ` Andrey Konovalov
2021-07-31 11:49           ` Catalin Marinas
2021-08-02 11:52             ` Andrey Konovalov
2021-07-15 17:39 ` [PATCH 0/3] arm64: MTE cleanups Will Deacon
2021-08-02 18:07 ` (subset) " Catalin Marinas

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=20210731104430.GA1112@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=andreyknvl@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pcc@google.com \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@kernel.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).