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:   Tue, 20 Apr 2021 16:22:47 +0000
From:   "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
To:     "kuba@...nel.org" <kuba@...nel.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "Siwik, Grzegorz" <grzegorz.siwik@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "sassmann@...hat.com" <sassmann@...hat.com>,
        "Switzer, David" <david.switzer@...el.com>
Subject: Re: [PATCH net-next 2/6] igb: Add double-check MTA_REGISTER for i210
 and i211

On Fri, 2021-04-16 at 14:12 -0700, Jakub Kicinski wrote:
> On Fri, 16 Apr 2021 13:44:56 -0700 Tony Nguyen wrote:
> > +	bool is_failed;
> > +	int i;
> > +
> > +	do {
> > +		is_failed = false;
> > +		for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) {
> > +			if (array_rd32(E1000_MTA, i) != hw-
> > >mac.mta_shadow[i]) {
> > +				is_failed = true;
> > +				array_wr32(E1000_MTA, i, hw-
> > >mac.mta_shadow[i]);
> > +				wrfl();
> > +				break;
> > +			}
> > +		}
> > +	} while (is_failed);
> 
> Looks like a potential infinite loop on persistent failure.
> Also you don't need "is_failed", you can use while (i >= 0), or
> assign i = hw->mac.mta_reg_count, or consider using a goto. 

We will make a follow on patch to address these issues.

Thanks,
Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ