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: <20210112174822.7ee9b67d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 12 Jan 2021 17:48:22 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Marc Kleine-Budde <mkl@...gutronix.de>
Cc:     Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        linux-can@...r.kernel.org,
        Jeroen Hofstee <jhofstee@...tronenergy.com>,
        Richard Cochran <richardcochran@...il.com>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        "David S . Miller" <davem@...emloft.net>,
        "open list : NETWORKING DRIVERS" <netdev@...r.kernel.org>
Subject: Re: [PATCH v4 1/1] can: dev: add software tx timestamps

On Tue, 12 Jan 2021 17:46:25 -0800 Jakub Kicinski wrote:
> On Tue, 12 Jan 2021 11:03:00 +0100 Marc Kleine-Budde wrote:
> > On 1/12/21 10:54 AM, Vincent Mailhol wrote:  
> > > Call skb_tx_timestamp() within can_put_echo_skb() so that a software
> > > tx timestamp gets attached on the skb.
> > > 
> > > There two main reasons to include this call in can_put_echo_skb():
> > > 
> > >   * It easily allow to enable the tx timestamp on all devices with
> > >     just one small change.
> > > 
> > >   * According to Documentation/networking/timestamping.rst, the tx
> > >     timestamps should be generated in the device driver as close as
> > >     possible, but always prior to passing the packet to the network
> > >     interface. During the call to can_put_echo_skb(), the skb gets
> > >     cloned meaning that the driver should not dereference the skb
> > >     variable anymore after can_put_echo_skb() returns. This makes
> > >     can_put_echo_skb() the very last place we can use the skb without
> > >     having to access the echo_skb[] array.
> > > 
> > > Remark: by default, skb_tx_timestamp() does nothing. It needs to be
> > > activated by passing the SOF_TIMESTAMPING_TX_SOFTWARE flag either
> > > through socket options or control messages.
> > > 
> > > References:
> > > 
> > >  * Support for the error queue in CAN RAW sockets (which is needed for
> > >    tx timestamps) was introduced in:
> > >    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eb88531bdbfaafb827192d1fc6c5a3fcc4fadd96
> > > 
> > >   * Put the call to skb_tx_timestamp() just before adding it to the
> > >     array: https://lkml.org/lkml/2021/1/10/54
> > > 
> > >   * About Tx hardware timestamps
> > >     https://lore.kernel.org/linux-can/20210111171152.GB11715@hoboy.vegasvil.org/
> > > 
> > > Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>    
> > 
> > Applied to linux-can-next/testing  
> 
> Please make sure to address the warnings before this hits net-next:
> 
> https://patchwork.kernel.org/project/netdevbpf/patch/20210112130538.14912-2-mailhol.vincent@wanadoo.fr/
> 
> Actually it appears not to build with allmodconfig..?

Erm, apologies, I confused different CAN patches, this one did not get
build tested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ