Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp124143imm; Thu, 7 Jun 2018 15:06:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4o+lGUpjWYZy9cznnRKGHQZ52FaUYFvNvbwSB2sC1EXwb4JO3zZZJMMtxFIFiPjgTygbX X-Received: by 2002:a17:902:341:: with SMTP id 59-v6mr3674326pld.349.1528409161178; Thu, 07 Jun 2018 15:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528409161; cv=none; d=google.com; s=arc-20160816; b=Gmy1G3UrvtipcWV+N3HUYghi5TSG9tPG3fpG90EcB0P7pmhDDQspl8JdjMg0wHG0tl kY81qrohP6keCxUYenf5wam+8+4MOz1RY14sONpOfFYkRaBAt/pFOR5XtOPUNigUMb7j 76YOM1SzhFIE9x1o5ypV1kEoKwqE5EWq0lgWgNaogixVLJZChxJVZ3RBlV35nErUpqAH N+Mzs6JOYC/j9SRRnSFHPcHcxcawv0G4zCCLPSDx1TW8yNgzcJy5x8SbcfI63+Bzf/2v 7MG2xr7uBM++g4JHwoJdMpsp7gQ/Ux8qeZ1K9aVKfl2e0AkKFo4kERdiTicMSemb7Bf0 JySw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=LHwiXGTDOH7nVeZGDgYlZpmSyJin1x2ftVwUJU2VzVg=; b=IoLvdCRXH/2os2QWTisJTjsDDp1RMWKnW4eH4s1rYwGe/aKeqr7GkvHARA4lN++2tz YW1W5VKPW+FcXYQo5qFhsI11tpnyGGmo+3VZRC4svmy2254Uq+u/uGd6y6Uctp83EKBY YueVo61f5n2PCbbCl8XwXOanm5CFW5PYbOh/RvMKuXOkKo40ZBzPLSrdyZQ5xrb9T8ED IpI9dVUHOYY7iyjXrcsh5+//1vRJ4MrbdaXHFwIOWCDXuc6Ok7rqshxE7SKyAcq8vdWt kK6OZrwkZ6OQz4mjqORQ760DLySaFtR0ZMEyVQ3MuJCn9wcfkEylDLwIfULtlk/HjzYk rzIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q3XFwavH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2-v6si14647094pls.245.2018.06.07.15.05.46; Thu, 07 Jun 2018 15:06:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q3XFwavH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186AbeFGWEA (ORCPT + 99 others); Thu, 7 Jun 2018 18:04:00 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:35938 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbeFGWD6 (ORCPT ); Thu, 7 Jun 2018 18:03:58 -0400 Received: by mail-ot0-f196.google.com with SMTP id c15-v6so3538532otl.3; Thu, 07 Jun 2018 15:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LHwiXGTDOH7nVeZGDgYlZpmSyJin1x2ftVwUJU2VzVg=; b=q3XFwavHeM6SJYSXvPL3UHVuY97vTLNFEMRNEV0sXVs6ENomnjGxEHgYOgWltnmqbK dC/pxq/OVUu9Q9wTei3ywAxVeODQE0Pt9a22e3Jr4LpRnpd2bcfdV8uxrdlsXrzVYKcR 7q3+KiRQu3cQSFhdK6OJvQE/MEN3RJw85prAE9x7MSautljg0iYpaQuc0oSokSvRT1f4 1IqAkxGBm7iiAsfZvUTUWRvTrIs2mDUGzyP/8WfszIy3MY8zkheLqeCb8hUznq9KtAiz y+3uHg9E/qltXf0OwdNVEf031a6levHt19ESImzJCA4/U9xrWmvuJD/o1xXhwohhBShi RcTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LHwiXGTDOH7nVeZGDgYlZpmSyJin1x2ftVwUJU2VzVg=; b=BAx3wzmio49/CfrnNvB0TeCZteIX1S0CqzmG/9V+b6QUwn7cALiUKsmcF945b7yqoU J6hjHd6XGjastEXnc2nFYc8qhuCFMnXp9wpTr9zMLreN0HV6hQYJC36R7xeGvNY7hEw7 jGLnkwUej8WL/7k9MCaIf1Ls41nHmk3e4J8jWuoZnZ3oiq3lbiWk6QxlXI/S5jXxyoOm IB0Jqpx4qoUqFyVpfXOOF2ixgtm9tjmkFXlRZTyhuogxzL0pQBpqSLurqy5C/OqV8R2C 3oIZr7lLNbEzWSgAXVMQg9lWjFHwVuWtlHD59MqyDcEhowb7lvAC7Yp92CejG8G5xjIE XIiQ== X-Gm-Message-State: APt69E1fwe2tM/dKuz9bem9P1dVm1RZ5tSPnL24+9c2/tY1TcYrRRBr+ +7Yy/ZF//52w3ySq4VMM/ajfcTyQVa1jvAcAG/k= X-Received: by 2002:a9d:322f:: with SMTP id t47-v6mr2314232otc.7.1528409037712; Thu, 07 Jun 2018 15:03:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:7019:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 15:03:56 -0700 (PDT) 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 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.