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]
Date:	Thu, 17 Sep 2015 11:58:54 +0200
From:	Peter Senna Tschudin <peter.senna@...il.com>
To:	Michael Ellerman <mpe@...erman.id.au>
Cc:	benh@...nel.crashing.org, paulus@...ba.org, anton@...ba.org,
	linuxppc-dev@...ts.ozlabs.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch-powerpc: Return false instead of -EFAULT

On Thu, Sep 17, 2015 at 11:47 AM, Michael Ellerman <mpe@...erman.id.au> wrote:
> On Thu, 2015-09-17 at 11:18 +0200, Peter Senna Tschudin wrote:
>> Returning a negative value for a boolean function seem to have the
>> undesired effect of returning true. Replace -EINVAL by false in a
>> bool-returning function.
>>
>> The diff of the .s file before and after the change (using cross
>> compilation) starts with:
>>
>> 440,441c440,441
>> < .L43:
>> <     li 3,1   # D.25775,
>> ---
>> > .L42:
>> >     li 3,0   # D.25775,
>> ...
>>
>> while if -EFAULT is replaced by true, the diff is empty.
>
> Ah, that's rather unfortunate.
>
> Can you post the full asm listing, for all three cases?
Sure, but it would be 3 files of 70kb each. You can download them form:

http://petersenna.com/files/module_64.s.tar.xz

Let me know if this download method doesn't work for you.

module_64.s: Original file.
module_64-patched.s: With my patch
module_64-true.s: Changing -EFAULT by true

files were made with:
$ make arch/powerpc/kernel/module_64.s

using:
gcc-powerpc64-linux-gnu-4.9.2-5.fc21.x86_64

>
> cheers
>
>



-- 
Peter
--
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