Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 417393

Summary: sys-boot/grub-2.00_beta5 miscalculates certain large lvm extents and starts looping forever during raid detection (plus a few minor patches)
Product: Gentoo Linux Reporter: Doug Nazar <nazard>
Component: [OLD] Core systemAssignee: Mike Gilbert <floppym>
Status: RESOLVED INVALID    
Severity: normal CC: base-system
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: diskfilter_lv_handle_large_extents
handle sorting rc kernels
handle user specified -genkernel -kernname's for initramfs detection
enable grub-reboot to use partial matches

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.