summaryrefslogtreecommitdiff
path: root/libre/linux-libre-hardened
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-07-31 14:31:58 -0400
committerDavid P <megver83@parabola.nu>2018-07-31 14:31:58 -0400
commit839202548051b1b78c4fb7e968e4ac16096434db (patch)
treeb2de033fcb2ee5aa4499c3b9c1e231933f36c353 /libre/linux-libre-hardened
parentb460e04b992f7005e6312b442ca27fa54407fd35 (diff)
upgpkg: libre/linux-libre-hardened 4.17.11_gnu.a-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre-hardened')
-rw-r--r--libre/linux-libre-hardened/ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch53
-rw-r--r--libre/linux-libre-hardened/PKGBUILD51
2 files changed, 69 insertions, 35 deletions
diff --git a/libre/linux-libre-hardened/ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch b/libre/linux-libre-hardened/ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch
new file mode 100644
index 000000000..c6929908a
--- /dev/null
+++ b/libre/linux-libre-hardened/ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch
@@ -0,0 +1,53 @@
+From f51d7e02375963169fb1c1148ac3f96d54e97ec4 Mon Sep 17 00:00:00 2001
+From: Erik Schmauss <erik.schmauss@intel.com>
+Date: Sat, 28 Jul 2018 14:49:55 +0200
+Subject: [PATCH] ACPICA: AML Parser: ignore control method status in
+ module-level code
+
+Previous change in the AML parser code blindly set all non-successful
+dispatcher statuses to AE_OK. This approach is incorrect because
+successful control method invocations from module-level return
+AE_CTRL_TRANSFER. Overwriting AE_OK to this status causes the AML
+parser to think that there was no return value from the control
+method invocation.
+
+fixes: 73c2a01c52b6 (ACPICA: AML Parser: ignore dispatcher error status during table load)
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
+---
+ drivers/acpi/acpica/psloop.c | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
+index ee840be150b5e..44f35ab3347d1 100644
+--- a/drivers/acpi/acpica/psloop.c
++++ b/drivers/acpi/acpica/psloop.c
+@@ -709,15 +709,20 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
+ } else
+ if ((walk_state->
+ parse_flags & ACPI_PARSE_MODULE_LEVEL)
++ && status != AE_CTRL_TRANSFER
+ && ACPI_FAILURE(status)) {
+ /*
+- * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by
+- * executing it as a control method. However, if we encounter
+- * an error while loading the table, we need to keep trying to
+- * load the table rather than aborting the table load. Set the
+- * status to AE_OK to proceed with the table load. If we get a
+- * failure at this point, it means that the dispatcher got an
+- * error while processing Op (most likely an AML operand error.
++ * ACPI_PARSE_MODULE_LEVEL flag means that we are currently
++ * loading a table by executing it as a control method.
++ * However, if we encounter an error while loading the table,
++ * we need to keep trying to load the table rather than
++ * aborting the table load (setting the status to AE_OK
++ * continues the table load). If we get a failure at this
++ * point, it means that the dispatcher got an error while
++ * processing Op (most likely an AML operand error) or a
++ * control method was called from module level and the
++ * dispatcher returned AE_CTRL_TRANSFER. In the latter case,
++ * leave the status alone, there's nothing wrong with it.
+ */
+ status = AE_OK;
+ }
diff --git a/libre/linux-libre-hardened/PKGBUILD b/libre/linux-libre-hardened/PKGBUILD
index f784e3123..881878325 100644
--- a/libre/linux-libre-hardened/PKGBUILD
+++ b/libre/linux-libre-hardened/PKGBUILD
@@ -9,7 +9,7 @@
pkgbase=linux-libre-hardened
_pkgbasever=4.17-gnu
-_pkgver=4.17.9-gnu
+_pkgver=4.17.11-gnu
_hardenedver=a
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
@@ -44,6 +44,7 @@ source=(
'ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch'
'Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch'
'mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch'
+ 'ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch'
)
validpgpkeys=(
'474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
@@ -53,9 +54,9 @@ validpgpkeys=(
)
sha512sums=('a09014005d64839e958cabb20dbd50e051907b1afea2f517f41f0a9312fa1bc8447690e64ec0e6488a778be8a7384891c003f39029ff5799f9884482628aadf2'
'SKIP'
- 'a6a896ff0ecd786603d8b8e7d9470f398a4fcade69d893bb1fc7e397e93d68f9677cd329c3a0d1999bd770a4d63648ba2caacfc1f39c8674a190823a53375e4d'
+ 'a977ac21aa66b7d01ccc207f74d6213cdeed7ab0dd40c5569f97a97f42244c9db002f79d84ad6b4583d1a3b5f357f55bb12da214078c919ac2b70800b0b6ae69'
'SKIP'
- '40d81fa7c125c88b5212468b69ef151b4eb9e179abe0361527a1b8bff9f32276ac72b843410472079f02aaadbc42a005a846d1416b9af569863a691849c48cd5'
+ '25fcaf8ee67f3864a740b976dd2a5999ff7c9ea1803c58f4338f22cd9171c3bb6830bcddf5b562860b30c1eab7c2f7e18eebe3a427afe1fdef58cdc7d0f2f5a3'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -71,7 +72,8 @@ sha512sums=('a09014005d64839e958cabb20dbd50e051907b1afea2f517f41f0a9312fa1bc8447
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
'994d328326ca1e65fc4b1ea26d858e040367112881af4d2f33b953fd138fa44009f898211f84e29e1158ca61bd7080e871933dba4d7e8f084640a02110cfc920'
'cc8852b089aa24f588ad1af726503ecd1012ad7e1cbc47ea77f03a5f7aecd25306d40f2e16b8a1afeafe7e2e97b6b6840c9f462ed7be358090117e2e024df1bd'
- '662e8cc92c2034de247530a981ed24d3d85109e5d0742a9c53c6def9528c151c3177c95992b8d9d1173b64817960ac7c6cb029817fa39cce48d8199823b8271a')
+ '662e8cc92c2034de247530a981ed24d3d85109e5d0742a9c53c6def9528c151c3177c95992b8d9d1173b64817960ac7c6cb029817fa39cce48d8199823b8271a'
+ '0baf3c296acac5bd48e5221f360c59f440844066e7a39ee34eab318938ec2e93ad81d274862784a80e1c0fefc60cbb073bd6a4dbcb6884d9f602ade5c854cefc')
_kernelname=${pkgbase#linux-libre}
_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
@@ -86,24 +88,22 @@ prepare() {
patch -p1 -i ../patch-${_pkgbasever}-${_pkgver}
fi
- # linux hardened patch
- patch -Np1 -i ../linux-hardened-${_pkgver%-*}.${_hardenedver}.patch
+ # add linux hardened patch
+ patch -p1 -i ../linux-hardened-${_pkgver%-*}.${_hardenedver}.patch
# add freedo as boot logo
install -m644 -t drivers/video/logo \
../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm}
- # add latest fixes from stable queue, if needed
- # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
-
# https://bugs.archlinux.org/task/56780
- patch -Np1 -i ../ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch
+ patch -p1 -i ../ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch
# https://bugs.archlinux.org/task/56711
- patch -Np1 -i ../Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch
+ patch -p1 -i ../Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch
# Fix iwd provoking a BUG
- patch -Np1 -i ../mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch
+ patch -p1 -i ../mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch
+ patch -p1 -i ../ACPICA-AML-Parser-ignore-control-method-status-in-module-level-code.patch
# maintain the TTY over USB disconnects
# http://www.coreboot.org/EHCI_Gadget_Debug
@@ -114,32 +114,13 @@ prepare() {
# http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
patch -p1 -i ../0002-fix-Atmel-maXTouch-touchscreen-support.patch
- cat ../config.${CARCH} - >.config <<END
-CONFIG_LOCALVERSION="${_kernelname}"
-CONFIG_LOCALVERSION_AUTO=n
-END
-
# append pkgrel to extraversion and empty localversion
- sed -e "/^EXTRAVERSION = -gnu/s/-gnu.*/-gnu-${pkgrel}/" \
+ sed -e "/^EXTRAVERSION = -gnu/s/-gnu.*/-gnu.${_hardenedver}-${pkgrel}/" \
-e "/^EXTRAVERSION =/aLOCALVERSION =" \
-i Makefile
- # don't run depmod on 'make install'. We'll do this ourselves in packaging
- sed -i '2iexit 0' scripts/depmod.sh
-
- # get kernel version
- make prepare
-
- # load configuration
- # Configure the kernel. Replace the line below with one of your choice.
- #make menuconfig # CLI menu for configuration
- #make nconfig # new CLI menu for configuration
- #make xconfig # X-based configuration
- #make oldconfig # using old config from previous kernel version
- # ... or manually edit .config
-
- # rewrite configuration
- yes "" | make config >/dev/null
+ cp ../config.x86_64 .config
+ make olddefconfig
}
build() {
@@ -168,7 +149,7 @@ _package() {
_basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
- make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
+ make INSTALL_MOD_PATH="${pkgdir}/usr" DEPMOD=/doesnt/exist modules_install
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
# make room for external modules