Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417393 - sys-boot/grub-2.00_beta5 miscalculates certain large lvm extents and starts looping forever during raid detection (plus a few minor patches)
Summary: sys-boot/grub-2.00_beta5 miscalculates certain large lvm extents and starts l...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-05-24 16:32 UTC by Doug Nazar
Modified: 2012-05-26 06:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diskfilter_lv_handle_large_extents (diskfilter_lv_handle_large_extents.patch,459 bytes, patch)
2012-05-24 16:32 UTC, Doug Nazar
Details | Diff
handle sorting rc kernels (handle_rc_kernels.patch,879 bytes, patch)
2012-05-24 16:33 UTC, Doug Nazar
Details | Diff
handle user specified -genkernel -kernname's for initramfs detection (improve_initramfs_autodetect_for_custom_genkernel_names.patch,1.27 KB, patch)
2012-05-24 16:34 UTC, Doug Nazar
Details | Diff
enable grub-reboot to use partial matches (make_grub_reboot_handle_partial_matches.patch,2.42 KB, patch)
2012-05-24 16:35 UTC, Doug Nazar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Nazar 2012-05-24 16:32:36 UTC
Created attachment 312961 [details, diff]
diskfilter_lv_handle_large_extents

I just happen to have an extent setup that overflows the grub_size_t variable to_read in grub-core/disk/diskfilter.c, function read_lv().

sector 0 start_extent 0 extent_size 8192 extent_count 524288

This results in a to_read of 0 which then loops forever successfully reading 0 bytes.


The other three are a few patches I've been carrying for awhile. The first 2 are small fixes to handle the genkernel builds I make (the --kernname option & sorting for -rc kernels). The last one allows you to specify a substring to grub-reboot to look for a valid entry. Very useful for specifying just the version or git hash while testing things. Might as well offer them up.
Comment 1 Doug Nazar 2012-05-24 16:33:10 UTC
Created attachment 312963 [details, diff]
handle sorting rc kernels
Comment 2 Doug Nazar 2012-05-24 16:34:25 UTC
Created attachment 312965 [details, diff]
handle user specified -genkernel -kernname's for initramfs detection
Comment 3 Doug Nazar 2012-05-24 16:35:09 UTC
Created attachment 312967 [details, diff]
enable grub-reboot to use partial matches
Comment 4 Mike Gilbert gentoo-dev 2012-05-24 16:51:48 UTC
Please send this stuff upstream.
Comment 5 Mike Gilbert gentoo-dev 2012-05-24 18:30:57 UTC
(In reply to comment #2)
> Created attachment 312965 [details, diff] [details, diff]
> handle user specified -genkernel -kernname's for initramfs detection

FYI, upstream may not be open to adding additional cases here unless you can justify it.