Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mPNRp-0001nc-PM for mharc-grub-devel@gnu.org; Sun, 12 Sep 2021 07:14:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPNRn-0001nL-8d for grub-devel@gnu.org; Sun, 12 Sep 2021 07:14:55 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPNRl-0004EF-QU for grub-devel@gnu.org; Sun, 12 Sep 2021 07:14:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 45D5B32008FE; Sun, 12 Sep 2021 07:14:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 12 Sep 2021 07:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=x862jU4v5aV068fMx3oNRDhLUI7 +jVQPwGjJFs8gtSs=; b=HM0Tq2qC0ZPaEcCKMGmupxn3ar27WIglooeNdbqusR4 v1oTh2XjTl3chm6hIIZd7HjRXhdtYv1g/m/uMs+TOKSlqn9Kjd4pWqeAytwB5yRY yMUhwWKIQ1wN+6Gcv3+C8eUDA6q2QjeebcHOse3/bCWaHXIfuGT0UIhSkyxcwEkw SxYtElKLzusC0v0xkYxWMkUrNXK84emORsh4xc9d6NU3C0vBbZ6UwL9EPGmG8hRe b6/xqeGVteWt1HRjHei2biW2R7si/CRoaGk73aLpRkNOyJw69grXRtDxy5XnCGMd DJYyOoibSz0WYbh6eD+sDFcwMFMsWhkmLA31sy+e4DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=x862jU 4v5aV068fMx3oNRDhLUI7+jVQPwGjJFs8gtSs=; b=PJs/Xi1XRGI/E255PG33Hr jwkKwEDgvJrdS56eHOuzYuANeQUYumgFvgivyhf3GaAzGhU6DD+LRh0blGcoNW6i /Hcyzo0lCFaUCjjQQsdwBkjTsR4BDTPNSGd08QbvPTsKHjPgTU0fjd8+8Kh5L9Bt z5irf3KjxZXETiSsQWC12cbtiJlq/BnBrc+NFqyrSaLAQmcQvl4nXJ7ARkTuGyUi kJti6rg+ffUIIAdw8TOhEnWF9TrCohdKsru2FkQ50wl4MX4KOjKIsfqn2NHwkpws 6T+h4eBN0t5K6YUoUElgtnJxz5ef30LFt6+Xz7YU0qY7Ey2TRbyhfHjGsu4yd9JQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeghedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeehgefhtdefueffheekgfffudelffejtdfhvdejkedthfehvdelgfetgfdvtedthfen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 12 Sep 2021 07:14:50 -0400 (EDT) Received: from localhost (ncase [10.192.0.11]) by vm-mail.pks.im (OpenSMTPD) with ESMTPSA id ce6f87de (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 12 Sep 2021 11:14:48 +0000 (UTC) Date: Sun, 12 Sep 2021 13:14:48 +0200 From: Patrick Steinhardt To: Glenn Washburn Cc: grub-devel@gnu.org, Daniel Kiper Subject: Re: [PATCH 1/3] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules Message-ID: References: <20210907044318.784a6f76@ubuntu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zEsTrCqPbjQaMwXE" Content-Disposition: inline In-Reply-To: <20210907044318.784a6f76@ubuntu> Received-SPF: pass client-ip=64.147.123.24; envelope-from=ps@pks.im; 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_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2021 11:14:55 -0000 --zEsTrCqPbjQaMwXE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 07, 2021 at 04:43:18AM +0000, Glenn Washburn wrote: > On Mon, 30 Aug 2021 19:55:59 +0200 > Patrick Steinhardt wrote: > > On Thu, Aug 26, 2021 at 12:08:50AM -0500, Glenn Washburn wrote: [snip] > > > diff --git a/grub-core/disk/luks.c b/grub-core/disk/luks.c > > > index 13103ea6a..e2a4a3bf5 100644 > > > --- a/grub-core/disk/luks.c > > > +++ b/grub-core/disk/luks.c > > > @@ -165,6 +165,10 @@ luks_recover_key (grub_disk_t source, > > > grub_size_t max_stripes =3D 1; > > > char *tmp; > > > =20 > > > + /* Keyfiles are not implemented yet */ > > > + if (dev->cargs->key_data || dev->cargs->key_len) > > > + return GRUB_ERR_NOT_IMPLEMENTED_YET; > > > + > > > err =3D grub_disk_read (source, 0, 0, sizeof (header), &header); > > > if (err) > > > return err; > >=20 > > Hum. This makes me wonder whether we'll have to adjust all backends > > whenever we add a new parameter to `cargs` to return > > `NOT_IMPLEMENTED`. I fear that it won't scale nicely, and that it is > > a recipe for passing unsupported arguments to backends even though > > they don't know to handle them. > >=20 > > Not sure about a nice alternative though. The only idea I have right > > now is something like a capabilities bitfield exposed by backends: > > only if a specific bit is set will we pass the corresponding field to > > such a backend. This would allow us to easily centralize the logic > > into a single function which only receives both the capabilities > > bitset and the `cargs` struct. > >=20 > > Other than that I really like where this is going. >=20 > I see your concern, and it would be nice to have an elegant solution to > it. The capability bitfield idea seems workable. I don't think this > needs to be solved right now though. This is a problem with all > proposed approaches. I think that this *could* lead to scalability > issues, but that's likely way down the road (considering the rate at > which we're adding args to cryptomount). Also, I don't think this patch > series hampers any such solution. So I think we can punt on this for > now. Does that sound reasonable? >=20 > Glenn Yeah, that does sound reasonable to me. Patrick --zEsTrCqPbjQaMwXE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF9hrgiFbCdvenl/rVbJhu7ckPpQFAmE94SgACgkQVbJhu7ck PpQKXA/+KRKGHxUGck/VtrxI1uzreEnQiiWyIiLJqWCH4kGqDKH9bAVil/lCWpzX V6YBgubDyMqgiwVRAuKsY1bupq6ptyQ8Qqr/PUwJ+1qIHfdil0jck14u/vIlPON/ Vng17NYPkD29iYALD/gNAIHaB7wKz2nhwoj176TohL2WtQlmYSmQ6rD/t+EH+A8e HGe/789SV+MbqVKXy4+MdZJjwZ71aNpmHkX0ljOqb6SQ7usZ6a+BJOC+XTP9pQLW 5a+WOPI4mKTQQPIZBBnDjX7hq2zXYsLiA9LcXYO/FxNcRhCx4iEmDqJn8SbvpOBu aM5hQbtoTrOfk9pdehIE9auCzOvoJLKGm5R6OYsGSS0evTBJr+pOll63IR1pXiJF I/D8kFecF78nkRhMGYht5xCZxS+VlNQ1H99PbPCZmMYMqZ+zE47fMXxXJ6wvSNwR 0dgTiASkQAOiXENXwq2JajpIedStAYy4/kK+1/KPlrjmlVru3kuJeJwbMS27ps2n VfkEY1DH5SKQtMpIyq5Xlu01FpZpocKF4qbuvyKAvI8AkK6hpvKKUNiuV81UL0Pe 7isno0hj8kf1l1CpSKRmazWwCL0A0nMK1Ec2ySN8Tm5BGjFQxqzK4dD9Fi8bfiBY bL8MT+gIROgoOSzA574qVD18f5uQDL24g6qDt7jxJ0JRIfMRfAQ= =KuQ9 -----END PGP SIGNATURE----- --zEsTrCqPbjQaMwXE--