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:   Tue, 25 Aug 2020 14:04:00 -0700
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     Dave Hansen <dave.hansen@...el.com>,
        Andy Lutomirski <luto@...nel.org>
Cc:     X86 ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Linux API <linux-api@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Balbir Singh <bsingharora@...il.com>,
        Borislav Petkov <bp@...en8.de>,
        Cyrill Gorcunov <gorcunov@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Eugene Syromiatnikov <esyr@...hat.com>,
        Florian Weimer <fweimer@...hat.com>,
        "H.J. Lu" <hjl.tools@...il.com>, Jann Horn <jannh@...gle.com>,
        Jonathan Corbet <corbet@....net>,
        Kees Cook <keescook@...omium.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Nadav Amit <nadav.amit@...il.com>,
        Oleg Nesterov <oleg@...hat.com>, Pavel Machek <pavel@....cz>,
        Peter Zijlstra <peterz@...radead.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        Vedvyas Shanbhogue <vedvyas.shanbhogue@...el.com>,
        Dave Martin <Dave.Martin@....com>,
        Weijiang Yang <weijiang.yang@...el.com>
Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for
 shadow stack

On 8/25/2020 12:19 PM, Dave Hansen wrote:
> On 8/25/20 11:43 AM, Yu, Yu-cheng wrote:
>>>> arch_prctl(ARCH_X86_CET_MMAP_SHSTK, u64 *args)
>>>>       Allocate a new shadow stack.
>>>>
>>>>       The parameter 'args' is a pointer to a user buffer.
>>>>
>>>>       *args = desired size
>>>>       *(args + 1) = MAP_32BIT or MAP_POPULATE
>>>>
>>>>       On returning, *args is the allocated shadow stack address.
>>>
>>> This is hideous.  Would this be better as a new syscall?
>>
>> Could you point out why this is hideous, so that I can modify the
>> arch_prctl?
> 
> Passing values in memory is hideous when we don't have to.  A syscall
> would let you have separate arguments for size and flags and would also
> let you have a nice return value instead of needing to do that in memory
> too.

That is a good justification.

> 
>> I think this is more arch-specific.  Even if it becomes a new syscall,
>> we still need to pass the same parameters.
> 
> Right, but without the copying in and out of memory.
> 
Linux-api is already on the Cc list.  Do we need to add more people to 
get some agreements for the syscall?

Powered by blists - more mailing lists