summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--0012-fix-saa7134.patch37
-rw-r--r--0013-efistub-fix.patch177
-rw-r--r--PKGBUILD15
-rw-r--r--linux-selinux.install2
5 files changed, 190 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c34a34789caa..e55709deb3c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-selinux
- pkgver = 3.15.1
+ pkgver = 3.15.5
pkgrel = 1
url = http://www.kernel.org/
arch = i686
@@ -13,19 +13,19 @@ pkgbase = linux-selinux
makedepends = bc
options = !strip
source = https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.15.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v3.x/patch-3.15.1.xz
+ source = https://www.kernel.org/pub/linux/kernel/v3.x/patch-3.15.5.xz
source = config
source = config.x86_64
source = linux-selinux.preset
source = change-default-console-loglevel.patch
- source = 0012-fix-saa7134.patch
+ source = 0013-efistub-fix.patch
sha256sums = c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794
- sha256sums = 36590c1a522375cd1bf90bd013bf8b600e08680ac4e6c94926f4fa7c8f65328f
+ sha256sums = 9b0d000e0bdec7a25ee6303afdab8d2af77439995876eadd6ce248e5c954037d
sha256sums = 2ccda045312149bbb19ad6ebd3d4d5cf97f43a4eff30038d2c4f67fa57eee442
sha256sums = e40b95e6c41031cdb2da4ae77dc5f4bc8cc06407263d004ee49fef2e80909a21
sha256sums = 375da3b030f17581cbf5be9140b79029ca85eebc70197f419a4de77e00fa84e9
sha256sums = faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182
- sha256sums = 79359454c9d8446eb55add2b1cdbf8332bd67dafb01fefb5b1ca090225f64d18
+ sha256sums = 937dc895b4f5948381775a75bd198ed2f157a9f356da0ab5a5006f9f1dacde5c
pkgname = linux-selinux
diff --git a/0012-fix-saa7134.patch b/0012-fix-saa7134.patch
deleted file mode 100644
index 070fbc8ebd16..000000000000
--- a/0012-fix-saa7134.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/drivers/media/pci/saa7134/saa7134-video.c
-+++ a/drivers/media/pci/saa7134/saa7134-video.c
-@@ -1243,6 +1243,7 @@ static int video_release(struct file *file)
- videobuf_streamoff(&dev->cap);
- res_free(dev, fh, RESOURCE_VIDEO);
- videobuf_mmap_free(&dev->cap);
-+ INIT_LIST_HEAD(&dev->cap.stream);
- }
- if (dev->cap.read_buf) {
- buffer_release(&dev->cap, dev->cap.read_buf);
-@@ -1254,6 +1255,7 @@ static int video_release(struct file *file)
- videobuf_stop(&dev->vbi);
- res_free(dev, fh, RESOURCE_VBI);
- videobuf_mmap_free(&dev->vbi);
-+ INIT_LIST_HEAD(&dev->vbi.stream);
- }
-
- /* ts-capture will not work in planar mode, so turn it off Hac: 04.05*/
-@@ -1987,17 +1989,12 @@ int saa7134_streamoff(struct file *file, void *priv,
- enum v4l2_buf_type type)
- {
- struct saa7134_dev *dev = video_drvdata(file);
-- int err;
- int res = saa7134_resource(file);
-
- if (res != RESOURCE_EMPRESS)
- pm_qos_remove_request(&dev->qos_request);
-
-- err = videobuf_streamoff(saa7134_queue(file));
-- if (err < 0)
-- return err;
-- res_free(dev, priv, res);
-- return 0;
-+ return videobuf_streamoff(saa7134_queue(file));
- }
- EXPORT_SYMBOL_GPL(saa7134_streamoff);
-
diff --git a/0013-efistub-fix.patch b/0013-efistub-fix.patch
new file mode 100644
index 000000000000..a2da3b63a598
--- /dev/null
+++ b/0013-efistub-fix.patch
@@ -0,0 +1,177 @@
+From c7fb93ec51d462ec3540a729ba446663c26a0505 Mon Sep 17 00:00:00 2001
+From: Michael Brown <mbrown@fensystems.co.uk>
+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 <mbrown@fensystems.co.uk>
+Cc: Thomas Bächler <thomas@archlinux.org>
+Cc: Josh Boyer <jwboyer@fedoraproject.org>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+
+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/PKGBUILD b/PKGBUILD
index 7bd1755292ca..fda9b1913861 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgbase=linux-selinux # Build stock -ARCH kernel
#pkgbase=linux-custom # Build kernel with a different name
_srcname=linux-3.15
-pkgver=3.15.1
+pkgver=3.15.5
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
@@ -21,15 +21,15 @@ source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
# standard config files for mkinitcpio ramdisk
'linux-selinux.preset'
'change-default-console-loglevel.patch'
- '0012-fix-saa7134.patch'
+ '0013-efistub-fix.patch'
)
sha256sums=('c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794'
- '36590c1a522375cd1bf90bd013bf8b600e08680ac4e6c94926f4fa7c8f65328f'
+ '9b0d000e0bdec7a25ee6303afdab8d2af77439995876eadd6ce248e5c954037d'
'2ccda045312149bbb19ad6ebd3d4d5cf97f43a4eff30038d2c4f67fa57eee442'
'e40b95e6c41031cdb2da4ae77dc5f4bc8cc06407263d004ee49fef2e80909a21'
'375da3b030f17581cbf5be9140b79029ca85eebc70197f419a4de77e00fa84e9'
'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182'
- '79359454c9d8446eb55add2b1cdbf8332bd67dafb01fefb5b1ca090225f64d18')
+ '937dc895b4f5948381775a75bd198ed2f157a9f356da0ab5a5006f9f1dacde5c')
_kernelname=${pkgbase#linux}
@@ -47,10 +47,9 @@ prepare() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
- # fix saa7134 video
- # https://bugs.archlinux.org/task/39904
- # https://bugzilla.kernel.org/show_bug.cgi?id=73361
- patch -Np1 -i "${srcdir}/0012-fix-saa7134.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"
if [ "${CARCH}" = "x86_64" ]; then
cat "${srcdir}/config.x86_64" > ./.config
diff --git a/linux-selinux.install b/linux-selinux.install
index 772860fecb0a..71ec1b9ca6bb 100644
--- a/linux-selinux.install
+++ b/linux-selinux.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-selinux
-KERNEL_VERSION=3.15.1-1-selinux
+KERNEL_VERSION=3.15.5-1-selinux
post_install () {
# updating module dependencies