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] [day] [month] [year] [list]
Message-ID: <87ttey7cb5.ffs@tglx>
Date: Mon, 02 Sep 2024 09:19:10 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jinjie Ruan <ruanjinjie@...wei.com>, linux-kernel@...r.kernel.org
Cc: ruanjinjie@...wei.com
Subject: Re: [PATCH] genirq: Fix IRQ_MOVE_PENDING try set when
 CONFIG_GENERIC_PENDING_IRQ not set

On Fri, Aug 30 2024 at 18:09, Jinjie Ruan wrote:
> The irqd_set_move_pending() and irq_copy_pending() appear in pairs, but
> irq_copy_pending() is empty when CONFIG_GENERIC_PENDING_IRQ is not set,
> irqd_set_move_pending always set IRQD_SETAFFINITY_PENDING flag.

Which will never happen if CONFIG_GENERIC_PENDING_IRQ is not set.

> And before commit 1fa46f1f0709 ("genirq: Simplify affinity related code"),
> if the config not set, IRQ_MOVE_PENDING will not try set and

# git grep IRQ_MOVE_PENDING
# 

> desc->pending_mask will not be copied no matter what. Fix it by combining
> them to align with them, and define empty for both if the config
> is not enabled.
>
> Fixes: 1fa46f1f0709 ("genirq: Simplify affinity related code")

What does this actually fix?

You fail to explain what the actual consequence and failure is. If your
change is not fixing anything then there is no reason for a fixes tag.

>  static inline void
> -irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask)
> +irq_set_copy_pending(struct irq_data *data, const struct cpumask *mask)
>  {
> +	struct irq_desc *desc = irq_data_to_desc(data);
> +
> +	irqd_set_move_pending(data);
>  	cpumask_copy(desc->pending_mask, mask);
>  }

How is that different from the existing irq_set_affinity_pending() ?

> -#ifdef CONFIG_GENERIC_PENDING_IRQ
>  static inline int irq_set_affinity_pending(struct irq_data *data,
>  					   const struct cpumask *dest)
>  {
> -	struct irq_desc *desc = irq_data_to_desc(data);
> -
> -	irqd_set_move_pending(data);
> -	irq_copy_pending(desc, dest);
> +	irq_set_copy_pending(data, dest);
> +#ifdef CONFIG_GENERIC_PENDING_IRQ

No. We don't put the ifdefs into the function. That's horrible to read.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ