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] [day] [month] [year] [list]
Message-ID: <YD/qJZql2Ti0ULdT@Konrads-MacBook-Pro.local>
Date:   Wed, 3 Mar 2021 14:57:25 -0500
From:   Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     "alison.schofield@...el.com" <alison.schofield@...el.com>,
        "vishal.l.verma@...el.com" <vishal.l.verma@...el.com>,
        "ira.weiny@...el.com" <ira.weiny@...el.com>,
        "ben.widawsky@...el.com" <ben.widawsky@...el.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] cxl: Make loop variable be 'i' instead of 'j'

..snip..
> >  	cxl_for_each_cmd(cmd) {
> >  		const struct cxl_command_info *info = &cmd->info;
> > +		int i = 0;
> > 
> > -		if (copy_to_user(&q->commands[j++], info, sizeof(*info)))
> > +		if (copy_to_user(&q->commands[i++], info, sizeof(*info)))
> >  			return -EFAULT;
> > 
> > -		if (j == n_commands)
> > +		if (i == n_commands)
> >  			break;
> 
> 
> Did you test this?
> Looks badly broken to me.

I sent out the v3 which had that fixed. See
https://lore.kernel.org/linux-cxl/20210226222152.48467-1-konrad.wilk@oracle.com/T/#u

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ