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

On Fri, 31 May 2024 17:21:44 +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 looks odd. Maybe something along the lines of:

"Since all calls from its_irq_set_vcpu_affinity() require the same
 lock to be held, hoist the locking there instead of peppering it over
 the place."

>
> This bug was discovered using Coverity Static Analysis
> Security Testing (SAST) by Synopsys, Inc.
> 
> Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling")
> Suggested-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>

With the above addressed,

Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org

Thomas, can you please queue it at your earliest convenience?

Thanks,

	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

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Hagar Hemdan <hagarhem@amazon.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: Maximilian Heyne <mheyne@amazon.de>,
	Norbert Manthey <nmanthey@amazon.de>,
	Eric Auger <eric.auger@redhat.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
Date: Fri, 31 May 2024 18:39:50 +0100	[thread overview]
Message-ID: <86plt1lw2h.wl-maz@kernel.org> (raw)
In-Reply-To: <20240531162144.28650-1-hagarhem@amazon.com>

On Fri, 31 May 2024 17:21:44 +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 looks odd. Maybe something along the lines of:

"Since all calls from its_irq_set_vcpu_affinity() require the same
 lock to be held, hoist the locking there instead of peppering it over
 the place."

>
> This bug was discovered using Coverity Static Analysis
> Security Testing (SAST) by Synopsys, Inc.
> 
> Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling")
> Suggested-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>

With the above addressed,

Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org

Thomas, can you please queue it at your earliest convenience?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2024-05-31 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 16:21 [PATCH v4] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() Hagar Hemdan
2024-05-31 16:21 ` Hagar Hemdan
2024-05-31 17:39 ` Marc Zyngier [this message]
2024-05-31 17:39   ` Marc Zyngier
2024-06-03 12:25 ` [tip: irq/urgent] " tip-bot2 for Hagar Hemdan
2024-06-03 14:40   ` Markus Elfring
2024-06-03 16:01   ` Marc Zyngier
2024-06-03 16:20     ` Thomas Gleixner
2024-06-03 16:26 ` tip-bot2 for Hagar Hemdan

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=86plt1lw2h.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=eric.auger@redhat.com \
    --cc=hagarhem@amazon.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.