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: <CAP045AozcZ_F5dpJ0NfQvBc-_F0d36JkyS_kdo2Xtjb=ixh7Rg@mail.gmail.com>
Date:   Wed, 14 Sep 2016 15:08:42 -0700
From:   Kyle Huey <me@...ehuey.com>
To:     Dmitry Safonov <0x7f454c46@...il.com>
Cc:     "Robert O'Callahan" <robert@...llahan.org>,
        open list <linux-kernel@...r.kernel.org>,
        Borislav Petkov <bp@...e.de>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Milosz Tanski <milosz@...in.com>,
        "Dmitry V. Levin" <ldv@...linux.org>,
        David Howells <dhowells@...hat.com>,
        Zach Brown <zab@...hat.com>,
        Eric B Munson <emunson@...mai.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Jiri Slaby <jslaby@...e.cz>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Borislav Petkov <bp@...en8.de>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Dmitry Safonov <dsafonov@...tuozzo.com>,
        Mateusz Guzik <mguzik@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [RESEND][PATCH v2 1/3] syscalls,x86 Expose arch_prctl on x86-32.

On Wed, Sep 14, 2016 at 2:59 PM, Dmitry Safonov <0x7f454c46@...il.com> wrote:
> 2016-09-15 0:08 GMT+03:00 Kyle Huey <me@...ehuey.com>:
>> Signed-off-by: Kyle Huey <khuey@...ehuey.com>
>> ---
>>  arch/x86/entry/syscalls/syscall_32.tbl |  1 +
>>  arch/x86/kernel/process.c              | 80 ++++++++++++++++++++++++++++++++++
>>  arch/x86/kernel/process_64.c           | 66 ----------------------------
>>  3 files changed, 81 insertions(+), 66 deletions(-)
>>
>> diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl
>> index f848572..3b6965b 100644
>> --- a/arch/x86/entry/syscalls/syscall_32.tbl
>> +++ b/arch/x86/entry/syscalls/syscall_32.tbl
>> @@ -386,3 +386,4 @@
>>  377    i386    copy_file_range         sys_copy_file_range
>>  378    i386    preadv2                 sys_preadv2                     compat_sys_preadv2
>>  379    i386    pwritev2                sys_pwritev2                    compat_sys_pwritev2
>> +380    i386    arch_prctl              sys_arch_prctl
>
> Why not define it as other 32-bit syscalls with compat_sys_ prefix
> with the help of COMPAT_SYSCALL_DEFINE() macro?
> Then you could omit code moving, drop is_32 helper.
> I miss something obvious?

The code will have to move regardless, because right now do_arch_prctl
is in process-64.c which is only compiled on a 64 bit kernel.

As I told Dave Hansen in the non-RESEND thread (not sure why
git-send-email didn't put him in this one ...) I considered doing a
compat_sys_arch_prctl that would reject the relevant arch_prctls that
don't apply on 32 bit but I didn't see any prior art for it (in my
admittedly non-exhaustive search).

- Kyle

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ