From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id 986EA6B0003 for ; Thu, 7 Jun 2018 19:00:24 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id w6-v6so6175609plp.14 for ; Thu, 07 Jun 2018 16:00:24 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id ba5-v6si17540224plb.184.2018.06.07.16.00.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 16:00:22 -0700 (PDT) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 6A5F4208A3 for ; Thu, 7 Jun 2018 23:00:21 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id e16-v6so139580wmd.0 for ; Thu, 07 Jun 2018 16:00:21 -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: From: Andy Lutomirski Date: Thu, 7 Jun 2018 16:00:08 -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: "H. J. Lu" Cc: Andrew Lutomirski , 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 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. If we really really need this patch, then I want some kind of assurance that selftests will catch the failure if something breaks it or a new vDSO entry point is added. But my inclination is to NAK this patch and let the distros carry it if they really really want it. As it stands, this sucks for maintainability.