From patchwork Wed May 23 19:54:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 10422265 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 589A960224 for ; Wed, 23 May 2018 19:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47C6C291D5 for ; Wed, 23 May 2018 19:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AD81291D8; Wed, 23 May 2018 19:57:35 +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 66F82291D6 for ; Wed, 23 May 2018 19:57:34 +0000 (UTC) Received: (qmail 22526 invoked by uid 550); 23 May 2018 19:55:34 -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 22367 invoked from network); 23 May 2018 19:55:26 -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=PJnNgjbf4ZjwST5xPtS3PjkX/L3aTK6vOs28lEgpo5I=; b=uGhwrDqRLA8R/+gjR2/ht6XQFLkqTeak5J7mB1eTBPaEVDIBSkXwLRmeIw1SW9r4f4 wi44wjvQA9NY4RjHBpxj5i+8Z1yIxDwbLxqSbEl+0lMVldxiAXLiOVGLAMWkk/pEKOC3 2T2DcVFM2jZHVpjJNO3P6vStoS630shkASIz2e0wVPtute4SMq/ZExe5pUxLrXxgU9cY rMqb4S9ipRsZzB5JIMuhCTXLeIvi/gAlf9aXEGCUHMjxl1yG5mTnt30G1EC1u7dGROjw vAt9WUfRyOnQt4I4To4wjEG7G0J8qX4RMqptFTPUX6jtngyNAmsAYg/9w9E3iMLuNaHV FjRA== 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=PJnNgjbf4ZjwST5xPtS3PjkX/L3aTK6vOs28lEgpo5I=; b=HEwCsdhIrbbswfsKyms4OeNTPocRMlsEMFcfKZzk7CuZVvBOhuWcjk2Q2V7J8TQrpv cDvLZPE8VKIEJx9L9+CnqTVDP1y6/KYW/o4szH+E0/8mywBvI0N92eUCbYmcILxjOBET zHTeo5QkAwaMvK4Dp1rq0tX9Hft1hnFu2sSNPKzdeyVWXbiquixg5IjM9/R4BO+7u3iv +KrsMlFnS2tijqR9CD/kPg6wZw73zpHYSoM8RcmyW8M7F/xjSZNKUXeFN+8yNxnNxWBL 2wHuWiqm9Uq1lhqL8C9UJeROMTDOX5hLmfvqFieW9VO6F5SCWNkI13gAEYXhSj8TQU9/ V78g== X-Gm-Message-State: ALKqPwf/2NWCcDx4y6VRZZsDyB6EUQ4kXNMv0YhxecLA31CoEWBM+vE/ WYYBLo8U4eelHryrVMIpXp1dxQ== X-Google-Smtp-Source: AB8JxZpW8L8gl9DJlrDjrDxTLFLIPFI+CldGQy9UZnCWlmW+487OmSsBIoTpZ7731B+8oKWg/0OoSQ== X-Received: by 2002:a65:6489:: with SMTP id e9-v6mr3387443pgv.44.1527105313516; Wed, 23 May 2018 12:55:13 -0700 (PDT) From: Thomas Garnier To: Herbert Xu , "David S . Miller" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Greg Kroah-Hartman , Thomas Garnier , Philippe Ombredanne , Kate Stewart , Arnaldo Carvalho de Melo , Yonghong Song , Andrey Ryabinin , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Andy Lutomirski , Dominik Brodowski , Borislav Petkov , Borislav Petkov , "Rafael J . Wysocki" , Len Brown , Pavel Machek , Juergen Gross , Alok Kataria , Steven Rostedt , Jan Kiszka , Tejun Heo , Christoph Lameter , Dennis Zhou , Boris Ostrovsky , Alexey Dobriyan , Masami Hiramatsu , Cao jin , Francis Deslauriers , "Paul E . McKenney" , Nicolas Pitre , Andrew Morton , Randy Dunlap , "Luis R . Rodriguez" , Arnd Bergmann , Christopher Li , Jason Baron , Mika Westerberg , Lukas Wunner , Dou Liyang , Sergey Senozhatsky , Petr Mladek , Masahiro Yamada , Ingo Molnar , Nicholas Piggin , "H . J . Lu" , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Joerg Roedel , David Woodhouse , Dave Hansen , Rik van Riel , Jia Zhang , Ricardo Neri , Jonathan Corbet , Jan Beulich , Matthias Kaehlcke , Baoquan He , =?UTF-8?q?Jan=20H=20=2E=20Sch=C3=B6nherr?= , Daniel Micay Cc: x86@kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-arch@vger.kernel.org, linux-sparse@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: [PATCH v3 07/27] x86: pm-trace - Adapt assembly for PIE support Date: Wed, 23 May 2018 12:54:01 -0700 Message-Id: <20180523195421.180248-8-thgarnie@google.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180523195421.180248-1-thgarnie@google.com> References: <20180523195421.180248-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 extended the KASLR randomization range below the -2G memory limit. 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" \