From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967916AbeE2W1K (ORCPT ); Tue, 29 May 2018 18:27:10 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:42863 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967502AbeE2WQr (ORCPT ); Tue, 29 May 2018 18:16:47 -0400 X-Google-Smtp-Source: ADUXVKIm+JwmqDDPN0aS9nBIZ0mQV8xxm8beahFGZT2RIVjMiznmh8UoErNeK6/TOanWtwVDsUTjEg== From: Thomas Garnier To: kernel-hardening@lists.openwall.com Cc: Thomas Garnier , Skip Kees Cook , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Josh Poimboeuf , Arnaldo Carvalho de Melo , Andrey Ryabinin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH v4 04/27] x86: Add macro to get symbol address for PIE support Date: Tue, 29 May 2018 15:15:05 -0700 Message-Id: <20180529221625.33541-5-thgarnie@google.com> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: <20180529221625.33541-1-thgarnie@google.com> References: <20180529221625.33541-1-thgarnie@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.17.0.921.gf22659ad46-goog