From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by kanga.kvack.org (Postfix) with ESMTP id ED92E6B0003 for ; Thu, 7 Jun 2018 18:03:58 -0400 (EDT) Received: by mail-oi0-f71.google.com with SMTP id c23-v6so6688553oiy.3 for ; Thu, 07 Jun 2018 15:03:58 -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 r51-v6sor6724292ota.31.2018.06.07.15.03.57 for (Google Transport Security); Thu, 07 Jun 2018 15:03:58 -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 15:03:56 -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 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. -- H.J.