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:   Fri, 15 May 2020 15:26:40 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        simon.horman@...ronome.com, kernel-team@...com
Subject: Re: [PATCH net-next 1/3] ethtool: check if there is at least one
 channel for TX/RX in the core

On Fri, 15 May 2020 22:56:56 +0200 Michal Kubecek wrote:
> On Fri, May 15, 2020 at 12:49:00PM -0700, Jakub Kicinski wrote:
> > Having a channel config with no ability to RX or TX traffic is
> > clearly wrong. Check for this in the core so the drivers don't
> > have to.
> > 
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>  
> 
> Reviewed-by: Michal Kubecek <mkubecek@...e.cz>

Thanks for the reviews!

> > @@ -170,7 +170,8 @@ int ethnl_set_channels(struct sk_buff *skb, struct genl_info *info)
> >  	ethnl_update_u32(&channels.other_count,
> >  			 tb[ETHTOOL_A_CHANNELS_OTHER_COUNT], &mod);
> >  	ethnl_update_u32(&channels.combined_count,
> > -			 tb[ETHTOOL_A_CHANNELS_COMBINED_COUNT], &mod);
> > +			 tb[ETHTOOL_A_CHANNELS_COMBINED_COUNT], &mod_combined);
> > +	mod |= mod_combined;
> >  	ret = 0;
> >  	if (!mod)
> >  		goto out_ops;  
> 
> Bitwise or should do the right thing but using "|=" on bool variables
> looks strange.

Interesting, I never thought about it in this way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ