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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Oct 2017 15:21:48 -0700
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        X86 ML <x86@...nel.org>
Subject: Re: [RFC][PATCH] x86, syscalls: use SYSCALL_DEFINE() macros for
 sys_modify_ldt()

On 10/13/2017 02:03 PM, Andy Lutomirski wrote:
>>
>> -asmlinkage int sys_modify_ldt(int func, void __user *ptr,
>> -                             unsigned long bytecount)
>> +SYSCALL_DEFINE3(modify_ldt, int , func , void __user * , ptr ,
>> +               unsigned long , bytecount)
> sys_modify_ldt() returns int, which is wrong, and it's visibly wrong
> to 64-bit user code.  So I think you need to make sure that the return
> value is cast to int in all cases.

I'm not quite following.

Is there any difference between having something return 'int' and having
it return 'long' but only use the lower 32 bits?  The caller is surely
expecting its result in the lower 32 bits, but this should not change that.

Did you just mean that we need to careful to cast the result in
sys_modify_ldt() over to an 'int' before returning it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ