From nobody Sun May 5 02:04:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1567442601; cv=none; d=zoho.com; s=zohoarc; b=SeBObpLNrN/zWgXiMwwlB7LskfNWMvoe+QcpUzlX7daczawY5+ghjQQ7AH9fEEgD/veQyZo/7ZM0655o7cdbSndAFMt6zDYicjCBaMR5d8tivfl3kY2rB2Y6qijv2U06uHlm7pPBOXCy9G5KWWzgUR7nhAiA5sfaHQ2cSLWz2Xk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567442601; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HJfXAwgmVeM97zqCAjDiBZJcIRGpSJXr3xbM6kmrn0A=; b=hCp+L1SYHc1hwVVvyBQ7kYW7GZIx9QiN2PLCKjeG08DDOhnQKKRm2QteJljbE6twdY2JZwCPawKNe4jtT09guTTgs1GKVJA4OIJBgVmkOrp6343m1Kr6e0lDRC4AIMx1EyE9U6DhoK3VLqj16x64huqSf7VCeD3Agmt9aN4XPFs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1567442601401849.1763839831251; Mon, 2 Sep 2019 09:43:21 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i4pOv-0000gv-5L; Mon, 02 Sep 2019 16:41:57 +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 1i4pOt-0000gI-Mz for xen-devel@lists.xenproject.org; Mon, 02 Sep 2019 16:41:55 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 91141438-cda0-11e9-aea4-12813bfff9fa; Mon, 02 Sep 2019 16:41:53 +0000 (UTC) X-Inumbo-ID: 91141438-cda0-11e9-aea4-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1567442515; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1DCZ0BGjoPYTWaE4L9sHBAupmaX9w85d3OynHWl3eIo=; b=iBqrsOSpJODnRlU1MOzIZbjaGtvOank44GZuj3UIKMkZsg846Q/6NHPw 9ZCiibMSDkzBkgC55UIEGrCGnXeY6NOcUXAjLwu7c4+CDKHIZODwgJv0n T/eugVxA5CizfRaLJjvaXRnwWOZC9eYng//iOFOVpN4cHFNOJnNR/QOZy c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.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 andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of Andrew.Cooper3@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="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@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 ~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="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: BQ4qazOK3oQCfwtwvK5feWZnV6q+Buv08PxUqejUmZa99NwEoEdStsFD9UTlUKQp2zZDU1CgL5 3hjifLFlA4IFgxeYNT3JeHP9YXrNuMS822cLGD8iO8da+fgiDMOvk14D4EZojebsUHuTflBU11 o+S/39X0h45whw5gTy0kJZ7rC3yc5fn7A0Ao4VcC/68kuKMP+Gm5NXX0slRxZ9AWbhUP2Udc0S NyZqyTrM3G0CXjenk42nh0fKpFlkRti6UepsG5lwHcZ7nwhC4DfnlvUkrzmcyiov10KYAh3Zpb 2b0= X-SBRS: 2.7 X-MesageID: 5033358 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.64,459,1559534400"; d="scan'208";a="5033358" From: Andrew Cooper To: Xen-devel Date: Mon, 2 Sep 2019 17:41:47 +0100 Message-ID: <20190902164148.28977-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190902164148.28977-1-andrew.cooper3@citrix.com> References: <20190902164148.28977-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/2] tools/shim: Fix race condition creating linkfarm.stamp 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: Wei Liu , George Dunlap , Andrew Cooper , Sander Eikelenboom , Jan Beulich , Ian Jackson , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= 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) In the case the while loop gets interrupted, the target musn't appear as up-to-date. The mov $X.tmp $X must be the last action of the rule. Signed-off-by: Andrew Cooper Acked-by: Ian Jackson --- CC: Ian Jackson CC: Wei Liu CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: George Dunlap CC: Sander Eikelenboom --- tools/firmware/xen-dir/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makef= ile index 697bbbd57b..df3f5a7006 100644 --- a/tools/firmware/xen-dir/Makefile +++ b/tools/firmware/xen-dir/Makefile @@ -32,9 +32,9 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE echo $(f) >> linkfarm.stamp.tmp ;) cmp -s linkfarm.stamp.tmp linkfarm.stamp && \ rm linkfarm.stamp.tmp || { \ + cat linkfarm.stamp.tmp | while read f; \ + do rm -f "$(D)/$$f"; ln -s "$(XEN_ROOT)/$$f" "$(D)/$$f"; done; \ mv linkfarm.stamp.tmp linkfarm.stamp; \ - cat linkfarm.stamp | while read f; \ - do rm -f "$(D)/$$f"; ln -s "$(XEN_ROOT)/$$f" "$(D)/$$f"; done \ } =20 # Copy enough of the tree to build the shim hypervisor --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Sun May 5 02:04:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1567442601; cv=none; d=zoho.com; s=zohoarc; b=Zn7kPbMRSCCsoz8xLs7Ba+zpFmxc8njcYvEgmH3CzskQcaZ5VYQizBKw0gYX4rCNwzcCZ+V5xv1cvN3gXtFSiGsU+hhomoKEvhGBpgcwS0xFqeBapMIU+qrLj3XOiYSXFb9G6dVEKX9UFSiCrNRy2mvrGkYOWzBPF/5QRIhG59E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567442601; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=umC9/3k8YxiX6PpfFmo+aqdgKvcT8fbCIHdIHPfRmr0=; b=ZIq7iHk92FHHjGJiBcS6x3bGQjxZZVieBBEd+zqqH48I2QgwQV8a21FngwcVx12jwy/YJAa7n7Y2VT5VozqOFXkreyC3LjzfU0KNpY99fqtIs4Un9/xQe2lhvE5T0vBKBdNXm8YvfXbh7Z2uv3Yom4KDpJ5oviYU3xiFAS43vBk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1567442601393249.23388528515943; Mon, 2 Sep 2019 09:43:21 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i4pOz-0000hC-DY; Mon, 02 Sep 2019 16:42:01 +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 1i4pOy-0000h5-GP for xen-devel@lists.xenproject.org; Mon, 02 Sep 2019 16:42:00 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 91482368-cda0-11e9-aea4-12813bfff9fa; Mon, 02 Sep 2019 16:41:53 +0000 (UTC) X-Inumbo-ID: 91482368-cda0-11e9-aea4-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1567442513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5NAOCSEpEZx+CaX6rJN7LAjUBkjg12Aj+2bif7jg6is=; b=FFvC3m4anLAXHdHQbFaFbxCEEZtyFoCodMeeazekiH8BXsYGFMfDXzg0 C2Sbiioy9ViIN6KYbR+csxu3lKPg1nr4FcdT/m56naE1FFU/agsDu5ATE Y/dN0eR+IUfLc9MUvDTNWoiIXZDj0cn9liPfLE2Kr2SuFFkM7ctaUbvc0 A=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.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 (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@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 ~all" Received-SPF: None (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: OYLB8ca9u6zO+dvxnKkHPqeuDcVnYgScaJKJ7BgSfl4PS6PkFcWrb/2l/GR7/ZZycC+HdRF3OY Tn7Nhp7KQUmgrNmUOkMK+HLoEJL5+Yv8/GwycbBusp/vma9KjJiglpzbvaXZrBzFRtQvbnnDYu i7JQg7eDBGUasULkPZLS/JDp2hDLURDVK0YBPyervWe75alQWxF3eO59OBDHuTbBl9NIfe75hp c4zvPvELBKymTza5YseGtr8J9SnjiF7NNP9cKOGsP1TgZlG6393l5SVI2moZqGjNp2qWlKn8n0 JkM= X-SBRS: 2.7 X-MesageID: 5246137 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,459,1559534400"; d="scan'208";a="5246137" From: Andrew Cooper To: Xen-devel Date: Mon, 2 Sep 2019 17:41:48 +0100 Message-ID: <20190902164148.28977-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190902164148.28977-1-andrew.cooper3@citrix.com> References: <20190902164148.28977-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/2] tools/shim: Apply more duct tape to the linkfarm logic 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: Wei Liu , George Dunlap , Andrew Cooper , Sander Eikelenboom , Jan Beulich , Ian Jackson , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= 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) Sander reported a build failure which manifests as `make; make install` failing with: /cross-install -m0644 -p xen-dir/xen-shim //usr/local/lib/xen/boot/= xen-shim install: cannot stat 'xen-dir/xen-shim': No such file or directory make[4]: *** [Makefile:52: install] Error 1 make[4]: Leaving directory '/usr/src/new/xen-unstable/tools/firmware' It has subsequently been seen intermittently by OSSTest. This was caused by c/s 32b1d628 triggering a preexisting linkfarm bug for partial rebuilds. Between the first `make` and the subsequent `make install`, the linkfarm lo= gic observes new final build products and regenerates the linkfarm. This inclu= des a distclean, which throws away everything from the first `make`. As the xen-shim rule use a symlink, the link itself remains still up-to-date but is broken due to the distclean, which causes install to fail. Update the linkfarm logic to not regenerate itself when build artefacts appear. This isn't a comprehensive fix but is the best which can be done easily. Any further effort would be better spent making out-of-tree builds work for Xen. Signed-off-by: Andrew Cooper Acked-by: Ian Jackson --- CC: Ian Jackson CC: Wei Liu CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: George Dunlap CC: Sander Eikelenboom --- tools/firmware/xen-dir/Makefile | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makef= ile index df3f5a7006..538931e9b4 100644 --- a/tools/firmware/xen-dir/Makefile +++ b/tools/firmware/xen-dir/Makefile @@ -14,6 +14,26 @@ LINK_FILES=3DConfig.mk DEP_DIRS=3D$(foreach i, $(LINK_DIRS), $(XEN_ROOT)/$(i)) DEP_FILES=3D$(foreach i, $(LINK_FILES), $(XEN_ROOT)/$(i)) =20 +# Exclude some intermediate files and final build products +LINK_EXCLUDES :=3D '*.[isoa]' '.*.d' '.*.d2' '.config' +LINK_EXCLUDES +=3D '*.map' 'xen' 'xen.gz' 'xen.efi' 'xen-syms' + +# This is all a giant mess and doesn't really work. +# +# The correct solution is to fix Xen to be able to do out-of-tree builds. +# +# Until that happens, we set up a linkfarm by iterating over the xen/ tree, +# linking source files. This is repeated each time we enter this director= y, +# which poses a problem for a two-step "make; make install" build process. +# +# Any time the list of files to link changes, we relink all files, then +# distclean to take out not-easy-to-classify intermediate files. This is = to +# support easy development of the shim, but has a side effect of clobbering +# the already-built shim. +# +# $(LINK_EXCLUDES) should be set such that a parallel build of shim and xe= n/ +# doesn't cause a subsequent `make install` to decide to regenerate the +# linkfarm. This means that all final build artefacts must be excluded. linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE mkdir -p $(D) rm -f linkfarm.stamp.tmp @@ -25,8 +45,7 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE sed 's,^$(XEN_ROOT)/$(d)/,,g' | xargs mkdir -p .);) \ $(foreach d, $(LINK_DIRS), \ (cd $(XEN_ROOT); \ - find $(d) ! -type l -type f \ - $(addprefix ! -name , '*.[isoa]' '.*.d' '.*.d2')) \ + find $(d) ! -type l -type f $(addprefix ! -name ,$(LINK_EXCLUDES))) \ >> linkfarm.stamp.tmp ; ) \ $(foreach f, $(LINK_FILES), \ echo $(f) >> linkfarm.stamp.tmp ;) --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel