From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id 2E5026B0003 for ; Thu, 7 Jun 2018 20:31:37 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id j7-v6so6886293oib.19 for ; Thu, 07 Jun 2018 17:31:37 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j78-v6sor11314130oib.209.2018.06.07.17.31.35 for (Google Transport Security); Thu, 07 Jun 2018 17:31:35 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180607143855.3681-1-yu-cheng.yu@intel.com> <20180607143855.3681-6-yu-cheng.yu@intel.com> From: "H.J. Lu" Date: Thu, 7 Jun 2018 17:31:34 -0700 Message-ID: Subject: Re: [PATCH 5/7] x86: Insert endbr32/endbr64 to vDSO Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski Cc: Yu-cheng Yu , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com On Thu, Jun 7, 2018 at 4:00 PM, Andy Lutomirski wrote: > On Thu, Jun 7, 2018 at 3:03 PM H.J. Lu wrote: >> >> On Thu, Jun 7, 2018 at 1:50 PM, Andy Lutomirski wrote: >> > On Thu, Jun 7, 2018 at 7:42 AM Yu-cheng Yu wrote: >> >> >> >> From: "H.J. Lu" >> >> >> >> When Intel indirect branch tracking is enabled, functions in vDSO which >> >> may be called indirectly should have endbr32 or endbr64 as the first >> >> instruction. We try to compile vDSO with -fcf-protection=branch -mibt >> >> if possible. Otherwise, we insert endbr32 or endbr64 by hand to assembly >> >> codes generated by the compiler. >> > >> > Wow, that's... a genuine abomination. Do we really need to support >> > CET on kernels built with old toolchains? >> > >> >> Yes. GCC 7 should be able to build CET kernel. >> > > Why? Presumably people running distros that use CET are going to have > kernels build with a CET-supporting compiler. > Good point. It was needed before GCC 8 was released. We can drop arch/x86/entry/vdso/endbr.sh now. -- H.J.