From patchwork Tue Jul 30 19:12:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 11066617 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 52DBD1399 for ; Tue, 30 Jul 2019 19:13:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A2D228867 for ; Tue, 30 Jul 2019 19:13:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4883B28872; Tue, 30 Jul 2019 19:13:39 +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 87E8D288B7 for ; Tue, 30 Jul 2019 19:13:38 +0000 (UTC) Received: (qmail 28018 invoked by uid 550); 30 Jul 2019 19:13:24 -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 27913 invoked from network); 30 Jul 2019 19:13:24 -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=cCMnXk6r3FPny+fs1rFc2SWMhw3bJ0loL2W4TiBySr8=; b=m478ElFD7q//7AsCxpL9OrAKQBrInm/GCtxGDID+1HbrAnQFF52Ffax0qaupTPDbf/ GHWHftjDWsObpuzqxd4JH6kFG9bWkMamNih32q2W6VEU2kHfJUJMUiqfHVVZTC06mUOj MC1EU6K7NgoUvlEjAb13R+v1h/BbOjctlPBjk= 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=cCMnXk6r3FPny+fs1rFc2SWMhw3bJ0loL2W4TiBySr8=; b=kNecb1Jgm48ozYSJxSbSNrkw8I52NnXWWwgK9WVqMRjvhBq6jre2HMlrQZTvLVLVKI KTQYgnE2HGYGN/0smN4Z735mSrjQ+ZaGmKhOIRR/aywryIaOqisSZ7fggaQIesfHYrah juu7hSdQourBvgv9O5T/iPL251s5UntIiLoVv9ZGdBlAOTz8rcWrGbtXP0zpBK8fXbwk 5ELEukW0xjvrEjT0VQkEOjdXNxIOxw6hHGYQ+Ii1dLdecspoFs7yChO3bdzOss5g17YU CGwPDlpQHRZ7xlJf6XD2cTp9TPORsw5R6B3Mn3eS6RU5qJbJdctfFSCIvHJz8q8ki9T1 GT7w== X-Gm-Message-State: APjAAAXt3k9+VAQr8ri2TfXVx1/Sd0uNvx9fmLAGQzBVJVKzjuErqBL4 PZ8wu5qW2wvEunm2Im+SdDWpNDrKxlg= X-Google-Smtp-Source: APXvYqxEEHpoFd295wN4FVenXhrnLJncXmAxP37HqjVX+fNi4I8BrYTgPlqRHeP0sCOCSagbyTiddw== X-Received: by 2002:a63:fd57:: with SMTP id m23mr44942158pgj.204.1564513992259; Tue, 30 Jul 2019 12:13:12 -0700 (PDT) From: Thomas Garnier To: kernel-hardening@lists.openwall.com Cc: kristen@linux.intel.com, keescook@chromium.org, Thomas Garnier , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Nadav Amit , Jann Horn , linux-kernel@vger.kernel.org Subject: [PATCH v9 02/11] x86: Add macro to get symbol address for PIE support Date: Tue, 30 Jul 2019 12:12:46 -0700 Message-Id: <20190730191303.206365-3-thgarnie@chromium.org> X-Mailer: git-send-email 2.22.0.770.g0f2c4a37fd-goog In-Reply-To: <20190730191303.206365-1-thgarnie@chromium.org> References: <20190730191303.206365-1-thgarnie@chromium.org> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Add a new _ASM_MOVABS macro to fetch a symbol address. It will be used to replace "_ASM_MOV $, %dst" code construct that are not compatible with PIE. Signed-off-by: Thomas Garnier --- arch/x86/include/asm/asm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 3ff577c0b102..3a686057e882 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -30,6 +30,7 @@ #define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8) #define _ASM_MOV __ASM_SIZE(mov) +#define _ASM_MOVABS __ASM_SEL(movl, movabsq) #define _ASM_INC __ASM_SIZE(inc) #define _ASM_DEC __ASM_SIZE(dec) #define _ASM_ADD __ASM_SIZE(add)