From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kg1zC-0000Wq-T2 for mharc-grub-devel@gnu.org; Fri, 20 Nov 2020 03:41:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kg1zB-0000VE-Hy for grub-devel@gnu.org; Fri, 20 Nov 2020 03:41:41 -0500 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:35444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kg1z9-0005QM-Tf for grub-devel@gnu.org; Fri, 20 Nov 2020 03:41:41 -0500 Received: by mail-lf1-x142.google.com with SMTP id a9so12324453lfh.2 for ; Fri, 20 Nov 2020 00:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=jlEJ9ynobo2lq1lvjbvCUGDioP33mSMxx4dgWCb7vp4=; b=d0nJgwg2o1kp01KUcHzVxsKaCKyKcMwsV6D7ASMR4DoN1Lay2Lav0BdiYu8aWvunec tHHAQs2XullvEgyYAh7MFSMoF6ZdGpZPjNi1KeXo9jXHU7XGuD5/gBc6bRZrUEuTekEn ptWMbuhK4BULyepi4AsProjuZQt7lTufJPuoikFCoKrA5izDiqGafmnJmb7afBx2JK47 H8EQNzZ6DqNTet4Tegb+52GOmlMXGnKB1wZMfPgbYOly2ORQmu48HZtck3zCWRKSN2gj FHNf42yYmoecw2Pyn64u9UBKhrsGPZTxBouxa8UPA5bvrhZw9jkJLvxXHS/VA16N6GUL 3wvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=jlEJ9ynobo2lq1lvjbvCUGDioP33mSMxx4dgWCb7vp4=; b=mm9fXOJ6Kj27J266YHw6ODhWSyIgernYklC3cyqL+cqiGtFcXRrFOUqFoKa7c6LEQH QcAJ9QfQomzQjgQus1pJSON6LEA3dqpE0jk//4rEZqzRG4KfDSgMnddc1JyveRa5Z7Mm ycWl5wepdz2UYAm3t2siMJimssX69lezlgs++uAKfKi2XDMhIdpnOAHma8CymSV7LtnQ D+aASa7CE7HMd6suU1pokmlFnJb3Mbqkp9TOeV235EeQqTZldkNgsbvRKdcxMm0VpwSb ddvZZ5ZuuYKCEet5trom1rI+w0EPwH7+68qY8UVuPpWGXq9S/7sZXjjBUaUqudCva2xr ySeA== X-Gm-Message-State: AOAM532nFrbWtepK4u479Nm667n0u1QuZRfIW/U9LLHnBiugD7hABcrR lb79l6E25kdgUrwEFDqf0EIEgv+fUnuOAA== X-Google-Smtp-Source: ABdhPJxJ6NaY0SpyfX7Sn2NVyeU6E0R/i6JCCYGS6AISmLVkDalwwQc6putmLwOyotVh9DSpWcc5Og== X-Received: by 2002:a19:c354:: with SMTP id t81mr7430524lff.283.1605861698339; Fri, 20 Nov 2020 00:41:38 -0800 (PST) Received: from crass-HP-ZBook-15-G2 ([136.49.211.192]) by smtp.gmail.com with ESMTPSA id u1sm270719lfk.65.2020.11.20.00.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 00:41:38 -0800 (PST) Date: Fri, 20 Nov 2020 02:41:28 -0600 From: Glenn Washburn To: Daniel Kiper Cc: grub-devel@gnu.org, Patrick Steinhardt Subject: Re: [PATCH v4 12/15] luks2: grub_cryptodisk_t->total_length is the max number of device native sectors Message-ID: <20201120024128.5c3e11c0@crass-HP-ZBook-15-G2> In-Reply-To: <20201117140608.dezhfm7jiggt4wml@tomti.i.net-space.pl> References: <1bc8c867c40610ac6e7c33622cc89396941da4b6.1604723348.git.development@efficientek.com> <20201117140608.dezhfm7jiggt4wml@tomti.i.net-space.pl> Reply-To: development@efficientek.com X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::142; envelope-from=development@efficientek.com; helo=mail-lf1-x142.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Fri, 20 Nov 2020 08:41:41 -0000 On Tue, 17 Nov 2020 15:06:08 +0100 Daniel Kiper wrote: > On Fri, Nov 06, 2020 at 10:44:32PM -0600, Glenn Washburn wrote: > > The total_length field is named confusingly because length usually > > refers to > > total_length? I think by mistake you left original commit message > here. It is confusing right now. > > > bytes, whereas in this case its really the total number of sectors > > on the device. Also counter-intuitively, grub_disk_get_size returns > > the total number of device native sectors. We need to convert the > > sectors from the size of the underlying device to the cryptodisk > > sector size. And segment.size is in bytes which need to be > > converted to cryptodisk sectors. > > > > Also, removed an empty statement. > > > > Signed-off-by: Glenn Washburn > > Otherwise patch LGTM. > > Daniel Damn, I thought I changed that. Good catch. Glenn