Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp236332imm; Thu, 7 Jun 2018 17:32:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJd7HwCm1R7LVjWsM9N85VpBSaSR8nv0hfo3i2PyEtdStBIiJvtvLq6F8n9VkRPOmH3xytN X-Received: by 2002:a62:dc1c:: with SMTP id t28-v6mr3710495pfg.137.1528417950050; Thu, 07 Jun 2018 17:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528417950; cv=none; d=google.com; s=arc-20160816; b=YqIXhglmbJptGGnQD/lN4Bvo89Zx0e6nFRQz/VrJJV7CCh/tWGbAv7G3Kghq1wQUJN xoVb1Kqg9K98ekuSSIaIRqqs/99Z8f7H6oc+nKmsg/RLDVM0bgtCJBeVAiumA0eLsmyA 5OLRl66R4BsFtldasBFY3k3POeTY6k7D/HYAdRtA21p85WWCAh51ooTlSFtbXh0MDd6C YdoMJ/a64sC7910gSYuELAKT919LP03VlE1AUk0RHnVc/zqVsKMEOQV8y72ptvRsnKr3 J+NWhB7Jnf2VHUMmhWwQSOjTrpqIU2UdC9zl8Bwgn3BoSVhyMZUIPLgKmWlDmP3IJIue eWsw== 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=OSYjGIENvG29sYpiyyH9ynx5R7L4hWBQAaJEqveB8j8=; b=Zg5Q7fWmM/QkrPVGbYCDMyaI1CcTFozw3ZxhwAtniZmin166ZIt0OqNjC856BNnS+c nahjAPI2vugJribFVsncLgER6DfpXYhdfj+FiLpYjMXhf6BDZt5rVOZ1yYl6WgjcYML2 VFCSvFADLedjK2AFOFLJXoCGttRAD1hd3PRluhjO2xarb2OF6H9DEyDVjl1e2HdcLt2C UWCdCkvTB/Bt6J67STyIuDvHRpdmmEEdFMFnN50GLb3XEnYGNLBFUSjWJhZYOs5J1+ct 1Rc3M8Dja5oRwzHKg+g0OqFUWryPst4g61aTZ1qY4+1GRwgWwanes5RNazuKjqU27vR6 Rh1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SHGIQg/q; 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 c11-v6si17395419pgt.686.2018.06.07.17.32.15; Thu, 07 Jun 2018 17:32:30 -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=SHGIQg/q; 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 S1752685AbeFHAbi (ORCPT + 99 others); Thu, 7 Jun 2018 20:31:38 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:35956 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbeFHAbg (ORCPT ); Thu, 7 Jun 2018 20:31:36 -0400 Received: by mail-oi0-f66.google.com with SMTP id 14-v6so10332333oie.3; Thu, 07 Jun 2018 17:31:35 -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=OSYjGIENvG29sYpiyyH9ynx5R7L4hWBQAaJEqveB8j8=; b=SHGIQg/q7rNC2ehV3yXlGpz6lVhGkDRKQ3xYuwirvGCRzpkkeW4K5xfCn/ykeVsSHS t3SeboknUdDEGEmTy1pSnFuPDb+D+loBW7g/EZ3YV/TcrVT0mKQHnYju16H13mWqnsID bUty+39GYfGb/3oVr/bBJLXpjuVBjhrvAu+cyRujgo9uHOcKgKO+4qjHN7Ir1qdZhhDy +J4o4gF8jaq/dsls4dYOBgmrte4hOe+DlYAfp8s2GcwJ0IiGzJDs4YGV30uBCrz17v6Z MWqgpSEH30ManYo0G+TKXluzbbESFWoAkR/nUDK2HbxeqzuqEVq0uNGvChtWztMO803h XgXg== 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=OSYjGIENvG29sYpiyyH9ynx5R7L4hWBQAaJEqveB8j8=; b=CHGzovyIiyTekfbVtlRGULlQ/9Fo/fC34FnI+GTNDkSXFTp5bMujGm8qk+UV5OrRH8 OnGMOHn0eVxsiIjDGsLzyU3RhCe8O7Yy9WLCs/D4rOAuhvpnjRy16rKgA+UmcmD3ckBs cHhQ0/kzEyJwkURfGms2il6wNsVSylcFf5ZtqPcOAHg56j/RQnk7q78vpRRuEpvGGjoA 1fiq6PfN2we/NyyWTta17lD3z8HRknCFWhrLGycX/RleT2t9pidjME6H+YasKgtO+Shv YnHH0SGTJwsDJ+zezH4b4qRV/BQ9anE4o6BryZ4CHwky8AkD7Z28pcSh+LfUSyW0Moiu +Mcw== X-Gm-Message-State: APt69E2ICg0vjvC1MLCyZK5PNlkJEMPWmpHNAuYn+/eFnjNbA9jj3FRy cONaDYehYwYixpRUjj5XTRhia7g4f4ehfC5Y570= X-Received: by 2002:aca:df54:: with SMTP id w81-v6mr2259653oig.104.1528417895456; Thu, 07 Jun 2018 17:31:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:7019:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 17:31:34 -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 17:31:34 -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 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.