From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: ARC-Seal: i=1; a=rsa-sha256; t=1520974817; cv=none; d=google.com; s=arc-20160816; b=EuaWyQdP7+ZKMnSAzVp2CoEeGs/yG8U8BefEmVcu647J/ArQg3MT3X62YhtnRLIf2Q KlB+J6wa51zX1U/EwEuJDPHgAPVTlkN9/hWNxxMTYGYhHpUFavvdfvHrbXwEVUZhTOCn iHTm4oGsh961dl60skU5JuFT8L8KA6wk/+EGbbqOnJdqTUlpuu+lqasIef36nZQ4E003 9S67dkAku6L9O74fBhKAP0OKIYXwayoLKM7A3l/xb+a+tmFsIgG7U+gQKvkVN05BtipM 5nb4BL4XPVlvMnjEc76ewoUyU09fCF+JbxYtQqjl2zSdKLS9Ore4dq1WZJ24l0Ri83LP Jptg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ahWj7TFSzN26kCwJKtJajoqrxWswy2RHrVUiaeTyoDo=; b=mfKjPzsV07GEyGYqoeEtiFLBCBCJMxtBd2uzTk0fqof84FjXFA/kgulF6Iotvg62WN HLZrPJ+T4y9cz7VjrSGhf0rejA6FpEJRuWySCFyArC1As20RjSDG+7EeSrXAVJGINc3V nWZudYy+fMoc5+vcw6jaNHC+VamwhOLk2HBgZT7wxprAADq/YF+lV3PfoAHTB7nqThXM QtqGlQPqPM8P/ISZqkzzMu4F1x4PPc6ucxIRj9oCooOtKN1Pdr4UQbpYdWBF56F6rVu7 /tn9XXAIjx14C1+VMbkvxhc834UOu/+hmFhSHPHujweO+yOikfWAsB0VCHaRjRAY9/ML Am4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=a8mykL3J; spf=pass (google.com: domain of thgarnie@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=thgarnie@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=a8mykL3J; spf=pass (google.com: domain of thgarnie@google.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=thgarnie@google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Google-Smtp-Source: AG47ELvCA5rkIARERRKcHw8VNyxTncut5k0IBuEAzUqKJKEBZvq+YsJVJqpO+aW0hbOqxUzETRoUbw== From: Thomas Garnier To: Herbert Xu , "David S . Miller" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Greg Kroah-Hartman , Kate Stewart , Thomas Garnier , Arnd Bergmann , Philippe Ombredanne , Arnaldo Carvalho de Melo , Andrey Ryabinin , Matthias Kaehlcke , 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 , Tejun Heo , Christoph Lameter , Dennis Zhou , Boris Ostrovsky , David Woodhouse , Alexey Dobriyan , "Paul E . McKenney" , Andrew Morton , Nicolas Pitre , Randy Dunlap , "Luis R . Rodriguez" , Christopher Li , Jason Baron , Ashish Kalra , Kyle McMartin , Dou Liyang , Lukas Wunner , Petr Mladek , Sergey Senozhatsky , Masahiro Yamada , Ingo Molnar , Nicholas Piggin , Cao jin , "H . J . Lu" , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Joerg Roedel , Dave Hansen , Rik van Riel , Jia Zhang , Jiri Slaby , Kyle Huey , Jonathan Corbet , Matthew Wilcox , Michal Hocko , Rob Landley , Baoquan He , Daniel Micay , =?UTF-8?q?Jan=20H=20=2E=20Sch=C3=B6nherr?= 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 v2 02/27] x86: Use symbol name on bug table for PIE support Date: Tue, 13 Mar 2018 13:59:20 -0700 Message-Id: <20180313205945.245105-3-thgarnie@google.com> X-Mailer: git-send-email 2.16.2.660.g709887971b-goog In-Reply-To: <20180313205945.245105-1-thgarnie@google.com> References: <20180313205945.245105-1-thgarnie@google.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1594857689023705224?= X-GMAIL-MSGID: =?utf-8?q?1594857689023705224?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Replace the %c constraint with %P. The %c is incompatible with PIE because it implies an immediate value whereas %P reference a symbol. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier --- arch/x86/include/asm/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index 6804d6642767..3d690a4abf50 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -35,7 +35,7 @@ do { \ asm volatile("1:\t" ins "\n" \ ".pushsection __bug_table,\"aw\"\n" \ "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ - "\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \ + "\t" __BUG_REL(%P0) "\t# bug_entry::file\n" \ "\t.word %c1" "\t# bug_entry::line\n" \ "\t.word %c2" "\t# bug_entry::flags\n" \ "\t.org 2b+%c3\n" \ -- 2.16.2.660.g709887971b-goog