linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hagar Hemdan <hagarhem@amazon.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Maximilian Heyne <mheyne@amazon.de>,
	Norbert Manthey <nmanthey@amazon.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eric Auger <eric.auger@redhat.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <hagarhem@amazon.de>
Subject: Re: [PATCH v2] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
Date: Fri, 31 May 2024 09:53:18 +0000	[thread overview]
Message-ID: <20240531095318.GA5556@amazon.com> (raw)
In-Reply-To: <86ttiel4bb.wl-maz@kernel.org>

On Fri, May 31, 2024 at 10:27:04AM +0100, Marc Zyngier wrote:
> On Fri, 31 May 2024 08:43:02 +0100,
> Hagar Hemdan <hagarhem@amazon.com> wrote:
> > 
> > its_vlpi_prop_update() calls lpi_write_config() which obtains the
> > mapping information for a VLPI without lock held. So it could race
> > with its_vlpi_unmap().
> > Since all calls from its_irq_set_vcpu_affinity() require the same
> > lock to be held. So instead of peppering the locking all over the
> > place, we hoist the locking into its_irq_set_vcpu_affinity().
> > 
> > This bug was discovered and resolved using Coverity Static Analysis
> > Security Testing (SAST) by Synopsys, Inc.
> > 
> > Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling")
> > Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
> 
> Given that you have lifted both my proposed patch and part of my
> reply as a commit message, you may at least credit me with a
> Suggested-by: tag. Not to mention that the blatant advertising doesn't
> really apply in this case.

ok, I will add this tag in rev3 and we need to add that disclaimer as it is a
commercial tool. thanks!
> 
> > ---
> > v2: moved the lock to its_irq_set_vcpu_affinity().
> > Only compile-tested, no access to HW.
> 
> Was the initial patch tested at all?
No, the initial one was only compile tested, forgot to add that hint in the first
patch.
> 
> 	M.
> 
> -- 
> Without deviation from the norm, progress is not possible.

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

  reply	other threads:[~2024-05-31  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  7:43 [PATCH v2] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() Hagar Hemdan
2024-05-31  9:27 ` Marc Zyngier
2024-05-31  9:53   ` Hagar Hemdan [this message]
2024-05-31 10:30     ` Marc Zyngier
2024-05-31 14:03       ` Hagar Hemdan
2024-05-31 14:51         ` Marc Zyngier

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=20240531095318.GA5556@amazon.com \
    --to=hagarhem@amazon.com \
    --cc=eric.auger@redhat.com \
    --cc=hagarhem@amazon.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mheyne@amazon.de \
    --cc=nmanthey@amazon.de \
    --cc=tglx@linutronix.de \
    /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).