Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2776969yba; Mon, 22 Apr 2019 12:46:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfR4V5+ObAl5rSwen4skluPHkeN84ReabrIkVWQBke8aJL0GOLeR101w3aHJb+p25yup9D X-Received: by 2002:a63:f058:: with SMTP id s24mr6500577pgj.204.1555962379795; Mon, 22 Apr 2019 12:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555962379; cv=none; d=google.com; s=arc-20160816; b=mjs7/M3COaOJoaMWjnPD5cCirFd4iMmt5Jxk/osqwznfhZXS8YEkvCYMpGOKIJNxnC /KoV0AwmhrYJSnjRmuFDYKXESpbGmS6pIvND0ma8Uf5V3vFUhjmqyX1/5xxZpzrmExdX +8Le7IZUSt37Pwgv8glRNhWltWsxiAQgBJeLm9q0Zmlc70rUu47CtksoNBAKHb+lUOea w9IN73vt1YGTpB+iWFWIel4rKKAeTCMVVzRSpCNCuWoOpppLbjjID+w4qsBiKtg/Bmzz 4yZloOC3bcCc06SDJWhXZFdyC2Jack87qfyd9bIurcGqpabU9fm9jThELHLVD85NiQiq DtlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CmrQm2bmLScHfT7JDSzVFAr6/BbOkklA39ILKlXSVfI=; b=HjurfGrCmDtzJmaxgUJ2tctAnRzE35hvqEgFIPCm2EErxk9ligdTm/2dniHLX7qomi qbQ23TKBABWx/ti0Q1W6lOOEAhfDPWk7xqurD0F7qH+zSZ9gYYMAG/myk2ewBA7judUh Gl+lBhwdC/di1SbKOgP+thEHYXCURebzdRW2AuAitp8XkkfoL8pdg50miWXAt0Buk3Z6 1J7jImOvTkjOPR74pHdsOg/seKVflWUeZcjjTvJs8dDs+shw6yp3Fc+8tz0xeTSebu40 /+BAJ+H99dM2eZe68zwuL8BZ68QRMj1jFMukxuSC9B9IDx+ofUtjYqbvO3Sx5D8Od2wl Hfuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aeblzOs8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si8785115pgc.141.2019.04.22.12.46.04; Mon, 22 Apr 2019 12:46:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aeblzOs8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729578AbfDVToo (ORCPT + 99 others); Mon, 22 Apr 2019 15:44:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:45986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729532AbfDVTon (ORCPT ); Mon, 22 Apr 2019 15:44:43 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E719217D4; Mon, 22 Apr 2019 19:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962282; bh=ZkZruAEHTjuDFMoh4a6n1g6cC6OPvWYubrXhMAS/G9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aeblzOs8Vv972BlN8MieFVaEWDPlxeAHp4ucKW8KVweSyJyrRUdmQGyZHO+Euk5lW qQfxG7s504DHOAI4KoeW5fFkHW7fKzxTtOf+WlQysfoDN46dZFQTRNHazvaopkHqbr n7//aY0gF7QQBWT5MYJikl5jzmHvnSzHkQUDCNRk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sean Christopherson , Paolo Bonzini , Sasha Levin , kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 84/98] KVM: selftests: explicitly disable PIE for tests Date: Mon, 22 Apr 2019 15:41:51 -0400 Message-Id: <20190422194205.10404-84-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194205.10404-1-sashal@kernel.org> References: <20190422194205.10404-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson [ Upstream commit 0a3f29b5a77d6c27796d7a7adabafd199dc066d5 ] KVM selftests embed the guest "image" as a function in the test itself and extract the guest code at runtime by manually parsing the elf headers. The parsing is very simple and doesn't supporting fancy things like position independent executables. Recent versions of gcc enable pie by default, which results in triple fault shutdowns in the guest due to the virtual address in the headers not matching up with the virtual address retrieved from the function pointer. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin (Microsoft) --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index f9a0e9938480..212b8f0032ae 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -28,7 +28,7 @@ LIBKVM += $(LIBKVM_$(UNAME_M)) INSTALL_HDR_PATH = $(top_srcdir)/usr LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include -CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(