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: <f186dc24-8cc5-427c-868a-1162e75dd3e8@intel.com>
Date: Fri, 28 Feb 2025 16:59:47 -0700
From: Ahmed Zaki <ahmed.zaki@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, Tony Nguyen <anthony.l.nguyen@...el.com>
CC: <davem@...emloft.net>, <pabeni@...hat.com>, <edumazet@...gle.com>,
	<andrew+netdev@...n.ch>, <netdev@...r.kernel.org>, <willemb@...gle.com>,
	Madhu Chittim <madhu.chittim@...el.com>, Simon Horman <horms@...nel.org>,
	Samuel Salin <Samuel.salin@...el.com>
Subject: Re: [PATCH net v2] idpf: synchronize pending IRQs after disable



On 2025-02-28 3:40 p.m., Jakub Kicinski wrote:
> On Thu, 27 Feb 2025 13:16:09 -0800 Tony Nguyen wrote:
>> IDPF deinits all interrupts in idpf_vport_intr_deinit() by first disabling
>> the interrupt registers in idpf_vport_intr_dis_irq_all(), then later on frees
>> the irqs in idpf_vport_intr_rel_irq().
>>
>> Prevent any races by waiting for pending IRQ handler after it is disabled.
>> This will ensure the IRQ is cleanly freed afterwards.
> 
> You need to explain what is racing with what. Most drivers are fine
> with just ordering the teardown carefully. What is racing with the IRQ,
> and why can idpf_vport_intr_dis_irq_all() not be moved after that thing
> is disabled.

Most drivers call synchronize_irq() in the same order as this patch, for ex:
bnxt_disable_int_sync()
iavf_irq_disable()
ice_vsi_dis_irq()


The order is:
1 - disable IRQ registers
2 - synchronize_irq()     <-- currently missed in IDPF
3 - delete napis
4 - free IRQs

May be "races" is the wrong word, I will try to re-word.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ