From patchwork Thu Oct 11 15:16:53 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: 10636925 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 5E84A17E1 for ; Thu, 11 Oct 2018 15:23:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C0C92B96B for ; Thu, 11 Oct 2018 15:23:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3975E2B9D8; Thu, 11 Oct 2018 15:23:18 +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 D3A962B96B for ; Thu, 11 Oct 2018 15:23:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3634A6B02A0; Thu, 11 Oct 2018 11:22:10 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1691E6B02AC; Thu, 11 Oct 2018 11:22:10 -0400 (EDT) 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 B7E696B02A9; Thu, 11 Oct 2018 11:22:09 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by kanga.kvack.org (Postfix) with ESMTP id 46CBE6B02A4 for ; Thu, 11 Oct 2018 11:22:09 -0400 (EDT) Received: by mail-pl1-f197.google.com with SMTP id l7-v6so6526794plg.6 for ; Thu, 11 Oct 2018 08:22:09 -0700 (PDT) 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=hXJT+7vB8TpNHVfne1WqDnV++s8ZMbzObERQ5mI6tpduOfCUVoN+cvkbs7G4TyJv5O B/GiWP+FLA+iMOSxLxu2S7CGNKHw4eoExr2OIIUcCiXOU++ALasEvTdt7YxSS2nol1Kn qTGr6314ZopAnRMiwv6LZwk0ap70RYrN2ZcEnDw2pkMUt6d18hQYDnFELNBFl2DPVIq6 vFPWTkLete/CpxAPMj/xvcK6n1o0BfCRhHCI8Ig8nk59v/tKU/auirQzTazmjDx68V6R AYncEuuv/1C00ZfC2vxdP8z1mE0kV/rxGJQSemDW6dVVpFkqW4/MC0dAdRYyK+/CRX5F wsuA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 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: ABuFfojeYXHwFBswv8jAarkN4hh1pLcelJdbHvncbqlGOUsPz6r+kyBk eYR/5nsKOg7RZbe7TM3hhuZm1zDh4BkqY5pVlqvAKIRsLQO8laJ5rGXNCM3MD9ZHCXRQ2fAAvLA /q9Be6cDrTNsvLKTbpk5N75hcOBxadKC6uqJNtJM/bgxITA5B09QjR5bnkYavhcK8sg== X-Received: by 2002:a63:2e47:: with SMTP id u68-v6mr1862247pgu.294.1539271328956; Thu, 11 Oct 2018 08:22:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV629r3OgdHBs1QgXaQtyImVrTE13waTBr64KUIK/lVhehX6FzNTU6Gnw9bxHTovwLJGBKYN5 X-Received: by 2002:a63:2e47:: with SMTP id u68-v6mr1862211pgu.294.1539271328351; Thu, 11 Oct 2018 08:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539271328; cv=none; d=google.com; s=arc-20160816; b=ZFzI1tPKqIs7Rg5F6iWipaEtxCEH+4DAd1EGSYITTk3MXv9makzv4EgULui/jEDZWk kytT9kCWX1dAyaeTzrd+2KUdj1oix0vu8fBwjLH0QInLWiugjWHaAKDHNYPFtQqXcbjD kER0LIHTnZVCTRGpD8nB/hNlSAoB0DOzaHwthJpWg/h9llfR2TsFYE9IFtu4tZv0rX8+ EoXFVSkGJ45KMcHYCcR+P2mYsy0JEMylpoDS8jxELyWgzEd27Dw4pgRx1DO3rnSfeHg9 IY+p1WmpC27PrPj7SzoQqoMJq8U+pV69hpXvVhqxNvkCYYjQW+Us9MdTcPVJUggyyJXi IB6w== 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=mPFuA+AEeQMkGQSkLbXtn5NMwU5t1JduTzZMS7526tBSInAKTW4Xzq0/kdz5e5CK3s E/eyz24RYp7rQCTEA0i7BTUaMsQff0gwf6pf7zG7LwNKc1uOCVyP5T2NZhADX49wDZMg ftdCLvGv2LJE51iPtHfJTiCUAEOFE7ghpV72YybKro2yDRnG/euOm4fVpst2IL6GVxq+ iAai0ZhaguvcMCbi2rdsP5Ie7wLZxB26GyCmCZEfgjkYssRr59Xu5VrGwUur8bY8MlfC vgyhj+z0K7mf799STxGVgTlZGxQhCCM3y++KY9EvXVTFTlfQTYgld8INnDtc8J8I2/lF nOpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga14.intel.com (mga14.intel.com. [192.55.52.115]) by mx.google.com with ESMTPS id a28-v6si14382557pfc.106.2018.10.11.08.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 08:22:08 -0700 (PDT) Received-SPF: pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) client-ip=192.55.52.115; Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 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 fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 08:22:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="77271646" Received: from 2b52.sc.intel.com ([143.183.136.147]) by fmsmga007.fm.intel.com with ESMTP; 11 Oct 2018 08:21:45 -0700 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: [PATCH v5 10/11] x86/vsyscall/64: Add ENDBR64 to vsyscall entry points Date: Thu, 11 Oct 2018 08:16:53 -0700 Message-Id: <20181011151654.27221-11-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011151654.27221-1-yu-cheng.yu@intel.com> References: <20181011151654.27221-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 --- 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