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]
Date: Thu, 01 Jun 2023 14:21:35 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...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,
 netdev@...r.kernel.org, sasha.neftin@...el.com, richardcochran@...il.com,
 Vladimir Oltean <vladimir.oltean@....com>, Naama Meir
 <naamax.meir@...ux.intel.com>
Subject: Re: [PATCH net 2/4] igc: Check if hardware TX timestamping is
 enabled earlier

Hi,

Jakub Kicinski <kuba@...nel.org> writes:

> On Tue, 30 May 2023 10:49:26 -0700 Tony Nguyen wrote:
>> -	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
>> +	if (unlikely(adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON &&
>> +		     skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
>>  		/* FIXME: add support for retrieving timestamps from
>>  		 * the other timer registers before skipping the
>>  		 * timestamping request.
>> @@ -1586,7 +1587,7 @@ static netdev_tx_t igc_xmit_frame_ring(struct sk_buff *skb,
>>  		unsigned long flags;
>>  
>>  		spin_lock_irqsave(&adapter->ptp_tx_lock, flags);
>> -		if (adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON && !adapter->ptp_tx_skb) {
>> +		if (!adapter->ptp_tx_skb) {
>
> AFAICT the cancel / cleanup path is not synchronized (I mean for
> accesses to adapter->tstamp_config) so this looks racy to me :(
>

As far as I can see, the racy behavior wasn't introduced here, can I
propose the fix as a follow up patch? Or do you prefer that I re-spin
this series?


Cheers,
-- 
Vinicius

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ