summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-10-18 11:36:13 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-10-18 11:36:13 -0700
commit9651c1ac1c7a7010d8ffa0812717bb5338fd737d (patch)
tree5c6ea696427dc7242a903fd77d44f6f12ce5568d
parentUpdated to 5.3.5 (diff)
downloadlinux-libre-9651c1ac1c7a7010d8ffa0812717bb5338fd737d.tar.xz
Updated to 5.3.7
-rw-r--r--0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch62
-rw-r--r--60-linux.hook1
-rw-r--r--PKGBUILD35
3 files changed, 77 insertions, 21 deletions
diff --git a/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch b/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
new file mode 100644
index 0000000..f2bceca
--- /dev/null
+++ b/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
@@ -0,0 +1,62 @@
+From 0bee55974a73eed4a9b9c9e87000df34117e7f69 Mon Sep 17 00:00:00 2001
+From: Dan Elkouby <streetwalkermc@gmail.com>
+Date: Fri, 6 Sep 2019 14:06:44 +0300
+Subject: Bluetooth: hidp: Fix assumptions on the return value of
+ hidp_send_message
+
+hidp_send_message was changed to return non-zero values on success,
+which some other bits did not expect. This caused spurious errors to be
+propagated through the stack, breaking some drivers, such as hid-sony
+for the Dualshock 4 in Bluetooth mode.
+
+As pointed out by Dan Carpenter, hid-microsoft directly relied on that
+assumption as well.
+
+Fixes: 48d9cc9d85dd ("Bluetooth: hidp: Let hidp_send_message return number of queued bytes")
+
+Signed-off-by: Dan Elkouby <streetwalkermc@gmail.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
+Reviewed-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+---
+ drivers/hid/hid-microsoft.c | 2 +-
+ net/bluetooth/hidp/core.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
+index 8b3a922bdad3..2cf83856f2e4 100644
+--- a/drivers/hid/hid-microsoft.c
++++ b/drivers/hid/hid-microsoft.c
+@@ -303,7 +303,7 @@ static void ms_ff_worker(struct work_struct *work)
+ r->magnitude[MAGNITUDE_WEAK] = ms->weak; /* right actuator */
+
+ ret = hid_hw_output_report(hdev, (__u8 *)r, sizeof(*r));
+- if (ret)
++ if (ret < 0)
+ hid_warn(hdev, "failed to send FF report\n");
+ }
+
+diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
+index 8d889969ae7e..bef84b95e2c4 100644
+--- a/net/bluetooth/hidp/core.c
++++ b/net/bluetooth/hidp/core.c
+@@ -267,7 +267,7 @@ static int hidp_get_raw_report(struct hid_device *hid,
+ set_bit(HIDP_WAITING_FOR_RETURN, &session->flags);
+ data[0] = report_number;
+ ret = hidp_send_ctrl_message(session, report_type, data, 1);
+- if (ret)
++ if (ret < 0)
+ goto err;
+
+ /* Wait for the return of the report. The returned report
+@@ -343,7 +343,7 @@ static int hidp_set_raw_report(struct hid_device *hid, unsigned char reportnum,
+ data[0] = reportnum;
+ set_bit(HIDP_WAITING_FOR_SEND_ACK, &session->flags);
+ ret = hidp_send_ctrl_message(session, report_type, data, count);
+- if (ret)
++ if (ret < 0)
+ goto err;
+
+ /* Wait for the ACK from the device. */
+--
+cgit v1.2.1-1-g437b
diff --git a/60-linux.hook b/60-linux.hook
index b33873c..584ce35 100644
--- a/60-linux.hook
+++ b/60-linux.hook
@@ -4,7 +4,6 @@ Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/modules/%KERNVER%/*
-Target = usr/lib/modules/%EXTRAMODULES%/*
[Action]
Description = Updating %PKGBASE% module dependencies...
diff --git a/PKGBUILD b/PKGBUILD
index b38a304..e356691 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@
pkgbase=linux-libre
_majver=5.3
-_minver=5
+_minver=7
if [ "$_minver" == "0" ]; then
pkgver=${_majver}
else
@@ -36,6 +36,7 @@ source=(
https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign}
https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.xz{,.sign}
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
+ 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
graysky_bdver2-hotfix.patch
kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz
ath9k-regdom-hack.patch
@@ -47,15 +48,16 @@ source=(
)
sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f'
'SKIP'
- '52ac436a6638c03b7d9b864fc765ddab471171ced994243b759b3c8017a11dee9ebf97a827baf10b6371d9055d01e50a8a952dabb76d294a76efe153eb14ac86'
+ '22064d7cf6da426eff98b3fd72a52e6dc1349f1c5f53755041b487335fa8ff61fc1083440af38ef631056301d30d827c5c203566d1f720b9a65505e9c2cd3ee8'
'SKIP'
'4c9105b3ab7999e5f3c51fb1e14221b141fbbe5d42fe1109793376ece557c66a3274bcd639dcb3ffb1ddfffed8019e35aa18b2299a8610edb2394791cafe006a'
+ 'bb7ddbbb15beb1a2e677e77a99602082fae450ef08aa7b48a644018c41760c9e2ba69a4a962660196e1f607cbd436bb4c33961b5aaaf72d4861f65dbd3b0e712'
'1d5d8f6c0afff47deac8ab5f5bd8c0f1633c968bcd1f8022719bd0e3ec8c31b89658f15faaa1decbfb61d88af14fa8eec5886dc21c65e1975362dfd8f3939858'
'44b44ef4a7a89c3d57548b41e2152dc5e977a582a8b77dfe7595dd94696890144fa0967cb0fbc4426fff32b616064f3143cf25302cf7af93207b74cb4ac914b6'
'905beb3f47cccb161e1ee74f8d5ba324b7c2f72e86246d941dfb18c85ace9d32df1966b52d2be2e3ff1ebea74af3b868422aec5a3eebc29858ee9e7207dea226'
'd6bec327f4f2c69f2fc2780d90cd5d057bc5e32b39e54a13fccb1f5a880a148fa322e54c372e38d3f453d06fd9ab54d653265f355bd61e08a416058bd4224167'
'85068505b2517b32dbc5a2d118f0b018f9d58385db9f3645b6297d04784e35c6e27b3530ec323a4ebf2c160387d74cff44434d34de154a29b673e6c6a24fa38f'
- '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
+ '6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1'
'4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf')
validpgpkeys=(
@@ -77,6 +79,7 @@ prepare() {
# Hotfixes
msg2 "Applying hotfixes"
patch -p1 -i ../0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
+ patch -p1 -i ../0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
# graysky gcc hotfixes
@@ -121,7 +124,7 @@ prepare() {
sed -i '/SUBLEVEL = 0/d' Makefile
fi
- make -s kernelrelease > ../version
+ make -s kernelrelease > version
# workaround for make -s kernelrelease not applying
# localversion to version when changed using menuconfig
@@ -130,13 +133,13 @@ prepare() {
cat "localversion.10-pkgrel" >> ../version.temp
cat "localversion.20-pkgname" >> ../version.temp
cat ../localversion >> ../version.temp
- cat ../version.temp | tr -d "\n" > ../version
+ cat ../version.temp | tr -d "\n" > version
# back up the config
# msg2 "Backing up config..."
# cp .config ${SRCDEST}/config.libre.previous
- msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
+ msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
}
build() {
@@ -152,11 +155,11 @@ _package() {
backup=("etc/mkinitcpio.d/$pkgbase.preset")
install=linux.install
+ cd $_srcname
+
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
- cd $_srcname
-
msg2 "Installing boot image..."
install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-$pkgbase"
@@ -167,13 +170,6 @@ _package() {
mkdir -p "$modulesdir"
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
- # a place for external modules,
- # with version file for building modules and running depmod from hook
- local extramodules="extramodules$_kernelname"
- local extradir="$pkgdir/usr/lib/modules/$extramodules"
- install -Dt "$extradir" -m644 ../version
- ln -sr "$extradir" "$modulesdir/extramodules"
-
# remove build and source links
rm "$modulesdir"/{source,build}
@@ -182,7 +178,6 @@ _package() {
local subst="
s|%PKGBASE%|$pkgbase|g
s|%KERNVER%|$kernver|g
- s|%EXTRAMODULES%|$extramodules|g
"
# hack to allow specifying an initially nonexisting install file
@@ -204,12 +199,12 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
cd $_srcname
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
+
msg2 "Installing build files..."
- install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux
+ install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
@@ -275,7 +270,7 @@ _package-headers() {
msg2 "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver"
+ ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"