Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3329054imu; Mon, 19 Nov 2018 14:19:26 -0800 (PST) X-Google-Smtp-Source: AJdET5d43juUJaAgyPcmQH/GvsgikfROKi6M098L9WZ+ggUevItM7fV3GaFKWydWxFx7rzs6K2T7 X-Received: by 2002:a63:c64f:: with SMTP id x15mr21231111pgg.16.1542665966746; Mon, 19 Nov 2018 14:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542665966; cv=none; d=google.com; s=arc-20160816; b=goUZq26cpYkBmkgXsztB8flQ6RoghHWWbbZPbd6NBZUhzg93Alrvn/+leXTM5yuoLs FFTrqbV7hAosRekFrTe77bzYttACgO0uEMDcSx3IHl+ccJOGe0rf5DZSgSO9W2bve52y TAsDpOyX41UYKjFsXmlFOUzECj2mk/Z19s+IUOSQrh1/tMufnOTcM/aS/OZeOumRlJGR CmpvVBgPtkJSVlPFUgWjyypUbMJIwx0QabauUaxcBccjOHcUQNEbnSyT61sM5iazYhke v5czT7h+F3bABQ0ApHNjYctniJAS+3OJpBiPYxCIYvd3Js8GrlQVxbqT0jMf4ShZnlVW Etqw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=rn6DTdvqAWgPMVnXBkpNx8JUXTqj9odqPaLxlpVq9GY=; b=oCTr6iimv4ugzxQE2A5fEvz0jtmkYFsfYl3hxG4uhClLmgEr6Z0Hck6Rd5WiDbMdJi SsZtgcpwo57XkfGubMC9myL7UByUvPbHzWHRmMvyUw2R5aBv5y3IRQS5JhOHgMzstxqA 024x3EtO0RMSXsEjPK87cTsxXJJmyieDlh+4f/gboJ1/sDZ+ml8Na2pqFzw/Wh9n5vx9 Xfb6q56MmIO/+FaKMr4n8cWyuPmhwOk4Yp6qpCehCwtTpwyJ1BRc3M6jQWzmvh1XiPC5 xDUN0zqehSiveOMYqeHAH48nPJTLDbZfdwi5OcNVhUrJVvVQUFVOrjS8nKGTqCDvm6yq 8zqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b="G5Zj+kB/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207si1495934pfz.249.2018.11.19.14.19.11; Mon, 19 Nov 2018 14:19:26 -0800 (PST) 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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b="G5Zj+kB/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729611AbeKTIns (ORCPT + 99 others); Tue, 20 Nov 2018 03:43:48 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46657 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbeKTIns (ORCPT ); Tue, 20 Nov 2018 03:43:48 -0500 Received: by mail-wr1-f68.google.com with SMTP id l9so20808480wrt.13 for ; Mon, 19 Nov 2018 14:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rn6DTdvqAWgPMVnXBkpNx8JUXTqj9odqPaLxlpVq9GY=; b=G5Zj+kB/DaPzFLkMUYOSH0jVEoj14icD+FYAsOkO++yUs7sqsA1BFRQXpJw1ybRXrO UQN/1gM5jbJAd5hI5zrckdCiklRoesLWWzBmM1r8Nmnq7UpUiRGFACYyKMVgACG+6MIW TeFnQG6MV+1t7FQMFvCbaeaPllvEfJkuAFMWGW+hJ9iki3WGgB6towompIrX27cKZWz9 cOdQcMudfG3VEWWbMCWXPyMaARsP6YbojroF3PWy02H2pdmANuMnJMA90agoHf4aRoQ5 ETy1O/mq6zZR7AQy4TvYQcOBIPygaq5NDLpRHNC0G4B1qzOmNtgub9aZrQtQIGlhDm97 uhag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rn6DTdvqAWgPMVnXBkpNx8JUXTqj9odqPaLxlpVq9GY=; b=tr11rbQqnrJYSbmNlehOT3GfnCRsNgvT21Cd5gR7ORRvfyt9ZbPkVdhlkFNsgQnWe5 PJseBIT0fyvUAS6Gjv3/KGH+Qjf3fTf1LCoysSMskpxmTxuSIsfkDHQKCU8buJj2889U ai2Sv6ECb3AarefcV9n+HNNlVO5+5ThFKOwSRG63ExjpMnuYAmda2QoFmjOkto6BhSgR rDsi+zQDfJ+JWLY7ex8BdR1OP6c7qJGFJpp2M+SDc6Cusi40BKkkgul7RxWcu4BqXd47 wNWBgG1S3HIvEOceg7lDqJDDmeYohV+rBMDgZX/YWD+C3zQnJwEkZTF419CeeknuhG2r NG0Q== X-Gm-Message-State: AGRZ1gIQmIA3rne0xX53nDxAwzkLYceUwSZQf0AH593mD9ANFPYmi1/i ld7YSsLEVgqBebdwJewSL0l6jjMgfMiFtEyyv0w/uA== X-Received: by 2002:adf:e08c:: with SMTP id c12mr18845438wri.199.1542665880506; Mon, 19 Nov 2018 14:18:00 -0800 (PST) MIME-Version: 1.0 References: <20181119214934.6174-1-yu-cheng.yu@intel.com> <20181119214934.6174-9-yu-cheng.yu@intel.com> In-Reply-To: <20181119214934.6174-9-yu-cheng.yu@intel.com> From: Andy Lutomirski Date: Mon, 19 Nov 2018 14:17:48 -0800 Message-ID: Subject: Re: [RFC PATCH v6 08/11] x86: Insert endbr32/endbr64 to vDSO To: Yu-cheng Yu Cc: X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H. J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , "Shanbhogue, Vedvyas" 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 Mon, Nov 19, 2018 at 1:55 PM Yu-cheng Yu wrote: > > From: "H.J. Lu" > > When Intel indirect branch tracking is enabled, functions in vDSO which > may be called indirectly must have endbr32 or endbr64 as the first > instruction. Compiler must support -fcf-protection=branch so that it > can be used to compile vDSO. > > Signed-off-by: H.J. Lu > --- > arch/x86/entry/vdso/.gitignore | 4 ++++ > arch/x86/entry/vdso/Makefile | 12 +++++++++++- > arch/x86/entry/vdso/vdso-layout.lds.S | 1 + > 3 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/entry/vdso/.gitignore b/arch/x86/entry/vdso/.gitignore > index aae8ffdd5880..552941fdfae0 100644 > --- a/arch/x86/entry/vdso/.gitignore > +++ b/arch/x86/entry/vdso/.gitignore > @@ -5,3 +5,7 @@ vdso32-sysenter-syms.lds > vdso32-int80-syms.lds > vdso-image-*.c > vdso2c > +vclock_gettime.S > +vgetcpu.S > +vclock_gettime.asm > +vgetcpu.asm What's this hunk about?