From patchwork Thu Jan 31 19:24:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 10791333 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 DA96C1390 for ; Thu, 31 Jan 2019 19:43:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D192B31524 for ; Thu, 31 Jan 2019 19:43:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4F4E31793; Thu, 31 Jan 2019 19:43:05 +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=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 06FCB31545 for ; Thu, 31 Jan 2019 19:43:04 +0000 (UTC) Received: (qmail 3663 invoked by uid 550); 31 Jan 2019 19:42:47 -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 19556 invoked from network); 31 Jan 2019 19:28:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t98eZgNJ2OkyyNH9A8MpeSnzy29Cs+lIwR0Rp4VGB6w=; b=HW/VHAsBZB0Ih7lqa7vjMKtbjc+7OGoPezauGIeesyeanLr+q30X9OK3QeR9YVk4xz 2WufnXCZB78r1+TH6iO51nlpT0Wra47AQTWd+eujU43Ab//LjiJllZgF8hDmdkY4+vdy J0hS/vmtobX95SFIx0XXmVqRg7UZvz7aHH5e0= 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:mime-version:content-transfer-encoding; bh=t98eZgNJ2OkyyNH9A8MpeSnzy29Cs+lIwR0Rp4VGB6w=; b=rIhzCswnob58QQKLB+YNTd3GT2LUiySEkenrNNPjqAb+uMRbF88NLHmG071a26Ibyl Nx2qqzrMQ+LKpk6T8YJblSqLXAPVDBX5PLWHLZ2kx2hOtPHo6f+AkEcfQgS5CnwJALAX cNiVVwZKXJUKIg8y9aSZWzPzeyKY5n8WSVhZIvHNGM1W8BizIqwJTf7Ar9W+2LvMfVie u3AXbbpk72HTmaECY8LEz1kX0cVGtRMWLvQAZ80UtnDhrf2ELRGHMsYs2ts02N++kJvx h1dIUZJpwWht23tZH6BGuI0D95oqOKXjkTdmfF7ajcI6/HSBbRmyUWmY1+rbIAt8vCRf pEFg== X-Gm-Message-State: AJcUukeBPbfzu2c05WUj4yDK37WKP6+6kAJHXwf+ro7Uoeen3xL0CvMd M56JQyNKUWh75m8lSu2yBY/3ukboL+U= X-Google-Smtp-Source: ALg8bN5N23wLrMRUc7q9Z8s3OLuB2c8KXsOa/9j2qqS+O8yzM4KO/sF7FbbrILEgTsQ+4zbvEl2zMg== X-Received: by 2002:a63:101:: with SMTP id 1mr32666055pgb.152.1548962904015; Thu, 31 Jan 2019 11:28:24 -0800 (PST) From: Thomas Garnier To: kernel-hardening@lists.openwall.com Cc: kristen@linux.intel.com, Thomas Garnier , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Thomas Garnier , linux-kernel@vger.kernel.org Subject: [PATCH v6 06/27] x86: pm-trace - Adapt assembly for PIE support Date: Thu, 31 Jan 2019 11:24:13 -0800 Message-Id: <20190131192533.34130-7-thgarnie@chromium.org> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog In-Reply-To: <20190131192533.34130-1-thgarnie@chromium.org> References: <20190131192533.34130-1-thgarnie@chromium.org> MIME-Version: 1.0 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 below 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" \