From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kB5Bf-0003ZG-KM for mharc-grub-devel@gnu.org; Wed, 26 Aug 2020 19:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB5Be-0003Z4-3I for grub-devel@gnu.org; Wed, 26 Aug 2020 19:50:38 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:34631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB5Bc-0003AA-EE for grub-devel@gnu.org; Wed, 26 Aug 2020 19:50:37 -0400 Received: by mail-qt1-x843.google.com with SMTP id x12so3318254qtp.1 for ; Wed, 26 Aug 2020 16:50:31 -0700 (PDT) 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=I5aN4t1Nr6tHBdfFl0sn+pdAD3zGH59jVvfBs2yKCZQ=; b=cu62Wk/M+/ApReqpJL2mzUEtzfC/S+g5h80NhENtPVlsHehyUBxX/avR1IhOBgvlkG c6PG1DuxpgwaCtxBC1M55NQkSm+AgFhEGGe6tdEcXW5nsd2qVtUI5ebch5WKrsXG6OH2 JbbxtDX0xMIkXOEvSElct2mOMHPm+8g8JcTamVIdJeSzVOfpLxTUClgH97692mkadIqF VSGP0yVZ3AdxKYOWR7ZH9Jc2y1/pbYZqAnlISxwcXIxaOLjWML0hw7swGwxLbV78bWlP i2D037FWR+6iF0W4SPOLGVzEEvNAr4jC3PhGeG/ABhuICn6dj7mr/bSd4VmROnoRtSmG foTw== 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=I5aN4t1Nr6tHBdfFl0sn+pdAD3zGH59jVvfBs2yKCZQ=; b=S+40ubUXLjHt0+/Y4YLjFWUMNRPZTOog4D5aT/RqJhIOeN9WDlZos7I54lvBP40SVk C6iyWnJTmLBai3Q2xJBRnZUDtxTx5OEXyrbxoFsNOXhs3boHZNMSZWF/5LRukuY0RZ8H ECwdILOtQjFuqS+1YyLEx1optOsRNQiuQtnjOEvZkanZfrsPnizsI1PiMtyqxgIcG3x7 5OzaVGPBYaiRJ+2TzEHZWR+O4iThqozrFR4/Q0PhU601opdVHwPag62849uHRhxWYZ3b NS4VBgDuUTYTdBftaMewaVE2nx9RdoHhpWzlKrYJlB8PYHOoNtD43x301Kft02LV8UYb VqfQ== X-Gm-Message-State: AOAM530G6xv5kw6N5jeZDvgo7mGs5lBiv7V5ScKUyKEP9Zpveobgw+Th TsDuagpacz/vh/1URjoJTbZcwC3AqgadGg== X-Google-Smtp-Source: ABdhPJy2RBLfNCKl5F4/UfJDUKptFyIVlYKzotpPdsVZ0K7UHoqS0O9sbitXTuJjjn0IAaygcQbLyQ== X-Received: by 2002:ac8:4747:: with SMTP id k7mr16202702qtp.76.1598485831254; Wed, 26 Aug 2020 16:50:31 -0700 (PDT) Received: from crass-HP-ZBook-15-G2 ([2605:a601:aaec:9b00:fc1f:b488:83ac:101a]) by smtp.gmail.com with ESMTPSA id c24sm478533qkk.89.2020.08.26.16.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 16:50:31 -0700 (PDT) Date: Wed, 26 Aug 2020 18:50:29 -0500 From: Glenn Washburn To: Patrick Steinhardt Cc: grub-devel@gnu.org Subject: Re: [PATCH] cryptodisk: Incorrect calculation of sector in grub_cryptodisk_read/write. Message-ID: <20200826185029.7cb01a16@crass-HP-ZBook-15-G2> In-Reply-To: <20200826234435.2079207-1-development@efficientek.com> References: <20200826234435.2079207-1-development@efficientek.com> 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=2607:f8b0:4864:20::843; envelope-from=development@efficientek.com; helo=mail-qt1-x843.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: Wed, 26 Aug 2020 23:50:38 -0000 On Wed, 26 Aug 2020 18:44:35 -0500 Glenn Washburn wrote: > Here dev is a grub_cryptodisk_t and dev->offset is offset in sectors > of size native to the cryptodisk device. The function grub_disk_read > expects that the given start sector is in the native grub sector > size, so dev->offset must be converted as well. Create function > grub_disk_from_native_sector to convert disk sectors to grub sectors. Upon reviewing my previous patch, I realized that the updated commit message had gotten lost. So this only changes the commit message and not the diff itself. I don't think its imperative to have this updated commit message, but I do think it more clearly and accurately describes the patch. Glenn