1
0
Fork 0
mirror of https://gitlab.freedesktop.org/gnu-grub/grub.git synced 2026-12-03 17:04:32 +00:00
No description
  • C 81.9%
  • Assembly 12.8%
  • M4 1.5%
  • Shell 1.5%
  • C++ 1%
  • Other 1.1%
Find a file
Maximilian Brune 59e4ff82dd disk/nvme: Fix max_agglomerate unit mismatch causing overlong reads
grub_nvme_open() set disk->max_agglomerate to a raw sector count (512),
but the field is actually expressed in GRUB_DISK_CACHE_SIZE units (blocks
of GRUB_DISK_CACHE_BITS + GRUB_DISK_SECTOR_BITS sectors), as done by
every other disk driver (ata.c, scsi.c, efidisk.c, biosdisk.c).

Because of this, the generic disk layer could agglomerate reads of up
to 512 * 64 = 32768 native sectors before calling down into
nvme_readwrite(), which itself hard-limits requests to 512 sectors.
Reading a sufficiently large file in one go (e.g. a large initramfs)
therefore triggered:

  error: disk/nvme.c:nvme_readwrite:607:overlong nvme read.

Convert the 512-sector limit into GRUB_DISK_CACHE_SIZE units, taking
the namespace's logical sector size into account, the same way ata.c
does for its own transfer-size limit.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>

Part-of: <https://gitlab.freedesktop.org/gnu-grub/grub/-/merge_requests/338>
2026-12-03 01:38:50 +01:00
.gitlab-ci CI: Add a Rust toolchain to the CI image 2026-11-26 10:20:12 -06:00
asm-tests asm-tests/i386-pc: Check that movl is 5 bytes. 2016-09-28 20:31:04 +03:00
conf zstd: Import zstd-1.5.7 2026-10-26 16:53:52 +00:00
docs fuzz: Add optional LLVM source-based coverage 2026-11-21 08:20:44 -06:00
fuzz fuzz: Add an ext2 filesystem fuzz target 2026-11-21 08:20:44 -06:00
grub-core disk/nvme: Fix max_agglomerate unit mismatch causing overlong reads 2026-12-03 01:38:50 +01:00
include grub-install: force journal draining to ensure data integrity 2026-11-10 20:21:29 +00:00
m4 configure: Add --image-base check for non-i386 2026-03-05 14:59:22 +01:00
po build: Fix parallel build failure 2026-05-12 10:13:25 -06:00
tests tests: Add ZFS native encryption and large dnode tests 2026-11-10 20:20:35 +00:00
themes/starfield Starfield theme. 2012-02-23 17:21:38 +01:00
unicode * unicode: Import Unicode 6.0 data. 2011-12-25 16:17:25 +01:00
util util/grub-install: Check grub_util_fopen() return values 2026-11-24 20:06:08 +00:00
.gitattributes gitattributes: Mark po/exclude.pot as binary so git won't try to diff nonprintables 2019-09-23 13:17:15 +02:00
.gitignore fuzz: Add the libFuzzer fuzzing platform 2026-11-21 08:20:44 -06:00
.gitlab-ci.yml CI: Create a 'Release' Pipeline 2026-08-31 10:14:21 -06:00
.travis.yml travis: Run bootstrap to fix build 2020-09-18 22:31:30 +02:00
acinclude.m4 configure: Drop -Ttext checks for i386-pc 2026-03-05 14:49:16 +01:00
AUTHORS 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org> 2005-09-03 16:54:27 +00:00
autogen.sh tests/asn1: Run the libtasn1 coding-long-oid and Test_errors self-tests 2026-08-12 16:22:15 +00:00
bootstrap bootstrap: Ensure shallow gnulib clone works on newer git 2025-09-04 14:37:21 +02:00
bootstrap.conf gnulib: patch argp-help.c to fix dropped const 2026-09-15 19:06:00 +00:00
BUGS BUGS: Update to point to bug tracking system 2025-09-04 14:37:21 +02:00
CODE_OF_CONDUCT.md Add Code of Conduct to project 2026-03-13 12:07:09 -06:00
config.h.in kern/misc: Add optional _FORTIFY_SOURCE-style bounds checking 2026-10-15 21:21:00 -05:00
configure.ac build: Add fuzzing / sanitizer build options 2026-11-21 08:20:44 -06:00
CONTRIBUTING CONTRIBUTING: document the contribution process 2026-03-27 10:40:25 -06:00
COPYING 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
coreboot.cfg * coreboot.cfg: Add missing file. 2013-11-20 00:52:23 +01:00
Gemfile Introduce CI for GRUB 2026-03-13 12:07:32 -06:00
geninit.sh automake commit without merge history 2010-05-06 11:34:04 +05:30
gentpl.py Strip extra sections generated on cygwin when creating binary images 2026-07-31 12:35:43 -06:00
index.html Introduce CI for GRUB 2026-03-13 12:07:32 -06:00
INSTALL fuzz: Add optional LLVM source-based coverage 2026-11-21 08:20:44 -06:00
linguas.sh linguas: Ensure that linguas.sh runs from the directory that it resides 2025-11-18 14:34:43 +01:00
MAINTAINERS MAINTAINERS: Update GRUB git repository and mailing list addresses 2026-03-13 18:14:10 +01:00
Makefile.am fuzz: Add an ext2 filesystem fuzz target 2026-11-21 08:20:44 -06:00
Makefile.fuzz.am fuzz: Add optional LLVM source-based coverage 2026-11-21 08:20:44 -06:00
Makefile.util.def grub-install: force journal draining to ensure data integrity 2026-11-10 20:21:29 +00:00
NEWS Release 2.16 2026-09-21 11:16:37 -06:00
README SECURITY: Add SECURITY file 2021-06-08 14:24:34 +02:00
SECURITY SECURITY: Update contact list values 2026-11-18 14:34:02 -06:00
THANKS 2009-12-11 Robert Millan <rmh.grub@aybabtu.com> 2009-12-11 22:44:47 +00:00
TODO TODO: Remove obsolete link 2016-02-12 17:51:52 +01:00

This is GRUB 2, the second version of the GRand Unified Bootloader.
GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more
robust, more powerful, and more portable.

See the file NEWS for a description of recent changes to GRUB 2.

See the file INSTALL for instructions on how to build and install the
GRUB 2 data and program files.

See the file MAINTAINERS for information about the GRUB maintainers, etc.

If you found a security vulnerability in the GRUB please check the SECURITY
file to get more information how to properly report this kind of bugs to
the maintainers.

Please visit the official web page of GRUB 2, for more information.
The URL is <http://www.gnu.org/software/grub/grub.html>.

More extensive documentation is available in the Info manual,
accessible using 'info grub' after building and installing GRUB 2.

There are a number of important user-visible differences from the
first version of GRUB, now known as GRUB Legacy. For a summary, please
see:

  info grub Introduction 'Changes from GRUB Legacy'