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: <c8077be0-f61f-d84d-fcd1-13c5ba482a38@intel.com>
Date:   Wed, 24 Feb 2021 11:52:33 -0800
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     Borislav Petkov <bp@...en8.de>, 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>,
        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>,
        Pengfei Xu <pengfei.xu@...el.com>,
        Haitao Huang <haitao.huang@...el.com>,
        Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [PATCH v21 06/26] x86/cet: Add control-protection fault handler

On 2/24/2021 11:42 AM, Borislav Petkov wrote:
> On Wed, Feb 24, 2021 at 11:30:34AM -0800, Andy Lutomirski wrote:
>> On Wed, Feb 24, 2021 at 11:20 AM Borislav Petkov <bp@...en8.de> wrote:
>>>
>>> On Wed, Feb 24, 2021 at 09:56:13AM -0800, Yu, Yu-cheng wrote:
>>>> No.  Maybe I am doing too much.  The GP fault sets si_addr to zero, for
>>>> example.  So maybe do the same here?
>>>
>>> No, you're looking at this from the wrong angle. This is going to be
>>> user-visible and the moment it gets upstream, it is cast in stone.
>>>
>>> So the whole use case of what luserspace needs to do or is going to do
>>> or wants to do on a SEGV_CPERR, needs to be described, agreed upon by
>>> people etc before it goes out. And thus clarified whether the address
>>> gets copied out or not.
>>
>> I vote 0.  The address is in ucontext->gregs[REG_RIP] [0] regardless.
>> Why do we need to stick a copy somewhere else?
>>
>> [0] or however it's spelled.  i can never remember.
> 
> Fine with me. Let's have this documented in the manpage and then we can
> move forward with this.
> 
> Thx.
> 

The man page at https://man7.org/linux/man-pages/man2/sigaction.2.html says,

SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP fill in si_addr with the 
address of the fault.

But it is not entirely true.

I will send a patch to update it, and another patch for the si_code.

--
Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ