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:	Wed, 30 Jul 2008 16:15:52 +0300
From:	Octavian Purdila <opurdila@...acom.com>
To:	Patrick Ohly <patrick.ohly@...el.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [RFC][PATCH 1/2] net: support for TX timestamps

On Wednesday 30 July 2008, Patrick Ohly wrote:

> > The actual timestamp will reach userspace as a RX timestamp on the
> > cloned packet. If timestamping is requested and no timestamping is
> > done in the device driver (potentially this may use hardware
> > timestamping), it will be done in software after the device's
> > start_hard_xmit routine.
>
> This needs to be augmented to not fall back to software time stamping,
> as discussed in "[RFC][PATCH 1/1] net: support for hardware
> timestamping".
>

Ok, I'll keep this in mind for the next take.

> How do you recognize whether the driver did hardware time stamping? Hmm,
> okay, I think I can answer that myself: if the driver supports hardware
> time stamping, it must clear tstamp in its hard_start_xmit(). Later on
> when it has transmitted the packet, it extracts the corresponding
> hardware time stamp and calls skb_tx_timestamp(). Right? If so, this
> should go into a comment somewhere.
>

Right. 

> The implicit assumption here is that drivers do not touch tstamp,
> because otherwise software time stamping might accidentally be disabled
> by a driver. That seems to be the case, at least for in-kernel drivers.
>

Yes, that is the assumption and I think it should be reasonable.

> Is skb->sk always guaranteed to be set in hard_start_xmit?
> skb_tx_timestamp() depends on it. In 2.6.23 the field always seemed to
> be valid, but in 2.6.26 I think I have seen NULL pointers there for PTP
> UDP broadcasts.

I don't think that skb->sk is guaranteed to be around in hard_start_xmit. But 
we should not need it, if we overload the skb->tstamp, right?

Thanks,
tavi




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ