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:   Sat, 11 Nov 2017 16:50:15 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        vivien.didelot@...oirfairelinux.com
Subject: Re: [PATCH net-next 2/4] net: dsa: tag_brcm: Prepare for supporting
 prepended tag

> +static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
> +				       struct net_device *dev,
> +				       struct packet_type *pt,
> +				       unsigned int offset)
>  {
>  	int source_port;
>  	u8 *brcm_tag;
> @@ -103,8 +114,7 @@ static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
>  	if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN)))
>  		return NULL;
>  
> -	/* skb->data points to the EtherType, the tag is right before it */
> -	brcm_tag = skb->data - 2;
> +	brcm_tag = skb->data - offset;

A minor nit.

The first part of the comment is still true. And having it gives you
an anchor point to understanding where are we going from when we go
backwards in the packet. Yes, the comment appears later, but at that
point we are not dealing with skb->data.

Otherwise:

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ