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: <Yga7V1UuC10ao88j@lunn.ch>
Date:   Fri, 11 Feb 2022 20:39:03 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Luiz Angelo Daros de Luca <luizluca@...il.com>,
        netdev@...r.kernel.org, linus.walleij@...aro.org,
        vivien.didelot@...il.com, f.fainelli@...il.com,
        davem@...emloft.net, kuba@...nel.org, alsi@...g-olufsen.dk,
        arinc.unal@...nc9.com
Subject: Re: [PATCH net-next 1/2] net: dsa: tag_rtl8_4: add rtl8_4t tailing
 variant

On Wed, Feb 09, 2022 at 11:51:58PM +0200, Vladimir Oltean wrote:
> Re: title. Tail or trailing?
> 
> On Wed, Feb 09, 2022 at 06:13:11PM -0300, Luiz Angelo Daros de Luca wrote:
> > +static inline void rtl8_4_write_tag(struct sk_buff *skb, struct net_device *dev,
> > +				    char *tag)
> >  {
> >  	struct dsa_port *dp = dsa_slave_to_port(dev);
> > -	__be16 *tag;
> > -
> > -	skb_push(skb, RTL8_4_TAG_LEN);
> > -
> > -	dsa_alloc_etype_header(skb, RTL8_4_TAG_LEN);
> > -	tag = dsa_etype_header_pos_tx(skb);
> > +	__be16 *tag16 = (__be16 *)tag;
> 
> Can the tail tag be aligned to an odd offset? In that case, should you
> access byte by byte, maybe? I'm not sure how arches handle this.

You should use get_unaligned_be16().

    Andrew

Powered by blists - more mailing lists