From patchwork Wed May 23 19:53:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Garnier X-Patchwork-Id: 10422259 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 69A7360224 for ; Wed, 23 May 2018 19:57:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58E10291CF for ; Wed, 23 May 2018 19:57:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C8FF291D4; Wed, 23 May 2018 19:57:06 +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 6089F291CF for ; Wed, 23 May 2018 19:57:05 +0000 (UTC) Received: (qmail 22282 invoked by uid 550); 23 May 2018 19:55: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 22143 invoked from network); 23 May 2018 19:55:19 -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=SsQzslVWAykLaSHIE1KntEC+k6/85ZKQEJz6sUSai0s=; b=Hfzw6KDWijXF9Qox5OufWTZBzeGQHo6UOEAMyE+sag1tEcJki0guydYg3fHdxraMJU 59Ce+seQFxcIzi12WNjCNyDEFQk1nQVx5Sm/M0LvvfkunMeyaZT7BBfpzzghWCG5Nr7w xaojb2KWwXtEci96h0Uv4Zzw5/64AzGnexdz2HodW8WEtwAIDS7KcVE5K4uCpacnqdUF Gl2UF1UpQWwUGL9i1OsX0e3/VWi/5kg0XH2SyfccqhKYY1oKrUsfyjgvzxNlNHL8sle2 7ezmpSLC7Un6Z3DcgPQvuDkWeImD6demmXelrvq5oZemsjNrBQA69VFG63a7hIpmxy+R fczQ== 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=SsQzslVWAykLaSHIE1KntEC+k6/85ZKQEJz6sUSai0s=; b=fZUlgw5E7d6m7Mx/e3GdIxNJK57UqtHOcvHgQQPekkzm4B8FdmcRn9qnRPS03aopGu kIi9MaumPV35DzuaK9uF6W9AaWzjWuCqLXX+qFOOqhrLc84r4lUXd5Wnh1NsopyVHIm3 BmUn/GJt9/m8W5A3DiAsCQUFrtXsv+h5mwJnIZgRSuJJYquZsxoJcOYnlgQwk3TsDgHD ZektQrPeM6uCsnL3drxW1BichYQNPr1jSiTC3xV1+V5s+ULoLBVLT4ZAy+QN2rIbvpNe sqQxPsmQZqy4qWuKWXflEvg3PAu2f+bKG6aqFA91TXa8qAr3xsCbg/zEQl3w6SG1vjg5 N2tA== X-Gm-Message-State: ALKqPwf+bAa4HcAuEs9Rj0iJTG2rOSRJXxRSfZrJKk8k3siIDj/Z2HlI Li2CxaA175i/zQy3XOElQkGezA== X-Google-Smtp-Source: AB8JxZqCL4bDu59wyOOxX9pKHWmcRhtUAZ+XvjI/Eep7ivMeg5mL9QvR/mdMjbjhVe5TJ5FqE35Uiw== X-Received: by 2002:a63:85c8:: with SMTP id u191-v6mr3195395pgd.300.1527105306392; Wed, 23 May 2018 12:55:06 -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 04/27] x86: Add macro to get symbol address for PIE support Date: Wed, 23 May 2018 12:53:58 -0700 Message-Id: <20180523195421.180248-5-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 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 219faaec51df..4492a35fad69 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)