]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2019 10:51:46 +0000 (12:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2019 10:51:46 +0000 (12:51 +0200)
added patches:
drivers-base-cacheinfo-ensure-cpu-hotplug-work-is-done-before-intel-rdt.patch
firmware-improve-lsm-ima-security-behaviour.patch
input-synaptics-enable-smbus-on-t480-thinkpad-trackpad.patch
nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch

queue-5.2/drivers-base-cacheinfo-ensure-cpu-hotplug-work-is-done-before-intel-rdt.patch [new file with mode: 0644]
queue-5.2/firmware-improve-lsm-ima-security-behaviour.patch [new file with mode: 0644]
queue-5.2/input-synaptics-enable-smbus-on-t480-thinkpad-trackpad.patch [new file with mode: 0644]
queue-5.2/nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch [new file with mode: 0644]
queue-5.2/series

diff --git a/queue-5.2/drivers-base-cacheinfo-ensure-cpu-hotplug-work-is-done-before-intel-rdt.patch b/queue-5.2/drivers-base-cacheinfo-ensure-cpu-hotplug-work-is-done-before-intel-rdt.patch
new file mode 100644 (file)
index 0000000..78aefd3
--- /dev/null
@@ -0,0 +1,60 @@
+From 83b44fe343b5abfcb1b2261289bd0cfcfcfd60a8 Mon Sep 17 00:00:00 2001
+From: James Morse <james.morse@arm.com>
+Date: Mon, 24 Jun 2019 18:36:56 +0100
+Subject: drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
+
+From: James Morse <james.morse@arm.com>
+
+commit 83b44fe343b5abfcb1b2261289bd0cfcfcfd60a8 upstream.
+
+The cacheinfo structures are alloced/freed by cpu online/offline
+callbacks. Originally these were only used by sysfs to expose the
+cache topology to user space. Without any in-kernel dependencies
+CPUHP_AP_ONLINE_DYN was an appropriate choice.
+
+resctrl has started using these structures to identify CPUs that
+share a cache. It updates its 'domain' structures from cpu
+online/offline callbacks. These depend on the cacheinfo structures
+(resctrl_online_cpu()->domain_add_cpu()->get_cache_id()->
+ get_cpu_cacheinfo()).
+These also run as CPUHP_AP_ONLINE_DYN.
+
+Now that there is an in-kernel dependency, move the cacheinfo
+work earlier so we know its done before resctrl's CPUHP_AP_ONLINE_DYN
+work runs.
+
+Fixes: 2264d9c74dda1 ("x86/intel_rdt: Build structures for each resource based on cache topology")
+Cc: <stable@vger.kernel.org>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Cc: Reinette Chatre <reinette.chatre@intel.com>
+Signed-off-by: James Morse <james.morse@arm.com>
+Link: https://lore.kernel.org/r/20190624173656.202407-1-james.morse@arm.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/cacheinfo.c   |    3 ++-
+ include/linux/cpuhotplug.h |    1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/base/cacheinfo.c
++++ b/drivers/base/cacheinfo.c
+@@ -655,7 +655,8 @@ static int cacheinfo_cpu_pre_down(unsign
+ static int __init cacheinfo_sysfs_init(void)
+ {
+-      return cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "base/cacheinfo:online",
++      return cpuhp_setup_state(CPUHP_AP_BASE_CACHEINFO_ONLINE,
++                               "base/cacheinfo:online",
+                                cacheinfo_cpu_online, cacheinfo_cpu_pre_down);
+ }
+ device_initcall(cacheinfo_sysfs_init);
+--- a/include/linux/cpuhotplug.h
++++ b/include/linux/cpuhotplug.h
+@@ -176,6 +176,7 @@ enum cpuhp_state {
+       CPUHP_AP_WATCHDOG_ONLINE,
+       CPUHP_AP_WORKQUEUE_ONLINE,
+       CPUHP_AP_RCUTREE_ONLINE,
++      CPUHP_AP_BASE_CACHEINFO_ONLINE,
+       CPUHP_AP_ONLINE_DYN,
+       CPUHP_AP_ONLINE_DYN_END         = CPUHP_AP_ONLINE_DYN + 30,
+       CPUHP_AP_X86_HPET_ONLINE,
diff --git a/queue-5.2/firmware-improve-lsm-ima-security-behaviour.patch b/queue-5.2/firmware-improve-lsm-ima-security-behaviour.patch
new file mode 100644 (file)
index 0000000..f30290d
--- /dev/null
@@ -0,0 +1,44 @@
+From 2472d64af2d3561954e2f05365a67692bb852f2a Mon Sep 17 00:00:00 2001
+From: Sven Van Asbroeck <thesven73@gmail.com>
+Date: Mon, 17 Jun 2019 14:23:54 -0400
+Subject: firmware: improve LSM/IMA security behaviour
+
+From: Sven Van Asbroeck <thesven73@gmail.com>
+
+commit 2472d64af2d3561954e2f05365a67692bb852f2a upstream.
+
+The firmware loader queries if LSM/IMA permits it to load firmware
+via the sysfs fallback. Unfortunately, the code does the opposite:
+it expressly permits sysfs fw loading if security_kernel_load_data(
+LOADING_FIRMWARE) returns -EACCES. This happens because a
+zero-on-success return value is cast to a bool that's true on success.
+
+Fix the return value handling so we get the correct behaviour.
+
+Fixes: 6e852651f28e ("firmware: add call to LSM hook before firmware sysfs fallback")
+Cc: Stable <stable@vger.kernel.org>
+Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
+Cc: Kees Cook <keescook@chromium.org>
+To: Luis Chamberlain <mcgrof@kernel.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: "Rafael J. Wysocki" <rafael@kernel.org>
+Cc: linux-kernel@vger.kernel.org
+Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
+Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/firmware_loader/fallback.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/firmware_loader/fallback.c
++++ b/drivers/base/firmware_loader/fallback.c
+@@ -659,7 +659,7 @@ static bool fw_run_sysfs_fallback(enum f
+       /* Also permit LSMs and IMA to fail firmware sysfs fallback */
+       ret = security_kernel_load_data(LOADING_FIRMWARE);
+       if (ret < 0)
+-              return ret;
++              return false;
+       return fw_force_sysfs_fallback(opt_flags);
+ }
diff --git a/queue-5.2/input-synaptics-enable-smbus-on-t480-thinkpad-trackpad.patch b/queue-5.2/input-synaptics-enable-smbus-on-t480-thinkpad-trackpad.patch
new file mode 100644 (file)
index 0000000..b5fd3a4
--- /dev/null
@@ -0,0 +1,36 @@
+From abbe3acd7d72ab4633ade6bd24e8306b67e0add3 Mon Sep 17 00:00:00 2001
+From: Cole Rogers <colerogers@disroot.org>
+Date: Mon, 1 Jul 2019 00:47:48 -0700
+Subject: Input: synaptics - enable SMBUS on T480 thinkpad trackpad
+
+From: Cole Rogers <colerogers@disroot.org>
+
+commit abbe3acd7d72ab4633ade6bd24e8306b67e0add3 upstream.
+
+Thinkpad t480 laptops had some touchpad features disabled, resulting in the
+loss of pinch to activities in GNOME, on wayland, and other touch gestures
+being slower. This patch adds the touchpad of the t480 to the smbus_pnp_ids
+whitelist to enable the extra features. In my testing this does not break
+suspend (on fedora, with wayland, and GNOME, using the rc-6 kernel), while
+also fixing the feature on a T480.
+
+Signed-off-by: Cole Rogers <colerogers@disroot.org>
+Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/synaptics.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[
+       "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
+       "LEN0073", /* X1 Carbon G5 (Elantech) */
+       "LEN0092", /* X1 Carbon 6 */
++      "LEN0093", /* T480 */
+       "LEN0096", /* X280 */
+       "LEN0097", /* X280 -> ALPS trackpoint */
+       "LEN200f", /* T450s */
diff --git a/queue-5.2/nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch b/queue-5.2/nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch
new file mode 100644 (file)
index 0000000..aaabf30
--- /dev/null
@@ -0,0 +1,129 @@
+From c32cc30c0544f13982ee0185d55f4910319b1a79 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Thu, 11 Jul 2019 20:52:18 -0700
+Subject: nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit c32cc30c0544f13982ee0185d55f4910319b1a79 upstream.
+
+cpu_to_le32/le32_to_cpu is defined in include/linux/byteorder/generic.h,
+which is not exported to user-space.
+
+UAPI headers must use the ones prefixed with double-underscore.
+
+Detected by compile-testing exported headers:
+
+  include/linux/nilfs2_ondisk.h: In function `nilfs_checkpoint_set_snapshot':
+  include/linux/nilfs2_ondisk.h:536:17: error: implicit declaration of function `cpu_to_le32' [-Werror=implicit-function-declaration]
+    cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) |  \
+                   ^
+  include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS'
+   NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
+   ^~~~~~~~~~~~~~~~~~~~
+  include/linux/nilfs2_ondisk.h:536:29: error: implicit declaration of function `le32_to_cpu' [-Werror=implicit-function-declaration]
+    cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) |  \
+                               ^
+  include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS'
+   NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
+   ^~~~~~~~~~~~~~~~~~~~
+  include/linux/nilfs2_ondisk.h: In function `nilfs_segment_usage_set_clean':
+  include/linux/nilfs2_ondisk.h:622:19: error: implicit declaration of function `cpu_to_le64' [-Werror=implicit-function-declaration]
+    su->su_lastmod = cpu_to_le64(0);
+                     ^~~~~~~~~~~
+
+Link: http://lkml.kernel.org/r/20190605053006.14332-1-yamada.masahiro@socionext.com
+Fixes: e63e88bc53ba ("nilfs2: move ioctl interface and disk layout to uapi separately")
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Cc: Greg KH <gregkh@linuxfoundation.org>
+Cc: Joe Perches <joe@perches.com>
+Cc: <stable@vger.kernel.org>   [4.9+]
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/uapi/linux/nilfs2_ondisk.h |   24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+--- a/include/uapi/linux/nilfs2_ondisk.h
++++ b/include/uapi/linux/nilfs2_ondisk.h
+@@ -29,7 +29,7 @@
+ #include <linux/types.h>
+ #include <linux/magic.h>
+-
++#include <asm/byteorder.h>
+ #define NILFS_INODE_BMAP_SIZE 7
+@@ -533,19 +533,19 @@ enum {
+ static inline void                                                    \
+ nilfs_checkpoint_set_##name(struct nilfs_checkpoint *cp)              \
+ {                                                                     \
+-      cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) |          \
+-                                 (1UL << NILFS_CHECKPOINT_##flag));   \
++      cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) |      \
++                                   (1UL << NILFS_CHECKPOINT_##flag)); \
+ }                                                                     \
+ static inline void                                                    \
+ nilfs_checkpoint_clear_##name(struct nilfs_checkpoint *cp)            \
+ {                                                                     \
+-      cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) &          \
++      cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) &      \
+                                  ~(1UL << NILFS_CHECKPOINT_##flag));  \
+ }                                                                     \
+ static inline int                                                     \
+ nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp)            \
+ {                                                                     \
+-      return !!(le32_to_cpu(cp->cp_flags) &                           \
++      return !!(__le32_to_cpu(cp->cp_flags) &                         \
+                 (1UL << NILFS_CHECKPOINT_##flag));                    \
+ }
+@@ -595,20 +595,20 @@ enum {
+ static inline void                                                    \
+ nilfs_segment_usage_set_##name(struct nilfs_segment_usage *su)                \
+ {                                                                     \
+-      su->su_flags = cpu_to_le32(le32_to_cpu(su->su_flags) |          \
++      su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) |      \
+                                  (1UL << NILFS_SEGMENT_USAGE_##flag));\
+ }                                                                     \
+ static inline void                                                    \
+ nilfs_segment_usage_clear_##name(struct nilfs_segment_usage *su)      \
+ {                                                                     \
+       su->su_flags =                                                  \
+-              cpu_to_le32(le32_to_cpu(su->su_flags) &                 \
++              __cpu_to_le32(__le32_to_cpu(su->su_flags) &             \
+                           ~(1UL << NILFS_SEGMENT_USAGE_##flag));      \
+ }                                                                     \
+ static inline int                                                     \
+ nilfs_segment_usage_##name(const struct nilfs_segment_usage *su)      \
+ {                                                                     \
+-      return !!(le32_to_cpu(su->su_flags) &                           \
++      return !!(__le32_to_cpu(su->su_flags) &                         \
+                 (1UL << NILFS_SEGMENT_USAGE_##flag));                 \
+ }
+@@ -619,15 +619,15 @@ NILFS_SEGMENT_USAGE_FNS(ERROR, error)
+ static inline void
+ nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su)
+ {
+-      su->su_lastmod = cpu_to_le64(0);
+-      su->su_nblocks = cpu_to_le32(0);
+-      su->su_flags = cpu_to_le32(0);
++      su->su_lastmod = __cpu_to_le64(0);
++      su->su_nblocks = __cpu_to_le32(0);
++      su->su_flags = __cpu_to_le32(0);
+ }
+ static inline int
+ nilfs_segment_usage_clean(const struct nilfs_segment_usage *su)
+ {
+-      return !le32_to_cpu(su->su_flags);
++      return !__le32_to_cpu(su->su_flags);
+ }
+ /**
index 1bd1db664ba5a6835121516f4720f49fe4f0b9e6..c60dac706fdd043272bd3b21fa489c66d0f5754b 100644 (file)
@@ -1,2 +1,6 @@
 revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch
 e1000e-start-network-tx-queue-only-when-link-is-up.patch
+input-synaptics-enable-smbus-on-t480-thinkpad-trackpad.patch
+nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch
+drivers-base-cacheinfo-ensure-cpu-hotplug-work-is-done-before-intel-rdt.patch
+firmware-improve-lsm-ima-security-behaviour.patch