lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b828257d-5c69-4ff5-89e1-5d2aaf53a5e4@web.de>
Date: Mon, 3 Jun 2024 16:40:48 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: tip-bot2@...utronix.de, Hagar Hemdan <hagarhem@...zon.com>,
 Marc Zyngier <maz@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
 stable@...r.kernel.org, x86@...nel.org
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [tip: irq/urgent] irqchip/gic-v3-its: Fix potential race
 condition in its_vlpi_prop_update()

…
> [ tglx: Use guard() instead of goto ]
…
> +++ b/drivers/irqchip/irq-gic-v3-its.c
…
> @@ -1992,6 +1970,8 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
>  	if (!is_v4(its_dev->its))
>  		return -EINVAL;
>
> +	guard(raw_spinlock_irq, &its_dev->event_map.vlpi_lock);
> +
>  	/* Unmap request? */
>  	if (!info)
>  		return its_vlpi_unmap(d);

I found a similar guard() call in the implementation of the function “task_state_match”.
https://elixir.bootlin.com/linux/v6.10-rc2/source/kernel/sched/core.c#L2264

A slightly different combination of parentheses is applied there.
How do you think about to apply the following code variant accordingly?

+	guard(raw_spinlock_irq)(&its_dev->event_map.vlpi_lock);


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ