From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by kanga.kvack.org (Postfix) with ESMTP id 53C7C6B1CEE for ; Mon, 19 Nov 2018 17:18:02 -0500 (EST) Received: by mail-wr1-f70.google.com with SMTP id x13so18393784wro.9 for ; Mon, 19 Nov 2018 14:18:02 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a14sor4140402wrm.46.2018.11.19.14.18.00 for (Google Transport Security); 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 Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: 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" 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?