Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bcaSe-0005je-7A for mharc-grub-devel@gnu.org; Wed, 24 Aug 2016 11:51:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcYN3-0002fc-G2 for grub-devel@gnu.org; Wed, 24 Aug 2016 09:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcYN0-0000zu-7F for grub-devel@gnu.org; Wed, 24 Aug 2016 09:37:33 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcYN0-0000zp-1B for grub-devel@gnu.org; Wed, 24 Aug 2016 09:37:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id i138so2690097wmf.3 for ; Wed, 24 Aug 2016 06:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=ciDRVKvoG+C+SBW0enioYJmZ0wEgWkcJsZ3X7ErFPKs=; b=DzCo1WyfLRk0QXwpVL8YlWskUvfiUKEi6Pzdj09rk/sb4RMvHJHWlk0JYOetERNYCi cyarj2R4l9tvfF7vz+3EtJSIJ0EMn8lIyCn+nncZDi7Ddwbo1TZAIS8ytH40NPQSPMbC E2j34/ENjpbiFn9g/goktHGn8I4/3XyLEQzU691/om22c994zDojJUUC73rPalyW+B2h Fc6FGZgt5/2EPabroNz4SpFh1D6f/rtzLiZE+8puBoLMZsIL6pZ2HGYCROrreyIw9UZR jo9e1AV7eYaEY0Vg59kBnqs0EVxr23wraC/L2S4vf0q/+yBSlo702hlKYiwkOt7dmQL9 H9UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=ciDRVKvoG+C+SBW0enioYJmZ0wEgWkcJsZ3X7ErFPKs=; b=jrKtWwulO1cJ9XJ6lkFRhKth4L7A39NMVosb1t9vNGo1q7X2/x1v9mClm+//2yDuoa 9gCqp+uyM46SUx8P5T5Tny1hkQQG6NXCnHEsYPhVQ8RlBT2uZUKnDdC+QRwseALw3Vxy OGMkMIG4YptSD46JTR4KM9YoJFY85QzAtpRhmL1T/+npwZWQnMQ5UrQKISsB7kfjEda2 0YQDEbFW4kJfF+1am0ivn9EqEOL9+fQO2SCTMX24P6SwUYmfPA/U44vUh1J+PjfdiXLz YAEqpIb1gdB6KZ6DiJrhI0SNXHuRrL1j4N8YEfXVfjGWUh1eH1nu4YaK9spWX9SCRsTu 74aw== X-Gm-Message-State: AEkooute2HHlARLFkFZoSwc6gYiz8rVEGpclF7ElnB1F/99RKV0n6YwYCJRU+3W794J5xA== X-Received: by 10.28.9.194 with SMTP id 185mr23689779wmj.37.1472045789011; Wed, 24 Aug 2016 06:36:29 -0700 (PDT) Received: from localhost.localdomain (2-238-57-164.ip242.fastwebnet.it. [2.238.57.164]) by smtp.gmail.com with ESMTPSA id n131sm33694985wmd.3.2016.08.24.06.36.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Aug 2016 06:36:27 -0700 (PDT) Sender: Carlo Caione From: Carlo Caione To: grub-devel@gnu.org, linux@endlessm.com Cc: Carlo Caione Subject: [PATCH] Issue reading >4GB loopback image via grub exfat Date: Wed, 24 Aug 2016 15:36:21 +0200 Message-Id: <1472045782-11346-1-git-send-email-carlo@caione.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.65 X-Mailman-Approved-At: Wed, 24 Aug 2016 11:51:27 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 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 Aug 2016 13:37:34 -0000 From: Carlo Caione We have a big image (~6GB) in an exFAT partition. We want to read the content of the image using the loopback command in grub. What we get is an error message: grub> loopback loop0 (hd1,gpt1)/endless/endless.img grub> ls (loop0,gpt3)/boot error: attempt to read or write outside of disk `loop0'. We traced this error back to the wrong type for the 'file_size' variable in the 'grub_fat_data' struct. When MODE_EXFAT is defined and grub is compiled for i386-pc, 'file_size' is still a 32bit variable when it should really be a 64bit variable to fully contain the size of the >4GB file we are dealing with. Carlo Caione (1): FAT/exFAT: Fix wrong size detection for files > 4GB grub-core/fs/fat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.4