Message ID | 20170810172615.51965-10-thgarnie@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <xen-devel-bounces@lists.xen.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 923CB60236 for <patchwork-xen-devel@patchwork.kernel.org>; Thu, 10 Aug 2017 17:29:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79B6A285F0 for <patchwork-xen-devel@patchwork.kernel.org>; Thu, 10 Aug 2017 17:29:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D2AA286CF; Thu, 10 Aug 2017 17:29:16 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1AB542867D for <patchwork-xen-devel@patchwork.kernel.org>; Thu, 10 Aug 2017 17:29:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <xen-devel-bounces@lists.xen.org>) id 1dfrEb-0007h1-I6; Thu, 10 Aug 2017 17:27:01 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <thgarnie@google.com>) id 1dfrEZ-0007en-S3 for xen-devel@lists.xenproject.org; Thu, 10 Aug 2017 17:26:59 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id CC/D7-01729-3679C895; Thu, 10 Aug 2017 17:26:59 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRWlGSWpSXmKPExsXiVRusrZs0vSf S4PZNaYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPl7h8sBX/ZKm7M+s/awHiLtYuRi0NIYDqj xNqHTYwgDovAKxaJ7nsHwTISAv2sEh83zGbrYuQEcuIk5i55xwRhV0rsOfKRBcQWElCS2LphK TPEqH+MEm93f2IHSbAJaEnsaZjPBJIQEVgqKHGy9RrYDmaBFiaJJ/+2gY0SFnCTuDF9OdgoFg FVicaeV6wgNq+ApcTOE01Qq00knrROYgSxOYHi05bNZIZYbSEx9ddKpgmMAgsYGVYxahSnFpW lFukaG+glFWWmZ5TkJmbm6BoamOrlphYXJ6an5iQmFesl5+duYgQGWD0DA+MOxgmr/A4xSnIw KYnyFn/qjhTiS8pPqcxILM6ILyrNSS0+xCjDwaEkwcs/rSdSSLAoNT21Ii0zBxjqMGkJDh4lE d6tU4HSvMUFibnFmekQqVOMlhxNH7Z8YeKYdGA7kHw14f83JiGWvPy8VClxXmuQeQIgDRmleX DjYPF4iVFWSpiXkYGBQYinILUoN7MEVf4VozgHo5IwryvIFJ7MvBK4ra+ADmICOijCtxPkoJJ EhJRUA+MKqYdr+PbPqP3p+dl3beY1YaM9+5f4u/XlN6vzvn5sZ/5rm0uy55TM62qne5avr/ja c3m9LOdBFsb4z71GGUoavaWx+zbmXrzem3rIsthS/v+ja+qKu/icVTeIiNz8fHDNpfWCv8tWv 8icNz/Eds6WeRZhXRctZmyYrrt6fd00174tfiXMSduVWIozEg21mIuKEwGfRx7WwgIAAA== X-Env-Sender: thgarnie@google.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1502386017!91246785!1 X-Originating-IP: [74.125.83.43] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64153 invoked from network); 10 Aug 2017 17:26:58 -0000 Received: from mail-pg0-f43.google.com (HELO mail-pg0-f43.google.com) (74.125.83.43) by server-13.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 10 Aug 2017 17:26:58 -0000 Received: by mail-pg0-f43.google.com with SMTP id l64so5397685pge.5 for <xen-devel@lists.xenproject.org>; Thu, 10 Aug 2017 10:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mBrgigOZ++Fz56c2isXtglsiWkpOhuRw2dTPklpkhmE=; b=i4SC78rVJxvjSyvor7RguGIdKFrbdO7UtzSYriLx2cS0Dhc4XOknh1J6YISH/5x1ox 6TnczgBXYDbGFBFJr3RkA5bhVB8rNWxaE5Zj3WfcK/PVF0QRID7N/xSvCLvNacpwJpNG 2mnVnNM0g7AGiSBOnojvy9EB2C2bkXBiUKR8C9iVd88q8qGcQjxYWGrciEu4PIMWzJ62 eQY3t4+fqn4gswelZXSXHyDfnoxVMMxRzgxu9jpaFXhVhHrn1rAfMHP3AivQrbaInXab lO6G7pvAveRukHwxeT8C9Grn6hxA50bz9v0KEIzhqnwlgZt+nHbU1qkB09av4oNHG7bq I+jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mBrgigOZ++Fz56c2isXtglsiWkpOhuRw2dTPklpkhmE=; b=XjnpfDz9152h05JW+PHKRE3qhHjIafccBNpdkxR7nXmhNyftC5gBxSvjJmbz0wR6UT cWN6ZZi6yfLMGhQSCUPkigQDLVAzfDrOYjJ6BeY0GJ9YZpVST7bAnTaKxb8BbHabtyDs psav5a8yzNMvHhhqb6l5NDdyL5cW3djxoBGwa10boREl8ns6Swp5+8VJWaCbWUzkduPj fzyTwxeI3+sasxJKbQJ43BkL40WYcPhAyJVwtOsLhKtVPV2WWDdTQLTg5pRjJhSXDUTU GUFlat2rAJHSLe3501Eg+EWrH6Ym8Du++5tMz/TsjBF7pWLjYrwzbTA5xEnQMj2AeJvm fqZw== X-Gm-Message-State: AHYfb5gYnKFQJAelHM8JEwLwjema/fbHXSdkGojDzvicpYS+KUKPqz72 yOW5ivBgF00bHDCa X-Received: by 10.84.236.71 with SMTP id h7mr14213252pln.348.1502386016385; Thu, 10 Aug 2017 10:26:56 -0700 (PDT) Received: from skynet.sea.corp.google.com ([172.31.92.33]) by smtp.gmail.com with ESMTPSA id p77sm11894925pfi.153.2017.08.10.10.26.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Aug 2017 10:26:55 -0700 (PDT) From: Thomas Garnier <thgarnie@google.com> To: Herbert Xu <herbert@gondor.apana.org.au>, "David S . Miller" <davem@davemloft.net>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <peterz@infradead.org>, Josh Poimboeuf <jpoimboe@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Thomas Garnier <thgarnie@google.com>, Matthias Kaehlcke <mka@chromium.org>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Juergen Gross <jgross@suse.com>, Paolo Bonzini <pbonzini@redhat.com>, =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>, Joerg Roedel <joro@8bytes.org>, Tom Lendacky <thomas.lendacky@amd.com>, Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@suse.de>, Brian Gerst <brgerst@gmail.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, "Rafael J . Wysocki" <rjw@rjwysocki.net>, Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, Chris Metcalf <cmetcalf@mellanox.com>, Andrew Morton <akpm@linux-foundation.org>, "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>, Nicolas Pitre <nicolas.pitre@linaro.org>, Christopher Li <sparse@chrisli.org>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Lukas Wunner <lukas@wunner.de>, Mika Westerberg <mika.westerberg@linux.intel.com>, Dou Liyang <douly.fnst@cn.fujitsu.com>, Daniel Borkmann <daniel@iogearbox.net>, Alexei Starovoitov <ast@kernel.org>, Masahiro Yamada <yamada.masahiro@socionext.com>, Markus Trippelsdorf <markus@trippelsdorf.de>, Steven Rostedt <rostedt@goodmis.org>, Kees Cook <keescook@chromium.org>, Rik van Riel <riel@redhat.com>, David Howells <dhowells@redhat.com>, Waiman Long <longman@redhat.com>, Kyle Huey <me@kylehuey.com>, Peter Foley <pefoley2@pefoley.com>, Tim Chen <tim.c.chen@linux.intel.com>, Catalin Marinas <catalin.marinas@arm.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Michal Hocko <mhocko@suse.com>, Matthew Wilcox <mawilcox@microsoft.com>, "H . J . Lu" <hjl.tools@gmail.com>, Paul Bolle <pebolle@tiscali.nl>, Rob Landley <rob@landley.net>, Baoquan He <bhe@redhat.com>, Daniel Micay <danielmicay@gmail.com> Date: Thu, 10 Aug 2017 10:26:01 -0700 Message-Id: <20170810172615.51965-10-thgarnie@google.com> X-Mailer: git-send-email 2.14.0.434.g98096fd7a8-goog In-Reply-To: <20170810172615.51965-1-thgarnie@google.com> References: <20170810172615.51965-1-thgarnie@google.com> Cc: linux-arch@vger.kernel.org, kvm@vger.kernel.org, linux-pm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org, linux-crypto@vger.kernel.org, kernel-hardening@lists.openwall.com, xen-devel@lists.xenproject.org Subject: [Xen-devel] [RFC v2 09/23] x86: pm-trace - Adapt assembly for PIE support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xen.org> List-Unsubscribe: <https://lists.xen.org/cgi-bin/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xen.org> List-Help: <mailto:xen-devel-request@lists.xen.org?subject=help> List-Subscribe: <https://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" <xen-devel-bounces@lists.xen.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/x86/include/asm/pm-trace.h b/arch/x86/include/asm/pm-trace.h index 7b7ac42c3661..a3801261f0dd 100644 --- a/arch/x86/include/asm/pm-trace.h +++ b/arch/x86/include/asm/pm-trace.h @@ -7,7 +7,7 @@ do { \ if (pm_trace_enabled) { \ const void *tracedata; \ - asm volatile(_ASM_MOV " $1f,%0\n" \ + asm volatile(_ASM_GET_PTR(1f, %0) "\n" \ ".section .tracedata,\"a\"\n" \ "1:\t.word %c1\n\t" \ _ASM_PTR " %c2\n" \
Change assembly to use the new _ASM_GET_PTR macro instead of _ASM_MOV for the assembly to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier <thgarnie@google.com> --- arch/x86/include/asm/pm-trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)