From: Thomas Garnier Subject: [PATCH v3 10/27] x86/boot/64: Adapt assembly for PIE support Date: Wed, 23 May 2018 12:54:04 -0700 Message-ID: <20180523195421.180248-11-thgarnie@google.com> References: <20180523195421.180248-1-thgarnie@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: linux-arch@vger.kernel.org, kvm@vger.kernel.org, linux-pm@vger.kernel.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-sparse@vger.kernel.org, linux-crypto@vger.kernel.org, kernel-hardening@lists.openwall.com, xen-devel@lists.xenproject.org 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 Return-path: In-Reply-To: <20180523195421.180248-1-thgarnie@google.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" List-Id: linux-crypto.vger.kernel.org Q2hhbmdlIHRoZSBhc3NlbWJseSBjb2RlIHRvIHVzZSBvbmx5IHJlbGF0aXZlIHJlZmVyZW5jZXMg b2Ygc3ltYm9scyBmb3IgdGhlCmtlcm5lbCB0byBiZSBQSUUgY29tcGF0aWJsZS4KCkVhcmx5IGF0 IGJvb3QsIHRoZSBrZXJuZWwgaXMgbWFwcGVkIGF0IGEgdGVtcG9yYXJ5IGFkZHJlc3Mgd2hpbGUg cHJlcGFyaW5nCnRoZSBwYWdlIHRhYmxlLiBUbyBrbm93IHRoZSBjaGFuZ2VzIG5lZWRlZCBmb3Ig dGhlIHBhZ2UgdGFibGUgd2l0aCB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