From patchwork Tue May 29 22:15:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 10437283 Return-Path: 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 985B7601C7 for ; Tue, 29 May 2018 22:19:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82A342890F for ; Tue, 29 May 2018 22:19:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76F7628927; Tue, 29 May 2018 22:19:27 +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=-12.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 8D5272890F for ; Tue, 29 May 2018 22:19:26 +0000 (UTC) Received: (qmail 17707 invoked by uid 550); 29 May 2018 22:17:15 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 17481 invoked from network); 29 May 2018 22:17:09 -0000 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=FkgBrqjaxySnb/T3c2nfDLlpi5HRvkA08r+jhNToquY=; b=FEqMCxQwma785pIFU2cxh5/nPo2cqs/AZAcn57cmSxfAALpM/LgrHMltJ1O35+XqVr VteMgrIe/qrnmUR9jLyzRsEdlqkrFg8vgJlKPtJPgz+6oOMFMEiEMj51PrNA6h3+o7eF HDVR6gVbVtYQoVTZA66YtH7lmPU9pUlQsinwKNIBFPbmqgc80x4euEN/YL18795DPvuv tQ6LTHidciJHt8XmUmZMSUTkiPAr90VkD40gWq8dIPTCsBoS2/p0PIeKXmemOKrsQUOW 18RVFBqZSlayDhTVNf3ZUmhPTy4FGobVzM1elpudUlDD46OvUMKYvaKYnxepaeOoOf/p 2cJg== 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=FkgBrqjaxySnb/T3c2nfDLlpi5HRvkA08r+jhNToquY=; b=kNXq7T5IR6Qcx2C78MGY7lByVlPA8qzVPtrHqR/V56gfO8utq0D+UxqOhx5XR4eEeE HKIiy8iPHdcWTFxh9ze1/naVkXbBzdEmSDmoyBCYQsfIV69PNC87Wa7+MpsK7seVPv0y G9qyze71Qaql0y5wFkQcdMTXE2D9iWuJIgTgsI2jk01KCHHQDAnyzkdG3kOG4S+gu1+o hjz4LD86ukRIcOeb28pEYXOEHJOP6UXF8DX19K1MGLB9GP7miDxKshMCKi+FJr+izBLc jXBcSWtXUEZFzBpTBdVB7YSLk7HMJzYmAaXi/g6B0QjaUZJ4fXpZelq3eDyom44+oXhx a3Ug== X-Gm-Message-State: ALKqPwcMR/nSX/7W0fU9waqE3w8BdDsc5jId9l9eH1eE2Tdm7IF+kwZ0 1/97ZhUFsHdbDB1RnY/crLKH9NbKXGk= X-Google-Smtp-Source: ADUXVKKl9sZz8mlCf0jaPe0C61oHmwTzpkzavePJjajgdM7Js6yqVNnclA4QmZAPcj2IhDa/RzusiA== X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr198396pli.335.1527632216897; Tue, 29 May 2018 15:16:56 -0700 (PDT) From: Thomas Garnier To: kernel-hardening@lists.openwall.com Cc: Thomas Garnier , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Kate Stewart , Philippe Ombredanne , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH v4 07/27] x86: pm-trace - Adapt assembly for PIE support Date: Tue, 29 May 2018 15:15:08 -0700 Message-Id: <20180529221625.33541-8-thgarnie@google.com> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: <20180529221625.33541-1-thgarnie@google.com> References: <20180529221625.33541-1-thgarnie@google.com> X-Virus-Scanned: ClamAV using ClamSMTP Change assembly to use the new _ASM_MOVABS macro instead of _ASM_MOV for the assembly to be PIE compatible. Position Independent Executable (PIE) support will allow to extend the KASLR randomization range 0xffffffff80000000. Signed-off-by: Thomas Garnier --- arch/x86/include/asm/pm-trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pm-trace.h b/arch/x86/include/asm/pm-trace.h index bfa32aa428e5..972070806ce9 100644 --- a/arch/x86/include/asm/pm-trace.h +++ b/arch/x86/include/asm/pm-trace.h @@ -8,7 +8,7 @@ do { \ if (pm_trace_enabled) { \ const void *tracedata; \ - asm volatile(_ASM_MOV " $1f,%0\n" \ + asm volatile(_ASM_MOVABS " $1f,%0\n" \ ".section .tracedata,\"a\"\n" \ "1:\t.word %c1\n\t" \ _ASM_PTR " %c2\n" \