From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H.J. Lu" Subject: Re: [RFC PATCH v9 01/27] Documentation/x86: Add CET description Date: Mon, 9 Mar 2020 14:12:31 -0700 Message-ID: References: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> Sender: linux-doc-owner@vger.kernel.org To: Dave Hansen Cc: Andy Lutomirski , Yu-cheng Yu , the arch/x86 maintainers , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , Jann Horn , Jonathan Corbet List-Id: linux-arch.vger.kernel.org On Mon, Mar 9, 2020 at 1:59 PM Dave Hansen wrote: > > On 3/9/20 1:54 PM, H.J. Lu wrote: > >> If a program with the magic ELF CET flags missing can=E2=80=99t make a > >> thread with IBT and/or SHSTK enabled, then I think we=E2=80=99ve made = an > >> error and should fix it. > >> > > A non-CET program can start a CET program and vice versa. > > Could we be specific here, please? > > HJ are you saying that: > * CET program can execve() a non-CET program, and > * a non-CET program can execve() a CET program > > ? Yes. > That's obvious. > > But what are the rules for clone()? Should there be rules for > mismatches for CET enabling between threads if a process (not child > processes)? What did you mean? A threaded application is either CET enabled or not CET enabled. A new thread from clone makes no difference. --=20 H.J. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-f195.google.com ([209.85.167.195]:36337 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbgCIVNK (ORCPT ); Mon, 9 Mar 2020 17:13:10 -0400 MIME-Version: 1.0 References: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> In-Reply-To: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> From: "H.J. Lu" Date: Mon, 9 Mar 2020 14:12:31 -0700 Message-ID: Subject: Re: [RFC PATCH v9 01/27] Documentation/x86: Add CET description Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Hansen Cc: Andy Lutomirski , Yu-cheng Yu , the arch/x86 maintainers , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , x86-patch-review@intel.com Message-ID: <20200309211231.u5k5rs-YKnxtRETWgiK-8bnkreRb2FlBZPPg6H5cPUQ@z> On Mon, Mar 9, 2020 at 1:59 PM Dave Hansen wrote: > > On 3/9/20 1:54 PM, H.J. Lu wrote: > >> If a program with the magic ELF CET flags missing can=E2=80=99t make a > >> thread with IBT and/or SHSTK enabled, then I think we=E2=80=99ve made = an > >> error and should fix it. > >> > > A non-CET program can start a CET program and vice versa. > > Could we be specific here, please? > > HJ are you saying that: > * CET program can execve() a non-CET program, and > * a non-CET program can execve() a CET program > > ? Yes. > That's obvious. > > But what are the rules for clone()? Should there be rules for > mismatches for CET enabling between threads if a process (not child > processes)? What did you mean? A threaded application is either CET enabled or not CET enabled. A new thread from clone makes no difference. --=20 H.J.