From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F35B6606A32A for ; Mon, 30 Nov 2026 20:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l/7AX1qQ Received: from list by lists.xenproject.org with outflank-mailman.1508123.1701112 (Exim 4.92) (envelope-from ) id 1xY7hX-0007RT-Qk; Mon, 30 Nov 2026 20:10:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1508123.1701112; Mon, 30 Nov 2026 20:10:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xY7hX-0007RM-Mf; Mon, 30 Nov 2026 20:10:15 +0000 Received: by outflank-mailman (input) for mailman id 1508123; Mon, 30 Nov 2026 20:10:14 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xY7hV-0007RE-Pn for xen-devel@lists.xenproject.org; Mon, 30 Nov 2026 20:10:13 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xY7hT-00AAgF-Qo for xen-devel@lists.xenproject.org; Mon, 30 Nov 2026 21:10:11 +0100 Received: from [10.42.69.6] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6b0dd81f-e002-0a2a0a5209dd-0a2a45069f62-4 for ; Mon, 30 Nov 2026 21:10:11 +0100 Received: from [172.234.252.31] (helo=sea.source.kernel.org) by tlsNG-16d1c6.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6b0dd822-195a-0a2a45060019-aceafc1fbc56-3 for ; Mon, 30 Nov 2026 21:10:11 +0100 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 4B5D040412; Mon, 30 Nov 2026 20:10:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 703BF1F00896; Mon, 30 Nov 2026 20:10:07 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Post: List-Help: List-Subscribe: , Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=k20260515 header.d=kernel.org header.i="@kernel.org" header.h="Date:From:To:cc:Subject:In-Reply-To:References" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796069409; bh=8NPSWlIwhBKpXjQXtR3KtoN2S3yTHZb00JH379Zmso8=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=l/7AX1qQzev4uJn/4K7x40wZNmurRxi+xZx20zd07x1fFXUc1BOgwvBYRBZct69zJ Omw2nIGqCGFDpxX3M1UraqqkS0cMutWTYNcKJEtOzH2XyItteiajZsLvukLdxRkF77 efJyXm1zDQ8J2mxX62nV9mVd8Odsa2UE6tDwkVSTXqLju2qvzIbC4SigoCgj26HVvh jD2pQcmXeenncNL1pHypyev0MKN6pKMS4VYYYndyDAWnluXzqhFUZWSfDMRAIhVkkG u1GR050vPQ56/SIQ50d6jpFHaZpEVnYR6awoOaHR9Ub23G3DhhZlZm2evdgZ2iBYDj UCtJ1BdVkZKsw== Date: Mon, 30 Nov 2026 12:10:06 -0800 (PST) From: Stefano Stabellini To: Andrew Cooper cc: Xen-devel , Anthony PERARD , Stefano Stabellini , Michal Orzel , Doug Goldstein , =?UTF-8?Q?Marek_Marczykowski-G=C3=B3recki?= , Jan Beulich , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Teddy Astie , "Daniel P . Smith" , Frediano Ziglio Subject: Re: [PATCH 4/4] CI: Add an EFI/StrictNX test In-Reply-To: <20261126210337.746228-5-andrew.cooper3@citrix.com> Message-ID: References: <20261126210337.746228-1-andrew.cooper3@citrix.com> <20261126210337.746228-5-andrew.cooper3@citrix.com> X-Archived-By: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-460952466-1796069409=:2648157" X-purgate-ID: tlsNG-16d1c6/1796069411-F7ECC77B-4FD6793B/0/0 X-purgate-type: clean X-purgate-size: 6036 X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-460952466-1796069409=:2648157 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 26 Nov 2026, Andrew Cooper wrote: > From: Roger Pau Monné > > While most of our testing of this nature happens in a Debian container, > Debian's strictnx build of OVMF is buggy at the time of writing. See: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1154178 > > Fedora have non-strict StrictNX enabled in their SecureBoot build of OVMF, but > by default it prints a warning on failure and then relaxes permissions. It > can be turned into strict StrictNX mode with an extra -fw_cfg setting, making > it actually usable in a CI scenario. > > Unlike Debian, Fedora has no equivalent of the enrolled snake-oil key, so for > simplicity sake just turn off SecureBoot for now. > > Signed-off-by: Roger Pau Monné > Signed-off-by: Andrew Cooper Acked-by: Stefano Stabellini > --- > CC: Anthony PERARD > CC: Stefano Stabellini > CC: Michal Orzel > CC: Doug Goldstein > CC: Marek Marczykowski-Górecki > CC: Jan Beulich > CC: Roger Pau Monné > CC: Teddy Astie > CC: Daniel P. Smith > CC: Frediano Ziglio > > As Fedora 45 is new this series, I've already deployed the container with > these additions. > --- > automation/build/fedora/45-x86_64.dockerfile | 7 ++ > automation/gitlab-ci/test.yaml | 9 +++ > .../scripts/include/xtf-x86_64-efi-strictnx | 64 +++++++++++++++++++ > 3 files changed, 80 insertions(+) > create mode 100644 automation/scripts/include/xtf-x86_64-efi-strictnx > > diff --git a/automation/build/fedora/45-x86_64.dockerfile b/automation/build/fedora/45-x86_64.dockerfile > index 5a1764c7ee55..e470f19eedb4 100644 > --- a/automation/build/fedora/45-x86_64.dockerfile > +++ b/automation/build/fedora/45-x86_64.dockerfile > @@ -67,6 +67,13 @@ RUN < glib2-devel > pixman-devel > ninja-build > + > + # for test phase, qemu-* jobs > + edk2-ovmf > + expect > + python3-virt-firmware > + qemu-img > + qemu-system-x86 > ) > > dnf -y --setopt=install_weak_deps=False install "${DEPS[@]}" > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml > index cf4b7ed416b0..cfde4d05c6e8 100644 > --- a/automation/gitlab-ci/test.yaml > +++ b/automation/gitlab-ci/test.yaml > @@ -783,6 +783,15 @@ qemu-smoke-x86_64-gcc-efi-uki: > needs: > - debian-13-x86_64-gcc-debug > > +qemu-smoke-x86_64-gcc-efi-strictnx: > + extends: .qemu-smoke-x86_64 > + variables: > + CONTAINER: fedora:45-x86_64 > + script: > + - ./automation/scripts/qemu-xtf.sh x86_64-efi-strictnx pv64 example 2>&1 | tee ${LOGFILE} > + needs: > + - fedora-45-x86_64-gcc-debug > + > qemu-xtf-argo-x86_64-gcc-debug: > extends: .qemu-smoke-x86_64 > variables: > diff --git a/automation/scripts/include/xtf-x86_64-efi-strictnx b/automation/scripts/include/xtf-x86_64-efi-strictnx > new file mode 100644 > index 000000000000..49a87c7dd91f > --- /dev/null > +++ b/automation/scripts/include/xtf-x86_64-efi-strictnx > @@ -0,0 +1,64 @@ > +#!/bin/bash > +# > +# XTF test utilities (x86_64, EFI). > +# > + > +# Arch-specific environment overrides. > +function xtf_arch_prepare() > +{ > + export FW_PREFIX="${FW_PREFIX:-/usr/share/edk2/ovmf}" > + export QEMU_PREFIX="${QEMU_PREFIX:-}" > + export XEN_BINARY="${XEN_BINARY:-${WORKDIR}/xen.efi}" > + export XEN_CMDLINE="${XEN_CMDLINE:-loglvl=all noreboot console_timestamps=boot console=com1}" > + export XTF_SRC_BRANCH="${XTF_SRC_BRANCH:-master}" > + export XTF_SRC_URI="${XTF_SRC_URI:-https://xenbits.xen.org/git-http/xtf.git}" > + export XTF_SRC_VARIANTS="hvm64 pv64" > +} > + > +# Perform arch-specific XTF environment setup. > +function xtf_arch_setup() > +{ > + local esp_dir="${WORKDIR}/boot-esp" > + local efi_dir="${esp_dir}/EFI/BOOT" > + > + # Generate EFI boot environment > + mkdir -p ${efi_dir} > + cp ${XEN_BINARY} ${efi_dir}/BOOTX64.EFI > + cp ${XTF_BINARY} ${efi_dir}/kernel > + > + cat > ${efi_dir}/BOOTX64.cfg < +[global] > +default=test > + > +[test] > +options=${XEN_CMDLINE} > +kernel=kernel > +EOF > + > + # Fedora has StrictNX built into in the SecureBoot image, but by default > + # it is permissive and only prints a warning. It's made strict by an > + # extra -fw_cfg setting. > + local ovmf_code=${FW_PREFIX}/OVMF_CODE_4M.secboot.qcow2 > + local ovmf_vars=${FW_PREFIX}/OVMF_VARS_4M.secboot.qcow2 > + local ovmf_format=qcow2 > + > + cp $ovmf_code ${WORKDIR}/OVMF_CODE > + cp $ovmf_vars ${WORKDIR}/OVMF_VARS > + > + # Xen.efi isn't signed, so turn SecureBoot off. > + virt-fw-vars --inplace ${WORKDIR}/OVMF_VARS --set-false SecureBootEnable > + > + export TEST_CMD="${QEMU_PREFIX}qemu-system-x86_64 \ > + -no-reboot \ > + -nographic \ > + -monitor none \ > + -serial stdio \ > + -m 2048 \ > + -smp 2 \ > + -M q35,kernel-irqchip=split \ > + -drive if=pflash,format=${ovmf_format},readonly=on,file=${WORKDIR}/OVMF_CODE \ > + -drive if=pflash,format=${ovmf_format},file=${WORKDIR}/OVMF_VARS \ > + -drive file=fat:rw:${esp_dir},media=disk,index=0,format=raw \ > + -fw_cfg name=opt/org.tianocore/StrictNX,string=yes \ > + " > +} > -- > 2.39.5 > --8323329-460952466-1796069409=:2648157--