Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jan 2020 19:54:05 +0000 (11:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jan 2020 19:54:05 +0000 (11:54 -0800)
Pull x86 boot update from Ingo Molnar:
 "Two minor changes: fix an atypical binutils combination build bug, and
  also fix a VRAM size check for simplefb"

* 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/sysfb: Fix check for bad VRAM size
  x86/boot: Discard .eh_frame sections

arch/x86/boot/setup.ld
arch/x86/kernel/sysfb_simplefb.c

index 0149e41..3da1c37 100644 (file)
@@ -51,7 +51,10 @@ SECTIONS
        . = ALIGN(16);
        _end = .;
 
-       /DISCARD/ : { *(.note*) }
+       /DISCARD/       : {
+               *(.eh_frame)
+               *(.note*)
+       }
 
        /*
         * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
index 01f0e22..298fc1e 100644 (file)
@@ -90,11 +90,11 @@ __init int create_simplefb(const struct screen_info *si,
        if (si->orig_video_isVGA == VIDEO_TYPE_VLFB)
                size <<= 16;
        length = mode->height * mode->stride;
-       length = PAGE_ALIGN(length);
        if (length > size) {
                printk(KERN_WARNING "sysfb: VRAM smaller than advertised\n");
                return -EINVAL;
        }
+       length = PAGE_ALIGN(length);
 
        /* setup IORESOURCE_MEM as framebuffer memory */
        memset(&res, 0, sizeof(res));