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: <Pine.LNX.4.64.0802121133090.7699@twin.jikos.cz>
Date:	Tue, 12 Feb 2008 11:35:02 +0100 (CET)
From:	Jiri Kosina <jikos@...os.cz>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH] Avoid buffer overflows in get_user_pages()

On Mon, 11 Feb 2008, Andrew Morton wrote:

> > +	if (len <= 0)
> > +		return 0;
> >  	/* 
> >  	 * Require read or write permissions.
> >  	 * If 'force' is set, we only require the "MAY" flags.
> Can we just convert
> 	do {
> 		...
> 	} while (len);
> into
> 	while (len) {
> 		...
> 	}

How would that help?

Rather

	while (len > 0) {
		...
	}

would do the trick.

-- 
Jiri Kosina
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ