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, 1 Sep 2020 10:49:01 -0700
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     "H.J. Lu" <hjl.tools@...il.com>,
        Florian Weimer <fweimer@...hat.com>
Cc:     Dave Martin <Dave.Martin@....com>,
        Dave Hansen <dave.hansen@...el.com>,
        Andy Lutomirski <luto@...nel.org>, 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>,
        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>,
        Weijiang Yang <weijiang.yang@...el.com>
Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for
 shadow stack

On 8/27/2020 7:08 AM, H.J. Lu wrote:
> On Thu, Aug 27, 2020 at 7:07 AM H.J. Lu <hjl.tools@...il.com> wrote:
>>
>> On Thu, Aug 27, 2020 at 6:36 AM Florian Weimer <fweimer@...hat.com> wrote:
>>>
>>> * H. J. Lu:
>>>
>>>> On Thu, Aug 27, 2020 at 6:19 AM Florian Weimer <fweimer@...hat.com> wrote:
>>>>>
>>>>> * Dave Martin:
>>>>>
>>>>>> You're right that this has implications: for i386, libc probably pulls
>>>>>> more arguments off the stack than are really there in some situations.
>>>>>> This isn't a new problem though.  There are already generic prctls with
>>>>>> fewer than 4 args that are used on x86.
>>>>>
>>>>> As originally posted, glibc prctl would have to know that it has to pull
>>>>> an u64 argument off the argument list for ARCH_X86_CET_DISABLE.  But
>>>>> then the u64 argument is a problem for arch_prctl as well.
>>>>>
>>>>
>>>> Argument of ARCH_X86_CET_DISABLE is int and passed in register.
>>>
>>> The commit message and the C source say otherwise, I think (not sure
>>> about the C source, not a kernel hacker).
>>
>> It should read:
>>
>> arch_prctl(ARCH_X86_CET_DISABLE, unsigned long features)
>>
> 
> Or
> 
> arch_prctl(ARCH_X86_CET_DISABLE, unsigned int features)
> 

Like other arch_prctl()'s, this parameter was 'unsigned long' earlier. 
The idea was, since this arch_prctl is only implemented for the 64-bit 
kernel, we wanted it to look as 64-bit only.  I will change it back to 
'unsigned long'.

Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ