linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Hagar Hemdan <hagarhem@amazon.com>
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 15:51:06 +0100	[thread overview]
Message-ID: <86r0dikpb9.wl-maz@kernel.org> (raw)
In-Reply-To: <20240531140336.GA4911@amazon.com>

On Fri, 31 May 2024 15:03:36 +0100,
Hagar Hemdan <hagarhem@amazon.com> wrote:
> 
> On Fri, May 31, 2024 at 11:30:59AM +0100, Marc Zyngier wrote:
> > On Fri, 31 May 2024 10:53:18 +0100,
> > Hagar Hemdan <hagarhem@amazon.com> wrote:
> > > 
> > > 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!
> > 
> > Sorry, but I'm not bound by this requirement. I'm happy to credit
> > *you* for reporting a defect, but certainly not a tool that hasn't
> > "resolved" anything, despite what the message says.
> 
> Ok, I will drop the resolved part as the modified fix is suggested by
> you. Is it ok?

Yes, this seems fair to me.

Thanks again,

	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 14:51 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
2024-05-31 10:30     ` Marc Zyngier
2024-05-31 14:03       ` Hagar Hemdan
2024-05-31 14:51         ` Marc Zyngier [this message]

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=86r0dikpb9.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=eric.auger@redhat.com \
    --cc=hagarhem@amazon.com \
    --cc=hagarhem@amazon.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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).