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:   Thu, 27 Apr 2017 20:51:34 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net-next 07/18] net: dsa: mv88e6xxx: move VTU VID
 accessors

> @@ -1464,13 +1457,16 @@ static int _mv88e6xxx_vtu_loadpurge(struct mv88e6xxx_chip *chip,
>  				    struct mv88e6xxx_vtu_entry *entry)
>  {
>  	u16 op = GLOBAL_VTU_OP_VTU_LOAD_PURGE;
> -	u16 reg = 0;
>  	int err;
>  
>  	err = mv88e6xxx_g1_vtu_op_wait(chip);
>  	if (err)
>  		return err;
>  
> +	err = mv88e6xxx_g1_vtu_vid_write(chip, entry);
> +	if (err)
> +		return err;
> +
>  	if (!entry->valid)
>  		goto loadpurge;
>  
> @@ -1496,14 +1492,7 @@ static int _mv88e6xxx_vtu_loadpurge(struct mv88e6xxx_chip *chip,
>  		op |= (entry->fid & 0xf0) << 8;
>  		op |= entry->fid & 0xf;
>  	}
> -
> -	reg = GLOBAL_VTU_VID_VALID;
>  loadpurge:
> -	reg |= entry->vid & GLOBAL_VTU_VID_MASK;
> -	err = mv88e6xxx_g1_write(chip, GLOBAL_VTU_VID, reg);
> -	if (err)
> -		return err;
> -
>  	return mv88e6xxx_g1_vtu_op(chip, op);
>  }

This is not obvious, why do the vtu_vid_write() at the beginning,
rather than at the end? Especially before the if (!entry->valid).

However, when you look at the rest of the patch, it is O.K.

It might of been better to do this in two patches, to make it clearer
what is going on.

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

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ