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: <29073565-c03a-f684-6b49-b5226cbdd61b@gmail.com>
Date:   Tue, 28 Mar 2017 12:29:19 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU
 trunk

On 03/28/2017 12:09 PM, Vivien Didelot wrote:
> Set the trunk member of the mv88e6xxx_atu_entry structure regardless its
> value, so that uninitialized structures gets the correct boolean value.

Ouch, yes indeed!

> 
> Note that no mainline code is affected by the current behavior.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>

> ---
>  drivers/net/dsa/mv88e6xxx/global1_atu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> index 831434bc5c13..fa7e7db5171b 100644
> --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c
> +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> @@ -128,9 +128,7 @@ static int mv88e6xxx_g1_atu_data_read(struct mv88e6xxx_chip *chip,
>  
>  	entry->state = val & 0xf;
>  	if (entry->state != GLOBAL_ATU_DATA_STATE_UNUSED) {
> -		if (val & GLOBAL_ATU_DATA_TRUNK)
> -			entry->trunk = true;
> -
> +		entry->trunk = !!(val & GLOBAL_ATU_DATA_TRUNK);
>  		entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip);
>  	}
>  
> 


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ