From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nG1ZJ-0005F7-GM for mharc-grub-devel@gnu.org; Fri, 04 Feb 2022 11:36:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG1Z2-0005AJ-Ri for grub-devel@gnu.org; Fri, 04 Feb 2022 11:36:07 -0500 Received: from [2607:f8b0:4864:20::72a] (port=42713 helo=mail-qk1-x72a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nG1Yx-0007om-Hq for grub-devel@gnu.org; Fri, 04 Feb 2022 11:36:00 -0500 Received: by mail-qk1-x72a.google.com with SMTP id m25so5153371qka.9 for ; Fri, 04 Feb 2022 08:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=+JvTBDlEyEaEfDvmAZY3yZsvReyfGV3MTnGxhYvh2dI=; b=Chlwbjo+0a2Z2XV3r/b+wnP5v40DqRu+HbaNvR+o7L/Tf2HXf94PDWQMbAq9slZcOm 5LHM87m8/Kdj0EznDWDDOGXmeLRhtXPA54B0Ppces78+NNVN7bbGbwla/cpjzkjiSnYB +RekgGq34Sx3iEJ88qtwTSkb7nFATqjHdlj1X9JgBil9S2ktTK7wwufn+tqnCAqCBy7l h8lMVYoeVDCgU2SYnhi3t4xgaeRj/Zu7UWhsfgP7C2aGOPIuIeFRbg0cvSXryUBjDQeg vs4bJbLjPc2CXoj6Cc/DeF8tEG5koSdv+KjbS0Spl1k/GCbzApQ73/taCSzlPIY6TSZj W0fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=+JvTBDlEyEaEfDvmAZY3yZsvReyfGV3MTnGxhYvh2dI=; b=4POKNv8geJ6NGXmhhwHaB5EnlpBmt7N8rGkNuGOPOR60Uaa86a4aEe1Ee1tAjG4jzN D1WI240lTkuRNkYpEdHTqz+HzbsSA3SqHJersDcnteEA7GmxPrXJ2JJKniozDNk/5bQH pmuFTtUdPafT9oSruvH+05PUAInt3rtkyKP0IsS/85KRzZctKFRGJcrZ230pq6UA0ZTP 0zF8c8vTfvCMnEoAa0Eq8bCGnNaJQt8v4+Ef9ZbNjC8UObdIRqff7q8vQL9mO1R8c/rg fWDn1OXn+ajgxSc8RH5lKbKWzJtzp+UZOxMQM6RQ1lSfGn5anyAfo1tw9S/kMM2p1xbr /29g== X-Gm-Message-State: AOAM5311lz7BF5ng6ghsmBEzaZefksX6O9updI9hjSr1Y7QMFMuMCWXI VTykSmg6M+PRAF0pa135wEsWpw== X-Google-Smtp-Source: ABdhPJx7h04RqpKuhzZMRjaifqzi0DScAi7FwtSvKFxvy67tPix/vFU2OtGaUiabHK/xKEZ7rEvP9w== X-Received: by 2002:a05:620a:4546:: with SMTP id u6mr1927118qkp.279.1643992505805; Fri, 04 Feb 2022 08:35:05 -0800 (PST) Received: from crass-HP-ZBook-15-G2 (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id v14sm1443296qtk.5.2022.02.04.08.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 08:35:01 -0800 (PST) Date: Fri, 4 Feb 2022 10:34:45 -0600 From: Glenn Washburn To: Maxim Fomin Cc: The development of GNU GRUB Subject: Re: [PATCH 0/2] Support plain encryption mode. Message-ID: <20220204103445.7464e12d@crass-HP-ZBook-15-G2> In-Reply-To: <-eJYlKGmo1nQYwTI-XEex96pH74k1pxOCOKbu_YI-kTR0NsUxcrgq1r4Ex13cN0s2HbMHo67e5kH4t6rNsBY2L5-K6qq3OCDDxCDDNFlbns=@fomin.one> References: <-gYg2fhNOHhD_BSgH0s5jno5SmqrQC7rpo6mu3cT1I0XzEv5SUsXeyONbFy4g_LouLwZSzn2s0dFhHvvVw9_HNpJPIRp1d3eZCBGXCJPD4g=@fomin.one> <20220131144018.7592f807@crass-HP-ZBook-15-G2> <20220201185106.4be9b679@crass-HP-ZBook-15-G2> <-eJYlKGmo1nQYwTI-XEex96pH74k1pxOCOKbu_YI-kTR0NsUxcrgq1r4Ex13cN0s2HbMHo67e5kH4t6rNsBY2L5-K6qq3OCDDxCDDNFlbns=@fomin.one> Reply-To: development@efficientek.com X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::72a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=development@efficientek.com; helo=mail-qk1-x72a.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: Fri, 04 Feb 2022 16:36:08 -0000 On Wed, 02 Feb 2022 15:00:10 +0000 Maxim Fomin wrote: > ------- Original Message ------- > > > > > > Plainmount can work with '(hdX,gptY)' syntax in config or shell (actually, this > > > > > > is the base syntax) and thus it is not limited to GPT paritions, what is limited > > > > > > is the ability to use UUID - currently only on GPT. If partition scheme does not > > > > > > have UUID then UUID as a convenience feature cannot be supported - inconvenient, > > > > > > but technically fair. I will take a look at MBR UUID and see whether they can be > > > > > > supported. Possible situations (under current implementaion) are follows: > > > > > > a) GPT disk, multi-disk environment, disks map unpredictably: can name partitions > > > > > > by GPT UUID in config file/shell, no problem, ability to name by UUID has value > > > > I agree that searching by partition UUID is useful and desirable. > > > > However, I don't think this is the right approach. GRUB should have > > > > generic searching by partition UUID. There is already a patch for > > > > this[1]. Perhaps you can test/review this patch to help it gain more > > > > visibility and advocate for it being accepted. > > > > Glenn > > > > [1] https://lists.gnu.org/archive/html/grub-devel/2021-04/msg00055.html > > > > Such function (or several functions) should be added into grub 'library', so it can be > used to search disk by PART UUID in different places. The patch you refer to seems to > add this functionality only to 'search' grub command via 'void grub_search_partuuid' > function. Can it be reused on other places? It seems in oder to use it, grub code must > call 'search' command and receive the result from grub environment variable which is > not convinient for other grub code interested in this feature. I think the proper way > to do it is to write some library function which can be used by search, probe (btw I > borrowed some details from it - so there is code duplication in search/probe), > plainmount commands and other commands in grub. I agree that reducing code duplication would be a good idea. Essentially the grub 'library' you're wanting exists as the kernel code that is always loaded. Would you like to find a good place to put the common partition uuid matching code and send a patch? As far as plainmount is concerned, I wasn't envisioning that it use that code directly and it shouldn't. I was imagining something like this snippet of GRUB script: search --partuuid --set KEYFILEDISK -u $PARTUUID plainmount -k ($KEYFILEDISK)/path/to/keyfile Glenn