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>] [day] [month] [year] [list]
Date:	Fri, 29 May 2015 16:47:43 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	"Samet, Yael" <yael.samet@...el.com>
cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] hid-core: fix s32 to n function when n=32

On Thu, 21 May 2015, Samet, Yael wrote:

> In hid-core.c, s32ton function, when n in 32 the result will always be 0.
> In the last line of the function:
> 1 << 32 is not defined,
> I get 1 in my environment, Then ((1 << n) - 1) is 0, and the function returns 0 for each value.
> 
> Signed-off-by: Yael Samet <yael.samet@...el.com>
> 
> --- hid-core.c      2015-05-21 10:49:39.000000000 +0300
> +++ hid-core.c.pathced 2015-05-21 11:02:29.692431045 +0300

This is not a proper format to submit patches, please see 
Documentation/SubmittingPatches.

> @@ -1044,6 +1044,8 @@
> static u32 s32ton(__s32 value, unsigned n)
> {
>                s32 a = value >> (n - 1);
> +             if (n == 32)
> +                             return value;
>                if (a && a != -1)
>                                return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
>                return value & ((1 << n) - 1);

The patch is whitespace-damaged. Could you please fix your mail setup and 
resend?

> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. 

Seems like I wouldn't be allowed to apply it anyway though :p

-- 
Jiri Kosina
SUSE Labs
--
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