Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p5D7p-0002ru-86 for mharc-grub-devel@gnu.org; Tue, 13 Dec 2022 16:47:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5D7n-0002na-JX for grub-devel@gnu.org; Tue, 13 Dec 2022 16:47:43 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5D7l-0005BO-OD for grub-devel@gnu.org; Tue, 13 Dec 2022 16:47:43 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id BC309320085B; Tue, 13 Dec 2022 16:47:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 13 Dec 2022 16:47:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1670968059; x= 1671054459; bh=1nm9nYbb/f4omHXKZK9jwj6By+R/gQlLioYacaZkg1E=; b=o zNqSlyWnJ70siTeCeNAwmwn3HY4BdG0wtbgadnoqAlsCJFemrCmsg5Pu31ZKLPgd MXTkMJhGRO2iFK0Ou09TSB3PfirAITzbYttIR5Rv8FlCPdEI22Wc4VYn/KGqbWZW pplUZLvM94knFfFxUvtzLqBqeRo0U2tBdKmfUCfUlExLVLnEFkoOAtJD4xDV26Nh tNnNLgQMzybYJd0EqRt/GViu9ALM9+IJr6Aem0c25wMBwJ7n6iFbjnjuThv8Up9P CYzJcj4SAga5gZlDPPJGIMDGyeM4/c6CE0s4PaWi3zm3cULXCYZHjS2g2LS8kVuU wjYXyVWPqBKefvuVZj6aQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1670968059; x=1671054459; bh=1nm9nYbb/f4omHXKZK9jwj6By+R/ gQlLioYacaZkg1E=; b=OlRVIm1jfQUIQMePeIoa7DJKXD87LlR3Zs0Ulb9xLnXO R+U5qF2ixr86QZTQzypt27A3pX2xw8O8WOKiXmCFj1myDs/3zRk+FZWkf1lGvg8s ZX1HnSfmDj5xj5IkvNCJjel5A8z1CAWKcErn+W4iJWii+OP6YbObwZRv09lVIFm0 8ojUSjGZRm4upLUxeWzqtVezLiDxrSiobSDwYIGvxzKUHRSi3qPF+FyLjgcTszJy eMYswshvOFgzr8WjNrTDOlbkBf1rRtITRkxR3E4Tl4Xz4AkEECuYgCYgwod/juha O/ED4+xZLzi6gmQ95jCiPy7wy4bZHeY4INECk4XWzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpefgudel teefvefhfeehieetleeihfejhfeludevteetkeevtedtvdegueetfeejudenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhes ihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Dec 2022 16:47:38 -0500 (EST) Date: Tue, 13 Dec 2022 22:47:35 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Daniel Kiper Cc: grub-devel@gnu.org Subject: Re: [PATCH] templates/linux_xen: fix detecting xsm policy Message-ID: References: <20221213041235.2284811-1-marmarek@invisiblethingslab.com> <20221213120214.vnuz3x3egxkpgkwh@tomti.i.net-space.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="68JUSQOt4EdH4F84" Content-Disposition: inline In-Reply-To: <20221213120214.vnuz3x3egxkpgkwh@tomti.i.net-space.pl> Received-SPF: none client-ip=64.147.123.24; envelope-from=marmarek@invisiblethingslab.com; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2022 21:47:43 -0000 --68JUSQOt4EdH4F84 Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Tue, 13 Dec 2022 22:47:35 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Daniel Kiper Cc: grub-devel@gnu.org Subject: Re: [PATCH] templates/linux_xen: fix detecting xsm policy On Tue, Dec 13, 2022 at 01:02:14PM +0100, Daniel Kiper wrote: > On Tue, Dec 13, 2022 at 05:12:35AM +0100, Marek Marczykowski-G=C3=B3recki= wrote: > > xsmpolicy variable was left set from previous function call. This > > resulted in all-but-first menu entries including XSM policy, even if it > > did not exist. > > > > Fix this by initializing the xenpolicy variable. > > > > Signed-off-by: Marek Marczykowski-G=C3=B3recki > > --- > > util/grub.d/20_linux_xen.in | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in > > index c1ebd0953..e46b757da 100644 > > --- a/util/grub.d/20_linux_xen.in > > +++ b/util/grub.d/20_linux_xen.in > > @@ -105,6 +105,7 @@ linux_entry_xsm () > > xsm=3D"$7" > > # If user wants to enable XSM support, make sure there's > > # corresponding policy file. > > + xenpolicy=3D >=20 > Would not it be better to make this variable local? Or even better all > variables (and arguments) which are used in this function only? I considered that, but the script has #!/bin/sh, not #!/bin/bash. Isn't local a bash-specific feature? --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --68JUSQOt4EdH4F84 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmOY8vcACgkQ24/THMrX 1yyD7QgAh0yTJTlIhnv2jq89pZajREweFw8R7TnDM8P40w8nr2S44msBtTpLFWx/ LvFpNpAP1vyIvxNvXhVa6PzA4Em9Cpiw4v09s3SLFgbxrH1Xf0b6ds0lTut2FeNF Jdl+rHAZdpEwixrLoBp+xH0q7rVAOo/M3bYDmA4ad6d1uczPF3YBQYll/fvVXhEi fdqg3mEOh1Bs55QMLOxMXnoK+nLPA238tkBnIgXNR1yr5C4YLSkS4wgyr0oz51h4 RW9n/ZDACEOT2X9OIe2gtlB3kW4z7XZIL+Fhznns/+RXa2LYbTR6G+qj3FVrGDhu h2/vP6MYq4pouYG0vy8f4big8LxzUg== =Gso+ -----END PGP SIGNATURE----- --68JUSQOt4EdH4F84--