Skip to content
  • Jan Beulich's avatar
    x86: fix code paths used by update_mptable · 5c0e6f03
    Jan Beulich authored
    
    
    Impact: fix crashes under Xen due to unrobust e820 code
    
    find_e820_area_size() must return a properly distinguishable and
    out-of-bounds value when it fails, and -1UL does not meet that
    criteria on i386/PAE. Additionally, callers of the function must
    check against that value.
    
    early_reserve_e820() should be prepared for the region found to be
    outside of the addressable range on 32-bits.
    
    e820_update_range_map() should not blindly update e820, but should do
    all it work on the map it got a pointer passed for (which in 50% of the
    cases is &e820_saved). It must also not call e820_add_region(), as that
    again acts on e820 unconditionally.
    
    The issues were found when trying to make this option work in our Xen
    kernel (i.e. where some of the silent assumptions made in the code
    would not hold).
    
    Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
    LKML-Reference: <49B9171B.76E4.0078.0@novell.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    5c0e6f03