Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lOwJM-0004iE-TL for mharc-grub-devel@gnu.org; Wed, 24 Mar 2021 01:44:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOwJL-0004go-J5 for grub-devel@gnu.org; Wed, 24 Mar 2021 01:44:07 -0400 Received: from ionic.de ([87.98.244.45]:51771 helo=mail.ionic.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOwIu-0008Rx-B7 for grub-devel@gnu.org; Wed, 24 Mar 2021 01:44:07 -0400 Authentication-Results: root24.eu; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=ionic.de (client-ip=217.92.117.31; helo=home.ionic.de; envelope-from=ionic@ionic.de; receiver=) Received: from [192.168.0.46] (home.ionic.de [217.92.117.31]) by mail.ionic.de (Postfix) with ESMTPSA id 701DD4F0046E for ; Wed, 24 Mar 2021 05:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ionic.de; s=default; t=1616564615; bh=cz4nkXNzl3byTAwDG+MC9Xr30OiHVIRsW42LanV5+/w=; h=To:References:From:Subject:Date:In-Reply-To:From; b=Q78bUyMdAtDEm9lf1iLNFUACgykPXYVNwFOw567RnV1bPKu6ast8xQgm3ifnQ03zI XnS74QoOMrtyBy718NHn2NCQ646FS751GEAlYxwWUx1XTPcKOawbz1GdNVZUjKOYaU E71EbQlZyHRsfd7XX5KNheEo+FGHpOz9tqnyL7sU= To: The development of GNU GRUB References: <20210323232406.7c93d7f0@crass-HP-ZBook-15-G2> From: Mihai Moldovan Subject: Re: [PATCH v2 0/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner Message-ID: <8e9f6d32-5d2c-3f1f-1286-5e402011f611@ionic.de> Date: Wed, 24 Mar 2021 06:43:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210323232406.7c93d7f0@crass-HP-ZBook-15-G2> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xyGgyi8RUOBJ9FG85UW0M0pQSoB9vVxKu" Received-SPF: pass client-ip=87.98.244.45; envelope-from=ionic@ionic.de; helo=mail.ionic.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, NICE_REPLY_A=-0.001, SPF_HELO_NONE=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: Wed, 24 Mar 2021 05:44:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xyGgyi8RUOBJ9FG85UW0M0pQSoB9vVxKu Content-Type: multipart/mixed; boundary="xbV0jjrxcruR5xlCTIpJlPkxcU5XnPO1C"; protected-headers="v1" From: Mihai Moldovan To: The development of GNU GRUB Message-ID: <8e9f6d32-5d2c-3f1f-1286-5e402011f611@ionic.de> Subject: Re: [PATCH v2 0/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner References: <20210323232406.7c93d7f0@crass-HP-ZBook-15-G2> In-Reply-To: <20210323232406.7c93d7f0@crass-HP-ZBook-15-G2> --xbV0jjrxcruR5xlCTIpJlPkxcU5XnPO1C Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable * On 3/24/21 5:24 AM, Glenn Washburn wrote: > Aside from the fact that this doesn't handle negative values of n, this= > would be fine. Neither do the original version or grub_strncasecmp()... and if you *can*= get n to be negative, I'd be highly impressed! Jokes aside, it's unsigned, so there's no way for it to become negative. = It should probably handle 0 =3D=3D n in a different way like grub_strncasecm= p() does, but that's easily added. > I don't think its as big a deal as it sounds. There are just two extra > arrays on the stack, so not memory management issues. Agree. > Partly I chose to implement it the way I did by using grub_strncasecmp > because its pretty trivial to see just by looking at the patches that I= 'm > not changing any core logic. Yeah, that's pretty obvious by it using grub_strncasecmp() in the end, bu= t my arguments would be that we don't need two passes over the input strings i= nstead of just one and could avoid the copies entirely. (Yes, these arguments ar= e clearly over-optimizations.) Also, semantically, UUID parsing *is* different from simple string parsin= g, which is also better reflected there. > But I'm not wedded to my implementation, I just want this > functionality. If I get time, I'll make a new version taking this in to= > account. I'm not in any way authoritative, just adding my thoughts. :) I don't really care which version gets in, but I figured that since it mi= ght be a while until this lands in grub proper, I could still offer some insight= s. Mihai --xbV0jjrxcruR5xlCTIpJlPkxcU5XnPO1C-- --xyGgyi8RUOBJ9FG85UW0M0pQSoB9vVxKu Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEbhHQj3UzgcdE8cg8H9Yu2W4lOocFAmBa0YYFAwAAAAAACgkQH9Yu2W4lOodf XhAA0krgQUkaNlso8p0oTJTyr2UE1TTn2DHTrU1LEVGDg49n59bAaNfTFK4fBzYLOqGRwDJLvpN9 XzNeKF0UcNenvs8j1tciEr7snzZHZIsufMvlpIxkP1k4WNO/9jC7w9y/UbN/7aGUwI/6ReEch2xW 6Ji8r5BiZ7l8mMsaWai2RU819qfBsFAtf9FYH3RYGJg67Zigdzyb/0EpVgiyDA9XhoKpBN3P+MMe tEMLlcimaZvT5ocCIaqMTfA8RemfO1RaQ3ho0/Fg5qmDCDWUh141MkLkYnAbetSfclVOTuV0WEKz a2nLlC2iFb+EiTMyxemfuXpWsq1nLHQwjolblHXnAzA4q05IXSrqIKK/BGFhQUhvNbqIZuLC59NW cR2fV3RIQLBl5TU6Fb2bVKHDNzdVKIuLZ9m2khgnLvT2W4bNkreDBBqwS0XPMESCxmPFqKQk+0Cw TimVZ6KzK+LCkPgAcH7X8FFe8aRBP+QKSJ3deUj/kX7nE1M0OAFCxYfGFOo8y/eFQMsIdoSS3Z/F vBY/s8qzb4rxLh9+xYN679LJepVtZ2DUYAf5+Jwspc6Kjx2KWkE8S1XTN/P8isFXX1cXNbb9A+Z+ qityVMaHfvJtW8vt4JYCWWuThKTwPyYohszfu0qOtXTtYJuj3IWsxQyh47BPfMSKhXUaOI8I+uXZ dNU= =/c5A -----END PGP SIGNATURE----- --xyGgyi8RUOBJ9FG85UW0M0pQSoB9vVxKu--