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, 27 May 2016 23:04:58 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	Andrzej Hajda <a.hajda@...sung.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	David Airlie <airlied@...ux.ie>,
	Robin Murphy <robin.murphy@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	Russell King <linux@...linux.org.uk>,
	Bob Peterson <rpeterso@...hat.com>, linux-acpi@...r.kernel.org,
	iommu@...ts.linux-foundation.org, linux-media@...r.kernel.org,
	netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
	v9fs-developer@...ts.sourceforge.net
Subject: Re: [PATCH] remove lots of IS_ERR_VALUE abuses

On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote:

> @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
>  
>  	res = prepare_binprm(&bprm);
>  
> -	if (!IS_ERR_VALUE(res))
> +	if (res >= 0)

	if (res == 0), please - prepare_binprm() returns 0 or -E...

> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -521,7 +521,7 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
>  		if (p9_is_proto_dotu(c))
>  			err = -ecode;
>  
> -		if (!err || !IS_ERR_VALUE(err)) {
> +		if (!err || !IS_ERR_VALUE((unsigned long)err)) {

Not really - it's actually
		if (p9_is_proto_dotu(c) && ecode < 512)
			err = -ecode;

		if (!err) {
			...
> @@ -608,7 +608,7 @@ static int p9_check_zc_errors(struct p9_client *c, struct p9_req_t *req,
>  		if (p9_is_proto_dotu(c))
>  			err = -ecode;
>  
> -		if (!err || !IS_ERR_VALUE(err)) {
> +		if (!err || !IS_ERR_VALUE((unsigned long)err)) {

Ditto.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ