summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuperBo2016-12-16 19:38:53 +0700
committerSuperBo2016-12-16 19:38:53 +0700
commit0f8deaa58c439705ba3891d171e672b1e589fe90 (patch)
tree83719fc34a794c9ea067bd37d408efe6e3d3abc1
parent130f0e2da79c8c8a5f2a546342775a7aaa37bddb (diff)
downloadaur-0f8deaa58c439705ba3891d171e672b1e589fe90.tar.gz
Update to 4.4.38
-rw-r--r--.SRCINFO20
-rw-r--r--0003-surface-cover.patch3
-rw-r--r--0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch42
-rw-r--r--0006-HID-multitouch-Ignore-invalid-reports.patch38
-rw-r--r--99-linux.hook11
-rw-r--r--PKGBUILD31
-rw-r--r--fix_race_condition_in_packet_set_ring.diff84
7 files changed, 124 insertions, 105 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21d0a58ce51..245add2d5ca 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-lts-surface4
- pkgver = 4.4.36
+ pkgver = 4.4.38
pkgrel = 1
- url = http://www.kernel.org/
+ url = https://www.kernel.org/
arch = i686
arch = x86_64
license = GPL2
@@ -13,32 +13,36 @@ pkgbase = linux-lts-surface4
options = !strip
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.sign
- source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.4.36.xz
- source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.4.36.sign
+ source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.4.38.xz
+ source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.4.38.sign
source = config
source = config.x86_64
+ source = 99-linux.hook
source = linux-lts.preset
source = change-default-console-loglevel.patch
- source = fix_race_condition_in_packet_set_ring.diff
source = 0001-sdhci-revert.patch
source = 0002-surface-wifi.patch
source = 0003-surface-cover.patch
source = 0004-surface-pro4-button.patch
+ source = 0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch
+ source = 0006-HID-multitouch-Ignore-invalid-reports.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2
sha256sums = SKIP
- sha256sums = 468ddfe3f29c314b40e32410c796fda9277620d50bc47b50fafc8a5a4c375e61
+ sha256sums = 48ec169c7adda820973b3cb9c4c91c72bb69c86f530d149065491a20ef0c4057
sha256sums = SKIP
sha256sums = e8d200b125b4391020c2bc1f43bf8f3a372f0bbdaf9bad71b31574edab7f908f
sha256sums = 236fc805c543cb774785f630bf37c7fdc2ff7c9904bb240ff70e0b7213058de5
+ sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0
sha256sums = 9e9e7ee3476e55e68390eda7e983fa18d44e76db5521f023fd2b388b1150bc40
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
- sha256sums = ad1ee95f906f88d31fcdb9273cd08e02e8eda177449f0c98dc1bff8cbf1483c2
sha256sums = 5313df7cb5b4d005422bd4cd0dae956b2dadba8f3db904275aaf99ac53894375
sha256sums = c59a18d38d75fec7e9cc3b4efb6a997b3714c3156f6f80a6915bd16db409cde9
- sha256sums = 26ed3893c370952f8310a0b2bdecdabf5e3185ad8e9100f1e2ef5260fdf52c84
+ sha256sums = 243be112ad418060b7c94361f6664e17cf17a854b77dc65a3e53b16881b4785f
sha256sums = 1a34eae36a3f686f1bc158d7d13564f009e30b8866c919d7fe14590e872f095d
+ sha256sums = 47a80bb6e1f113ccf2b3eff0b277a398b84b54f2100ddf42e31b94ea04654f49
+ sha256sums = a9ce07b6533d86c3ffae8d5240d9c58b18778d0c5fed8ed97bde98ae43c4df71
pkgname = linux-lts-surface4
pkgdesc = The Linux-lts-surface4 kernel and modules for Microsoft Surface Pro 4
diff --git a/0003-surface-cover.patch b/0003-surface-cover.patch
index 2d4e5bafd85..7117c2416db 100644
--- a/0003-surface-cover.patch
+++ b/0003-surface-cover.patch
@@ -107,12 +107,13 @@ diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index dc8e6ad..cfcd027 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
-@@ -93,6 +93,8 @@ static const struct hid_blacklist {
+@@ -94,6 +94,9 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
+ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4, HID_QUIRK_NO_INIT_REPORTS },
+ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1, HID_QUIRK_NO_INIT_REPORTS },
++ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_BOOK, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS },
diff --git a/0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch b/0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch
new file mode 100644
index 00000000000..64d6725b888
--- /dev/null
+++ b/0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch
@@ -0,0 +1,42 @@
+From 909b254eb818f63ba0e541abbbe829d923c19234 Mon Sep 17 00:00:00 2001
+From: Daniel Martin <consume.noise@gmail.com>
+Date: Fri, 2 Oct 2015 10:07:15 +0200
+Subject: [PATCH 2/4] HID: multitouch: Add MT_QUIRK_NOT_SEEN_MEANS_UP to
+ MT_CLS_WIN_8
+
+The firmware found in the touch screen of an SP3 is buggy and may miss
+to send lift off reports for contacts. Try to work around that issue by
+using MT_QUIRK_NOT_SEEN_MEANS_UP.
+
+Signed-off-by: Daniel Martin <consume.noise@gmail.com>
+---
+ drivers/hid/hid-multitouch.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 1cc1108..625f1ee 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -206,7 +206,8 @@ static struct mt_class mt_classes[] = {
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+ MT_QUIRK_IGNORE_DUPLICATES |
+ MT_QUIRK_HOVERING |
+- MT_QUIRK_CONTACT_CNT_ACCURATE },
++ MT_QUIRK_CONTACT_CNT_ACCURATE |
++ MT_QUIRK_NOT_SEEN_MEANS_UP },
+ { .name = MT_CLS_EXPORT_ALL_INPUTS,
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+ MT_QUIRK_CONTACT_CNT_ACCURATE,
+@@ -1054,7 +1055,8 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
+ return -ENOMEM;
+ }
+
+- if (id->vendor == HID_ANY_ID && id->product == HID_ANY_ID)
++ if (id->vendor == HID_ANY_ID && id->product == HID_ANY_ID &&
++ id->group != HID_GROUP_MULTITOUCH_WIN_8)
+ td->serial_maybe = true;
+
+ ret = hid_parse(hdev);
+--
+2.1.4
+
diff --git a/0006-HID-multitouch-Ignore-invalid-reports.patch b/0006-HID-multitouch-Ignore-invalid-reports.patch
new file mode 100644
index 00000000000..ec15011020c
--- /dev/null
+++ b/0006-HID-multitouch-Ignore-invalid-reports.patch
@@ -0,0 +1,38 @@
+From a84d692a5e0f894d7e9c81208197423d023f50d9 Mon Sep 17 00:00:00 2001
+From: Daniel Martin <consume.noise@gmail.com>
+Date: Fri, 2 Oct 2015 10:05:29 +0200
+Subject: [PATCH 1/4] HID: multitouch: Ignore invalid reports
+
+Drop reports with invalid values.
+
+Signed-off-by: Daniel Martin <consume.noise@gmail.com>
+---
+ drivers/hid/hid-multitouch.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 7c81125..1cc1108 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -559,6 +559,10 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
+ td->num_received >= td->num_expected)
+ return;
+
++ if (td->curdata.x == 0xffff && td->curdata.x == td->curdata.y &&
++ td->curdata.w == 0xffff && td->curdata.w == td->curdata.h)
++ goto inc_num_received;
++
+ if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) {
+ int slotnum = mt_compute_slot(td, input);
+ struct mt_slot *s = &td->curdata;
+@@ -597,6 +601,7 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
+ }
+ }
+
++inc_num_received:
+ td->num_received++;
+ }
+
+--
+2.1.4
+
diff --git a/99-linux.hook b/99-linux.hook
new file mode 100644
index 00000000000..9851151995b
--- /dev/null
+++ b/99-linux.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = boot/vmlinuz-%PKGBASE%
+Target = usr/lib/initcpio/*
+
+[Action]
+Description = Updating %PKGBASE% initcpios
+When = PostTransaction
+Exec = /usr/bin/mkinitcpio -p %PKGBASE%
diff --git a/PKGBUILD b/PKGBUILD
index 690b60a5c9b..2cb11447969 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,10 +4,10 @@
#pkgbase=linux-lts
pkgbase=linux-lts-surface4
_srcname=linux-4.4
-pkgver=4.4.36
+pkgver=4.4.38
pkgrel=1
arch=('i686' 'x86_64')
-url="http://www.kernel.org/"
+url="https://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
options=('!strip')
@@ -15,28 +15,33 @@ source=(https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
# the main kernel config files
'config' 'config.x86_64'
+ # pacman hook for initramfs regeneration
+ '99-linux.hook'
# standard config files for mkinitcpio ramdisk
linux-lts.preset
change-default-console-loglevel.patch
- fix_race_condition_in_packet_set_ring.diff
0001-sdhci-revert.patch
0002-surface-wifi.patch
0003-surface-cover.patch
- 0004-surface-pro4-button.patch)
+ 0004-surface-pro4-button.patch
+ 0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch
+ 0006-HID-multitouch-Ignore-invalid-reports.patch)
# https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
sha256sums=('401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2'
'SKIP'
- '468ddfe3f29c314b40e32410c796fda9277620d50bc47b50fafc8a5a4c375e61'
+ '48ec169c7adda820973b3cb9c4c91c72bb69c86f530d149065491a20ef0c4057'
'SKIP'
'e8d200b125b4391020c2bc1f43bf8f3a372f0bbdaf9bad71b31574edab7f908f'
'236fc805c543cb774785f630bf37c7fdc2ff7c9904bb240ff70e0b7213058de5'
+ '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
'9e9e7ee3476e55e68390eda7e983fa18d44e76db5521f023fd2b388b1150bc40'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
- 'ad1ee95f906f88d31fcdb9273cd08e02e8eda177449f0c98dc1bff8cbf1483c2'
'5313df7cb5b4d005422bd4cd0dae956b2dadba8f3db904275aaf99ac53894375'
'c59a18d38d75fec7e9cc3b4efb6a997b3714c3156f6f80a6915bd16db409cde9'
- '26ed3893c370952f8310a0b2bdecdabf5e3185ad8e9100f1e2ef5260fdf52c84'
- '1a34eae36a3f686f1bc158d7d13564f009e30b8866c919d7fe14590e872f095d')
+ '243be112ad418060b7c94361f6664e17cf17a854b77dc65a3e53b16881b4785f'
+ '1a34eae36a3f686f1bc158d7d13564f009e30b8866c919d7fe14590e872f095d'
+ '47a80bb6e1f113ccf2b3eff0b277a398b84b54f2100ddf42e31b94ea04654f49'
+ 'a9ce07b6533d86c3ffae8d5240d9c58b18778d0c5fed8ed97bde98ae43c4df71')
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org>
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>
)
@@ -48,10 +53,6 @@ prepare() {
# add upstream patch
patch -p1 -i "${srcdir}/patch-${pkgver}"
- # fix a race condition that allows to gain root
- # https://marc.info/?l=linux-netdev&m=148054660230570&w=2
- patch -p1 -i "${srcdir}/fix_race_condition_in_packet_set_ring.diff"
-
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
@@ -64,6 +65,8 @@ prepare() {
patch -p1 -i "${srcdir}/0002-surface-wifi.patch"
patch -p1 -i "${srcdir}/0003-surface-cover.patch"
patch -p1 -i "${srcdir}/0004-surface-pro4-button.patch"
+ patch -p1 -i "${srcdir}/0005-HID-multitouch-Add-MT_QUIRK_NOT_SEEN_MEANS_UP.patch"
+ patch -p1 -i "${srcdir}/0006-HID-multitouch-Ignore-invalid-reports.patch"
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
@@ -146,6 +149,10 @@ _package() {
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+ # install pacman hook for initramfs regeneration
+ sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" |
+ install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
+
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
diff --git a/fix_race_condition_in_packet_set_ring.diff b/fix_race_condition_in_packet_set_ring.diff
deleted file mode 100644
index 12048f611d1..00000000000
--- a/fix_race_condition_in_packet_set_ring.diff
+++ /dev/null
@@ -1,84 +0,0 @@
-From: Philip Pettersson <philip.pettersson@gmail.com>
-
-When packet_set_ring creates a ring buffer it will initialize a
-struct timer_list if the packet version is TPACKET_V3. This value
-can then be raced by a different thread calling setsockopt to
-set the version to TPACKET_V1 before packet_set_ring has finished.
-
-This leads to a use-after-free on a function pointer in the
-struct timer_list when the socket is closed as the previously
-initialized timer will not be deleted.
-
-The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
-changing the packet version while also taking the lock at the start
-of packet_set_ring.
-
-Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
-Signed-off-by: Philip Pettersson <philip.pettersson@gmail.com>
-Signed-off-by: Eric Dumazet <edumazet@google.com>
----
- net/packet/af_packet.c | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
-index d2238b204691b8e4f2e3acb9bc167b553ba32d50..dd2332390c45bbff7c3fc5d259453f2e1ca352bf 100644
---- a/net/packet/af_packet.c
-+++ b/net/packet/af_packet.c
-@@ -3648,19 +3648,25 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
-
- if (optlen != sizeof(val))
- return -EINVAL;
-- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
-- return -EBUSY;
- if (copy_from_user(&val, optval, sizeof(val)))
- return -EFAULT;
- switch (val) {
- case TPACKET_V1:
- case TPACKET_V2:
- case TPACKET_V3:
-- po->tp_version = val;
-- return 0;
-+ break;
- default:
- return -EINVAL;
- }
-+ lock_sock(sk);
-+ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
-+ ret = -EBUSY;
-+ } else {
-+ po->tp_version = val;
-+ ret = 0;
-+ }
-+ release_sock(sk);
-+ return ret;
- }
- case PACKET_RESERVE:
- {
-@@ -4164,6 +4170,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
- /* Added to avoid minimal code churn */
- struct tpacket_req *req = &req_u->req;
-
-+ lock_sock(sk);
- /* Opening a Tx-ring is NOT supported in TPACKET_V3 */
- if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
- net_warn_ratelimited("Tx-ring is not supported.\n");
-@@ -4245,7 +4252,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
- goto out;
- }
-
-- lock_sock(sk);
-
- /* Detach socket from network */
- spin_lock(&po->bind_lock);
-@@ -4294,11 +4300,11 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
- if (!tx_ring)
- prb_shutdown_retire_blk_timer(po, rb_queue);
- }
-- release_sock(sk);
-
- if (pg_vec)
- free_pg_vec(pg_vec, order, req->tp_block_nr);
- out:
-+ release_sock(sk);
- return err;
- }