From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 262F16B0003 for ; Thu, 7 Jun 2018 16:50:42 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id j14-v6so5031471pfn.11 for ; Thu, 07 Jun 2018 13:50:42 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id u68-v6si15378891pgb.414.2018.06.07.13.50.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 13:50:41 -0700 (PDT) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B78F208B3 for ; Thu, 7 Jun 2018 20:50:40 +0000 (UTC) Received: by mail-wr0-f175.google.com with SMTP id w10-v6so11177486wrk.9 for ; Thu, 07 Jun 2018 13:50:40 -0700 (PDT) MIME-Version: 1.0 References: <20180607143855.3681-1-yu-cheng.yu@intel.com> <20180607143855.3681-6-yu-cheng.yu@intel.com> In-Reply-To: <20180607143855.3681-6-yu-cheng.yu@intel.com> From: Andy Lutomirski Date: Thu, 7 Jun 2018 13:50:26 -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: Yu-cheng Yu Cc: LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "H. J. Lu" , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com 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? --Andy