From patchwork Mon Jun 25 22:38:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 10488263 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 4BE09602B3 for ; Tue, 26 Jun 2018 08:40:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3974328946 for ; Tue, 26 Jun 2018 08:40:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CE0928871; Tue, 26 Jun 2018 08:40:40 +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 491DB28871 for ; Tue, 26 Jun 2018 08:40:28 +0000 (UTC) Received: (qmail 24141 invoked by uid 550); 26 Jun 2018 08:38:58 -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 Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 10228 invoked from network); 25 Jun 2018 22:41:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:in-reply-to:message-id:references:subject:from:to :cc; bh=v6b72n2f2EAxkRCYn4/780M6Y/KmmSRu7vq7OG4VW7I=; b=mwlBoU3LYQoY9/73Pz7zpswHUyS5t6Sh1bRUMlcepYrC3v/THRagCEucKD78arZqYq uFJJjFTNOM0GBVmAEx30oLeb8sV//xZA9agdkh0/dk6wnTp+Xj7o1oeCGA2HWuDP/DH7 tG+gQb2G/71sWz2i9Ta3m3HMPdlt+8asrhF9wyM1kr9rWvabcMaBtG8KAJbK2yGEe+3F 2qKL5nimS9eUnk3tnGQGwwxf6PqDVLQ9f4oP6wTxDb3wCkbgYE3N/s+6Vl/4lQPG7fFw fjqBHNrl2akOn9VKwkk4QiwhvW0ugoE9YNm7tT37Y7g2sQ5OykCa11KZe3tZW5dSp20h +yIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id :references:subject:from:to:cc; bh=v6b72n2f2EAxkRCYn4/780M6Y/KmmSRu7vq7OG4VW7I=; b=nYclgtev0H4pAhUwBtxowajUc34zGCGMkhszb9aF4dgXWh53mYmfi6Qfytg3FxCx65 7KlMNyBNexrCOHpLV+zerRjKXim+ZDVY/fHcfSY0E8CutZh6g2dwVJPSPM1MAE+FZ77X bFKjVc0WezdOzOFN7IhQKX6Jqm9pDyjdl30RpvLlct+FCVE8B0TBHCgevF3FNSVpVov6 j3957vMVTp5+q8I2keUmsCYXt6MdSJJD+3+dIr8IRg8vI9uEeRj0GAx7UuAyHUHH41g8 D8tTi/LA7MJoJ6KePFQx0DvHZcR7i879KmubU4hb9uk50vWZcpuDBmuJVkWnHFNOs6Ww jfRA== X-Gm-Message-State: APt69E1BFdwQ++3LzO8vMsganBgKt/XV5APy9jVniCPt0IbV/99iYAu8 grbTLeycbZNN7AROAlPLZ6xpI2X6yi8oFqUqe0YXX133dcZVEwNEeSgosp/PHBF3eGWjtqycCT8 +Cv71eBTzGBtvsOLSthd7X8duYgE/Q8UoQBbw4m5aBTUIJgx+xL+GEs6oseikYEx2vJGudQJEd6 OCBG0XiO1n X-Google-Smtp-Source: AAOMgpfYYA5EAez9c/nNR8r7eO8Ap6JP/Uqeen0/fnjzKbo5jCkC6qLY9BrS1uKv0tnnQQiD6+OUQPzZI69hzQ== MIME-Version: 1.0 X-Received: by 2002:a0c:f94a:: with SMTP id i10-v6mr8204013qvo.4.1529966476283; Mon, 25 Jun 2018 15:41:16 -0700 (PDT) Date: Mon, 25 Jun 2018 15:38:55 -0700 In-Reply-To: <20180625224014.134829-1-thgarnie@google.com> Message-Id: <20180625224014.134829-8-thgarnie@google.com> References: <20180625224014.134829-1-thgarnie@google.com> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog Subject: [PATCH v5 07/27] x86: pm-trace - Adapt assembly for PIE support 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 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" \