From patchwork Mon Nov 19 21:49:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-cheng Yu X-Patchwork-Id: 10689587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D94F96C5 for ; Mon, 19 Nov 2018 21:56:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC4D32A583 for ; Mon, 19 Nov 2018 21:56:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C06AA2A6EE; Mon, 19 Nov 2018 21:56:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 632F12A583 for ; Mon, 19 Nov 2018 21:56:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 015C16B1CBA; Mon, 19 Nov 2018 16:55:07 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E429C6B1CBB; Mon, 19 Nov 2018 16:55:06 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0A686B1CBC; Mon, 19 Nov 2018 16:55:06 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id 8B86B6B1CBA for ; Mon, 19 Nov 2018 16:55:06 -0500 (EST) Received: by mail-pl1-f200.google.com with SMTP id o23so13359752pll.0 for ; Mon, 19 Nov 2018 13:55:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to :subject:date:message-id:in-reply-to:references; bh=3ugSYk0cuonbsBh5Oq+uwsNMoaUkt7zsjtm/OCNTtIE=; b=U46MZyt4bVNgEhPHTf4wtx2h9Ao1YI4VVdt0SGmdzJgjv6sWIzo6+nYyt+ZHeTm7MN 6sjELp4eO78/z+KY9i7xcacGZ8kuxkLCRbner2Ejq4inW1jWEaTqA13cbrdoqqTKHFUf nHtb9UfsP/yH5vlHxHOCybA7u9P/umDT0c+NsJuSnX2Krzv7FkGxRcHF2fA0LvM6LWhW iYBOqXzt7fvwX6EIsGyEHP8cIYRlpO5Yr83G8iyleB5Ipy80UqlhzKDTY1nbp8HsTtqC xjKCHT4jlSlQHrOc64DuU8bHJeLuL0E6hokrlwVGv8p+VZYvxFXjqWbZcRlWqKHQmaJG M3Qw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: AGRZ1gLv5wioZQg7Ui8D9e7t5GVtEgKUHWXnn/S55SrbTD3F5tmHYZzY 8x4piBQ007jWs8efiZTwrg8UCrqL33xF4KPx451SrDhPCLQ3ZKiX5wCslHF/Sjl3kvSZFUboGpB 5r3+eTZ1c1bose0dk83ktog97GbifvNozcX0XxSBffZKEvz0uwHkpat/Q2mkCl5qnWw== X-Received: by 2002:a17:902:bd8e:: with SMTP id q14mr23242447pls.146.1542664506272; Mon, 19 Nov 2018 13:55:06 -0800 (PST) X-Google-Smtp-Source: AJdET5eacT/uZgxeQpIOwcA11F67n5TIwjQWq5rZrZ560MpcdEhOnHZQLrT3fQWNeKMRGgHHzEgc X-Received: by 2002:a17:902:bd8e:: with SMTP id q14mr23242413pls.146.1542664505421; Mon, 19 Nov 2018 13:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542664505; cv=none; d=google.com; s=arc-20160816; b=vrvGO1H0qhjK8g3k+DU0O2Ttct7kyhCofMnTqAOLa3p9RNJ3LPKFtUswWGu2hbeRpk RuztsOcY/8QseVyKdwajnEsAsLY19A/h/cWtrmvlVLAaHKzUpIzDLANek2+rIAYGZ5wo RimsXomkHlx43fHMrNkJAFgQM6cIHjdFgn1fm9kMq00rSATpt4bzI5gU+FeFgNxOd7Gt FybxgJjFMx2Y5ulqIT708xbJ6PgAhExSZgi2qwA/He+98t0rMGJwNUMsYf6XCBfvT+qE xb+NTMTxpYFr2z4ApBs5A9c6tIgMvGr368bgjlk4xB9NjFQOItIaeUGWAImezWlzEcTI KbHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from; bh=3ugSYk0cuonbsBh5Oq+uwsNMoaUkt7zsjtm/OCNTtIE=; b=OEnBlzda6b8p24xXczkoQphULfm6QrdDYmOx4a+BF8N7yVfUCVb+MsYvmPQzwPEzty gu3Fd8UmwSvM+fLkBDbLqKBRJuGcVf6Ev+b3QvGXZ4Sa3ZlmZbzcAK09wPghFuDQCHfW UkPDYPUM2hRg48P74l95c7lPosrgPUDyL3LE0HqUwNLpHlesSn7XLYE7ccCUM9PRvFpK 8HfZQbYkPePVPIMbpeJOhZ5MBjcRts7LJsDBFj+gx8JFQcMri2YEr1v2iBJiidyPoeF2 S0GmK0RqXM77O5CIWgfMKluZVe2Konl88F/BEkU3HheSFphIKO6s/9WnLrRh/vllOCg9 /QBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by mx.google.com with ESMTPS id s8si4586261plq.345.2018.11.19.13.55.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 13:55:05 -0800 (PST) Received-SPF: pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.93 as permitted sender) client-ip=192.55.52.93; Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2018 13:55:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,254,1539673200"; d="scan'208";a="92423933" Received: from yyu32-desk1.sc.intel.com ([143.183.136.147]) by orsmga006.jf.intel.com with ESMTP; 19 Nov 2018 13:55:03 -0800 From: Yu-cheng Yu To: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , 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" , Vedvyas Shanbhogue Subject: [RFC PATCH v6 10/11] x86/vsyscall/64: Add ENDBR64 to vsyscall entry points Date: Mon, 19 Nov 2018 13:49:33 -0800 Message-Id: <20181119214934.6174-11-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181119214934.6174-1-yu-cheng.yu@intel.com> References: <20181119214934.6174-1-yu-cheng.yu@intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: "H.J. Lu" Add ENDBR64 to vsyscall entry points. Signed-off-by: H.J. Lu Acked-by: Andy Lutomirski --- arch/x86/entry/vsyscall/vsyscall_emu_64.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/entry/vsyscall/vsyscall_emu_64.S b/arch/x86/entry/vsyscall/vsyscall_emu_64.S index c9596a9af159..08554445bef1 100644 --- a/arch/x86/entry/vsyscall/vsyscall_emu_64.S +++ b/arch/x86/entry/vsyscall/vsyscall_emu_64.S @@ -18,16 +18,25 @@ __PAGE_ALIGNED_DATA .type __vsyscall_page, @object __vsyscall_page: +#ifdef CONFIG_X86_INTEL_BRANCH_TRACKING_USER + endbr64 +#endif mov $__NR_gettimeofday, %rax syscall ret .balign 1024, 0xcc +#ifdef CONFIG_X86_INTEL_BRANCH_TRACKING_USER + endbr64 +#endif mov $__NR_time, %rax syscall ret .balign 1024, 0xcc +#ifdef CONFIG_X86_INTEL_BRANCH_TRACKING_USER + endbr64 +#endif mov $__NR_getcpu, %rax syscall ret