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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <willemdebruijn.kernel.2759f838d176e@gmail.com>
Date: Wed, 11 Feb 2026 11:29:43 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Kurt Kanzenbach <kurt@...utronix.de>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
 Willem de Bruijn <willemb@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Eric Dumazet <edumazet@...gle.com>, 
 "David S. Miller" <davem@...emloft.net>, 
 "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>, 
 "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, 
 "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, 
 Paul Menzel <pmenzel@...gen.mpg.de>, 
 "Gomes, Vinicius" <vinicius.gomes@...el.com>, 
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>, 
 Richard Cochran <richardcochran@...il.com>, 
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
 Andrew Lunn <andrew+netdev@...n.ch>, 
 "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>, 
 "Keller, Jacob E" <jacob.e.keller@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3] igb: Retrieve Tx timestamp
 directly from interrupt for i210

Kurt Kanzenbach wrote:
> On Tue Feb 10 2026, Willem de Bruijn wrote:
> > The core issue seems to be that the ptp_tx_work is not scheduled
> > quickly enough. I wonder if that is the issue to be fixed. When/why
> > is this too slow?
> 
> The igb driver uses schedule_work() for the Tx timestamp retrieval. That
> means the ptp_tx_work item is queued to the kernel-global workqueue. In
> case there is load on the system, the kworker which handles ptp_tx_work
> might be delayed too much, which results in ptp4l timeouts.
> 
> Easy solution would be to tune the priority/affinity of the
> kworker. However, we have to figure which kworker it is. Furthermore,
> this kworker might handle other things as well, which are not related to
> igb timestamping at all. Therefore, tuning the priority of the kworker
> is not practical.
> 
> Moving the timestamping in IRQ looked like a good solution, because the
> device already signals that the Tx timestamp is available now. No need
> to schedule any worker/work at all. So, it'd be very nice if
> skb_tstamp_tx() could be called from IRQ context. BTW other drivers like
> igc call this function in IRQ context as well.
> 
> Alternative solution for igb is to move from schedule_work() to PTP AUX
> worker. That is a dedicated PTP worker thread called ptpX, which could
> handle the timestamping. This can be easily tuned with taskset and
> chrt. However, there's one difference to the kworker approach: The
> kworker always runs on the same CPU, where the IRQ triggered, the AUX
> worker not necessarily. This means, Miroslav needs to be aware of this
> and tune the AUX worker for his NTP use cases.
> 
> I hope, that makes the motivation for this patch and discussion clear.

It does thanks.

I think we should look at the locking. It is not clear to me that
sk_callback_lock needs to be held here at all.

>From the lock documentation itself its use is more limited.

sk->sk_socket->file is indeed dereferenced elsewhere without holding
such locks.

sk_capable is another indication.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ