From nobody Sat Apr 20 03:03:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1574870534; cv=none; d=zohomail.com; s=zohoarc; b=LR5KQZvO+OJpKa8jy3SOnnIJ9DCfdoeCeGR5bv9ZXVw7w8WqZYNj0BU1bhS9WWhnh35M4j4e+k9bOXW/wn7qWP7LkjBXDpDHa0Foss42UfF2i4+1VDQbJzIWNr15yEjMX18DQdYInjYzhSFPakMzNV64ayNB7nouf3e4v1jzWJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574870534; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=XLAM8qPtqUwUAfjmbJ7bSpHYMEQZlLq4z+e3KLt3IGM=; b=hQk+p0kxlQrvu7GbkNxj7K5Qzm46t+ZBjjemWLsCqOQuZuuqxvjDtp5dc1ug1qAcQAKelI/zFCnIQPNkUzm2U58sl6XfqA33rxqIsQ6Kcghh2H5U7z/t+cb1TUgVag2P7yCvkjsalP8xAh4hQq8hRNRqjuXdn7QTJns4FjPrN+E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1574870534288219.63599078164486; Wed, 27 Nov 2019 08:02:14 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iZzkn-0004Dm-1Y; Wed, 27 Nov 2019 16:01:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iZzkl-0004Dh-Mj for xen-devel@lists.xenproject.org; Wed, 27 Nov 2019 16:01:19 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 24d643c3-112f-11ea-a3b8-12813bfff9fa; Wed, 27 Nov 2019 16:01:18 +0000 (UTC) X-Inumbo-ID: 24d643c3-112f-11ea-a3b8-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1574870479; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vGoR7njbbykPr+XqCa+IXU0Hsk1l6YjIlNElaoNXbjo=; b=XLFWaNmWv9I0wNkJJ/O6BUB5krnHxBOfEZnrk1hvZTnOmiX/Gee0scGX sQ0F6M97VvX6ug3tF/ivLkfxUfR6YU86jwl61p7i5laAsVIm3oYHqpeTP bt1t744Lsl1pHRZaLlDpMO4vfc9Dte3UR7cA3A/F3HJskD4SfPtXWEi44 Y=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: M9UszRuKnnczQOy7tEu0hnFKTbd2mBgsOJjrJdML4hpy8wFOB5tljEJ5YKeijaHmMEqaEnM6aV FPAvUD93nzFj091QnxfgDkchXt8YglzgcJCELG9V7rIsiOmG/TTIRKFm8+0/UFIl+7iV0n4oKk 9iOLaAQV9KbZazRQ8pQ95E/9S1P8sg1iNSCdAgy3jNRMWrQvg1kxfRjVuNz/kdT0I3J4TcD3JS zim0jE70ILmxCZXbiyNhKfDSl4K56trjSMfZDYvPglt+91eTUkbjP5/RrQYZM2ZAXZKaEzCYnU CmM= X-SBRS: 2.7 X-MesageID: 8908518 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,250,1571716800"; d="scan'208";a="8908518" From: Roger Pau Monne To: Date: Wed, 27 Nov 2019 17:01:08 +0100 Message-ID: <20191127160108.12490-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-4.13] clang: do not enable live-patching support X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?J=C3=BCrgen=20Gro=C3=9F?= , Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Live-patching requires unique symbols, and sadly the clang build generates a lot of duplicate symbols: Duplicate symbol 'asid.c#get_cpu_info' (ffff82d0803032c0 !=3D ffff82d0802e0= f50) Duplicate symbol 'asid.c#get_cpu_info_from_stack' (ffff82d0802e1080 !=3D ff= ff82d0803032f0) Duplicate symbol 'ats.c#__list_add' (ffff82d080260a00 !=3D ffff82d080267c70) Duplicate symbol 'boot.c#constant_test_bit' (ffff82d08040ea60 !=3D ffff82d0= 804372f0) Duplicate symbol 'common.c#clear_bit' (ffff82d080332440 !=3D ffff82d0802d33= b0) Duplicate symbol 'common.c#constant_test_bit' (ffff82d080332340 !=3D ffff82= d0802d2220) Duplicate symbol 'common.c#cpumask_check' (ffff82d0802d3370 !=3D ffff82d080= 337b60) Duplicate symbol 'common.c#get_cpu_info' (ffff82d0802d22b0 !=3D ffff82d0803= 31590) Duplicate symbol 'common.c#get_cpu_info_from_stack' (ffff82d0802d31c0 !=3D = ffff82d0803374b0) Duplicate symbol 'common.c#pfn_to_pdx' (ffff82d0802d3270 !=3D ffff82d080331= e00) Duplicate symbol 'common.c#test_and_set_bit' (ffff82d0802d3360 !=3D ffff82d= 080332250) Duplicate symbol 'common.c#variable_clear_bit' (ffff82d0802d2270 !=3D ffff8= 2d080337b50) Duplicate symbol 'compat.c#get_cpu_info' (ffff82d08026eab0 !=3D ffff82d0802= 00460) Duplicate symbol 'compat.c#get_cpu_info_from_stack' (ffff82d08026ebd0 !=3D = ffff82d080200f70) Duplicate symbol 'cpu_idle.c#get_cpu_info' (ffff82d0802ccb00 !=3D ffff82d08= 035fcc0) [...] For the time being disable live-patching when building with clang, since duplicate symbols will trigger a build failure because ENFORCE_UNIQUE_SYMBOLS is now also enabled by default in conjunction with live-patching. Signed-off-by: Roger Pau Monn=C3=A9 --- Cc: J=C3=BCrgen Gro=C3=9F --- Config.mk | 2 ++ xen/common/Kconfig | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index d8f90d75b3..009abda225 100644 --- a/Config.mk +++ b/Config.mk @@ -157,6 +157,8 @@ ifndef XEN_HAS_CHECKPOLICY export XEN_HAS_CHECKPOLICY endif =20 +export XEN_BUILD_WITH_CLANG =3D $(clang) + # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ diff --git a/xen/common/Kconfig b/xen/common/Kconfig index f754741972..097996fc6c 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -80,6 +80,10 @@ config HAS_CHECKPOLICY string option env=3D"XEN_HAS_CHECKPOLICY" =20 +config BUILD_WITH_CLANG + string + option env=3D"XEN_BUILD_WITH_CLANG" + menu "Speculative hardening" =20 config SPECULATIVE_HARDEN_ARRAY @@ -350,7 +354,7 @@ config CRYPTO config LIVEPATCH bool "Live patching support" default X86 - depends on HAS_BUILD_ID =3D "y" + depends on HAS_BUILD_ID =3D "y" && BUILD_WITH_CLANG !=3D "y" ---help--- Allows a running Xen hypervisor to be dynamically patched using binary patches without rebooting. This is primarily used to binarily --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel