From 62bf8b72c76c4708f646f5892f747fe1a8f1fe59 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 29 Jul 2014 19:00:08 -0300 Subject: linux-libre-{pae,xen}-3.15.7-1: updating version * add better value for DEFAULT_MMAP_MIN_ADDR (FS#41260 -> https://bugs.archlinux.org/task/41260) --- kernels/linux-libre-pae/0013-efistub-fix.patch | 177 ------------------------- kernels/linux-libre-pae/PKGBUILD | 18 +-- kernels/linux-libre-pae/config | 2 +- 3 files changed, 7 insertions(+), 190 deletions(-) delete mode 100644 kernels/linux-libre-pae/0013-efistub-fix.patch (limited to 'kernels/linux-libre-pae') diff --git a/kernels/linux-libre-pae/0013-efistub-fix.patch b/kernels/linux-libre-pae/0013-efistub-fix.patch deleted file mode 100644 index a2da3b63a..000000000 --- a/kernels/linux-libre-pae/0013-efistub-fix.patch +++ /dev/null @@ -1,177 +0,0 @@ -From c7fb93ec51d462ec3540a729ba446663c26a0505 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Thu, 10 Jul 2014 12:26:20 +0100 -Subject: x86/efi: Include a .bss section within the PE/COFF headers -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The PE/COFF headers currently describe only the initialised-data -portions of the image, and result in no space being allocated for the -uninitialised-data portions. Consequently, the EFI boot stub will end -up overwriting unexpected areas of memory, with unpredictable results. - -Fix by including a .bss section in the PE/COFF headers (functionally -equivalent to the init_size field in the bzImage header). - -Signed-off-by: Michael Brown -Cc: Thomas Bächler -Cc: Josh Boyer -Cc: -Signed-off-by: Matt Fleming - -diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S -index 84c2234..7a6d43a 100644 ---- a/arch/x86/boot/header.S -+++ b/arch/x86/boot/header.S -@@ -91,10 +91,9 @@ bs_die: - - .section ".bsdata", "a" - bugger_off_msg: -- .ascii "Direct floppy boot is not supported. " -- .ascii "Use a boot loader program instead.\r\n" -+ .ascii "Use a boot loader.\r\n" - .ascii "\n" -- .ascii "Remove disk and press any key to reboot ...\r\n" -+ .ascii "Remove disk and press any key to reboot...\r\n" - .byte 0 - - #ifdef CONFIG_EFI_STUB -@@ -108,7 +107,7 @@ coff_header: - #else - .word 0x8664 # x86-64 - #endif -- .word 3 # nr_sections -+ .word 4 # nr_sections - .long 0 # TimeDateStamp - .long 0 # PointerToSymbolTable - .long 1 # NumberOfSymbols -@@ -250,6 +249,25 @@ section_table: - .word 0 # NumberOfLineNumbers - .long 0x60500020 # Characteristics (section flags) - -+ # -+ # The offset & size fields are filled in by build.c. -+ # -+ .ascii ".bss" -+ .byte 0 -+ .byte 0 -+ .byte 0 -+ .byte 0 -+ .long 0 -+ .long 0x0 -+ .long 0 # Size of initialized data -+ # on disk -+ .long 0x0 -+ .long 0 # PointerToRelocations -+ .long 0 # PointerToLineNumbers -+ .word 0 # NumberOfRelocations -+ .word 0 # NumberOfLineNumbers -+ .long 0xc8000080 # Characteristics (section flags) -+ - #endif /* CONFIG_EFI_STUB */ - - # Kernel attributes; used by setup. This is part 1 of the -diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c -index 1a2f212..a7661c4 100644 ---- a/arch/x86/boot/tools/build.c -+++ b/arch/x86/boot/tools/build.c -@@ -143,7 +143,7 @@ static void usage(void) - - #ifdef CONFIG_EFI_STUB - --static void update_pecoff_section_header(char *section_name, u32 offset, u32 size) -+static void update_pecoff_section_header_fields(char *section_name, u32 vma, u32 size, u32 datasz, u32 offset) - { - unsigned int pe_header; - unsigned short num_sections; -@@ -164,10 +164,10 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz - put_unaligned_le32(size, section + 0x8); - - /* section header vma field */ -- put_unaligned_le32(offset, section + 0xc); -+ put_unaligned_le32(vma, section + 0xc); - - /* section header 'size of initialised data' field */ -- put_unaligned_le32(size, section + 0x10); -+ put_unaligned_le32(datasz, section + 0x10); - - /* section header 'file offset' field */ - put_unaligned_le32(offset, section + 0x14); -@@ -179,6 +179,11 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz - } - } - -+static void update_pecoff_section_header(char *section_name, u32 offset, u32 size) -+{ -+ update_pecoff_section_header_fields(section_name, offset, size, size, offset); -+} -+ - static void update_pecoff_setup_and_reloc(unsigned int size) - { - u32 setup_offset = 0x200; -@@ -203,9 +208,6 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) - - pe_header = get_unaligned_le32(&buf[0x3c]); - -- /* Size of image */ -- put_unaligned_le32(file_sz, &buf[pe_header + 0x50]); -- - /* - * Size of code: Subtract the size of the first sector (512 bytes) - * which includes the header. -@@ -220,6 +222,22 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) - update_pecoff_section_header(".text", text_start, text_sz); - } - -+static void update_pecoff_bss(unsigned int file_sz, unsigned int init_sz) -+{ -+ unsigned int pe_header; -+ unsigned int bss_sz = init_sz - file_sz; -+ -+ pe_header = get_unaligned_le32(&buf[0x3c]); -+ -+ /* Size of uninitialized data */ -+ put_unaligned_le32(bss_sz, &buf[pe_header + 0x24]); -+ -+ /* Size of image */ -+ put_unaligned_le32(init_sz, &buf[pe_header + 0x50]); -+ -+ update_pecoff_section_header_fields(".bss", file_sz, bss_sz, 0, 0); -+} -+ - static int reserve_pecoff_reloc_section(int c) - { - /* Reserve 0x20 bytes for .reloc section */ -@@ -259,6 +277,8 @@ static void efi_stub_entry_update(void) - static inline void update_pecoff_setup_and_reloc(unsigned int size) {} - static inline void update_pecoff_text(unsigned int text_start, - unsigned int file_sz) {} -+static inline void update_pecoff_bss(unsigned int file_sz, -+ unsigned int init_sz) {} - static inline void efi_stub_defaults(void) {} - static inline void efi_stub_entry_update(void) {} - -@@ -310,7 +330,7 @@ static void parse_zoffset(char *fname) - - int main(int argc, char ** argv) - { -- unsigned int i, sz, setup_sectors; -+ unsigned int i, sz, setup_sectors, init_sz; - int c; - u32 sys_size; - struct stat sb; -@@ -376,7 +396,9 @@ int main(int argc, char ** argv) - buf[0x1f1] = setup_sectors-1; - put_unaligned_le32(sys_size, &buf[0x1f4]); - -- update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); -+ update_pecoff_text(setup_sectors * 512, i + (sys_size * 16)); -+ init_sz = get_unaligned_le32(&buf[0x260]); -+ update_pecoff_bss(i + (sys_size * 16), init_sz); - - efi_stub_entry_update(); - --- -cgit v0.10.1 - diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index 7cd453be8..e0a4fea67 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 216981 2014-07-18 05:18:53Z tpowa $ +# $Id: PKGBUILD 218257 2014-07-28 19:59:38Z thomas $ # Contributor (Arch): Tobias Powalowski # Contributor (Arch): Thomas Baechler # Maintainer: André Silva @@ -11,7 +11,7 @@ pkgbase=linux-libre-pae # Build stock -libre-pae kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.15 -pkgver=${_basekernel}.6 +pkgver=${_basekernel}.7 pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" @@ -25,15 +25,13 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn # standard config files for mkinitcpio ramdisk "${pkgbase}.preset" 'boot-logo.patch' - 'change-default-console-loglevel.patch' - '0013-efistub-fix.patch') + 'change-default-console-loglevel.patch') sha256sums=('93450dc189131b6a4de862f35c5087a58cc7bae1c24caa535d2357cc3301b688' - '1966964395bd9331843c8d6dacbf661c9061e90c81bf8609d995ed458d57e358' - 'c8d3ee37d6c6fcd226ec7e76ec17a45f16d4c38051d538502f4ef362f146fe4e' + 'ffc3b2c30f38bcdaac32f2236651d1339ef4a9c2a70669938cdc1768440ce5d0' + 'c99a01117feaa7e6ef21c1ef538573ea3e873f58f68f7bd33f33a62fd4202fe7' '292d5c553f87246c8dc2d57cadfd2db92a3750173b4588d53c2919743171eca5' '8303b426b1a6dce456b2350003558ae312d21cab0ae6c1f0d7b9d21395f4e177' - 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182' - '937dc895b4f5948381775a75bd198ed2f157a9f356da0ab5a5006f9f1dacde5c') + 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182') _kernelname=${pkgbase#linux-libre} _localversionname=-libre-pae @@ -56,10 +54,6 @@ prepare() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -p1 -i "${srcdir}/change-default-console-loglevel.patch" - # fix efistub hang #33745 - # https://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git/patch/?id=c7fb93ec51d462ec3540a729ba446663c26a0505 - patch -Np1 -i "${srcdir}/0013-efistub-fix.patch" - cat "${srcdir}/config" > ./.config # simpler if [ "${_kernelname}" != "" ]; then diff --git a/kernels/linux-libre-pae/config b/kernels/linux-libre-pae/config index 32bab368a..f6802b233 100644 --- a/kernels/linux-libre-pae/config +++ b/kernels/linux-libre-pae/config @@ -463,7 +463,7 @@ CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_MMU_NOTIFIER=y CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y CONFIG_HWPOISON_INJECT=m -- cgit v1.2.3-54-g00ecf