]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 14:52:12 +0000 (15:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 14:52:12 +0000 (15:52 +0100)
added patches:
crypto-sun4i-ss-fix-big-endian-issues.patch
ipmi-fix-memory-leak-in-__ipmi_bmc_register.patch
leds-tlc591xx-update-the-maximum-brightness.patch
perf-map-no-need-to-adjust-the-long-name-of-modules.patch
soc-aspeed-fix-snoop_file_poll-s-return-type.patch
watchdog-sprd-fix-the-incorrect-pointer-getting-from-driver-data.patch

queue-4.19/crypto-sun4i-ss-fix-big-endian-issues.patch [new file with mode: 0644]
queue-4.19/ipmi-fix-memory-leak-in-__ipmi_bmc_register.patch [new file with mode: 0644]
queue-4.19/leds-tlc591xx-update-the-maximum-brightness.patch [new file with mode: 0644]
queue-4.19/perf-map-no-need-to-adjust-the-long-name-of-modules.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/soc-aspeed-fix-snoop_file_poll-s-return-type.patch [new file with mode: 0644]
queue-4.19/watchdog-sprd-fix-the-incorrect-pointer-getting-from-driver-data.patch [new file with mode: 0644]

diff --git a/queue-4.19/crypto-sun4i-ss-fix-big-endian-issues.patch b/queue-4.19/crypto-sun4i-ss-fix-big-endian-issues.patch
new file mode 100644 (file)
index 0000000..282b46e
--- /dev/null
@@ -0,0 +1,88 @@
+From d1d787bcebfe122a5bd443ae565696661e2e9656 Mon Sep 17 00:00:00 2001
+From: Corentin Labbe <clabbe.montjoie@gmail.com>
+Date: Thu, 14 Nov 2019 13:58:49 +0100
+Subject: crypto: sun4i-ss - fix big endian issues
+
+From: Corentin Labbe <clabbe.montjoie@gmail.com>
+
+commit d1d787bcebfe122a5bd443ae565696661e2e9656 upstream.
+
+When testing BigEndian kernel, the sun4i-ss was failling all crypto
+tests.
+This patch fix endian issues with it.
+
+Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
+Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/crypto/sunxi-ss/sun4i-ss-hash.c |   21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+--- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
++++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
+@@ -179,7 +179,7 @@ static int sun4i_hash(struct ahash_reque
+        */
+       unsigned int i = 0, end, fill, min_fill, nwait, nbw = 0, j = 0, todo;
+       unsigned int in_i = 0;
+-      u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, wb = 0, v, ivmode = 0;
++      u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, v, ivmode = 0;
+       struct sun4i_req_ctx *op = ahash_request_ctx(areq);
+       struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
+       struct sun4i_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
+@@ -188,6 +188,7 @@ static int sun4i_hash(struct ahash_reque
+       struct sg_mapping_iter mi;
+       int in_r, err = 0;
+       size_t copied = 0;
++      __le32 wb = 0;
+       dev_dbg(ss->dev, "%s %s bc=%llu len=%u mode=%x wl=%u h0=%0x",
+               __func__, crypto_tfm_alg_name(areq->base.tfm),
+@@ -399,7 +400,7 @@ hash_final:
+               nbw = op->len - 4 * nwait;
+               if (nbw) {
+-                      wb = *(u32 *)(op->buf + nwait * 4);
++                      wb = cpu_to_le32(*(u32 *)(op->buf + nwait * 4));
+                       wb &= GENMASK((nbw * 8) - 1, 0);
+                       op->byte_count += nbw;
+@@ -408,7 +409,7 @@ hash_final:
+       /* write the remaining bytes of the nbw buffer */
+       wb |= ((1 << 7) << (nbw * 8));
+-      bf[j++] = wb;
++      bf[j++] = le32_to_cpu(wb);
+       /*
+        * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
+@@ -427,13 +428,13 @@ hash_final:
+       /* write the length of data */
+       if (op->mode == SS_OP_SHA1) {
+-              __be64 bits = cpu_to_be64(op->byte_count << 3);
+-              bf[j++] = lower_32_bits(bits);
+-              bf[j++] = upper_32_bits(bits);
++              __be64 *bits = (__be64 *)&bf[j];
++              *bits = cpu_to_be64(op->byte_count << 3);
++              j += 2;
+       } else {
+-              __le64 bits = op->byte_count << 3;
+-              bf[j++] = lower_32_bits(bits);
+-              bf[j++] = upper_32_bits(bits);
++              __le64 *bits = (__le64 *)&bf[j];
++              *bits = cpu_to_le64(op->byte_count << 3);
++              j += 2;
+       }
+       writesl(ss->base + SS_RXFIFO, bf, j);
+@@ -475,7 +476,7 @@ hash_final:
+               }
+       } else {
+               for (i = 0; i < 4; i++) {
+-                      v = readl(ss->base + SS_MD0 + i * 4);
++                      v = cpu_to_le32(readl(ss->base + SS_MD0 + i * 4));
+                       memcpy(areq->result + i * 4, &v, 4);
+               }
+       }
diff --git a/queue-4.19/ipmi-fix-memory-leak-in-__ipmi_bmc_register.patch b/queue-4.19/ipmi-fix-memory-leak-in-__ipmi_bmc_register.patch
new file mode 100644 (file)
index 0000000..03f3efe
--- /dev/null
@@ -0,0 +1,37 @@
+From 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab Mon Sep 17 00:00:00 2001
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+Date: Mon, 21 Oct 2019 15:06:48 -0500
+Subject: ipmi: Fix memory leak in __ipmi_bmc_register
+
+From: Navid Emamdoost <navid.emamdoost@gmail.com>
+
+commit 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab upstream.
+
+In the impelementation of __ipmi_bmc_register() the allocated memory for
+bmc should be released in case ida_simple_get() fails.
+
+Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
+Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
+Message-Id: <20191021200649.1511-1-navid.emamdoost@gmail.com>
+Signed-off-by: Corey Minyard <cminyard@mvista.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/char/ipmi/ipmi_msghandler.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/ipmi/ipmi_msghandler.c
++++ b/drivers/char/ipmi/ipmi_msghandler.c
+@@ -2965,8 +2965,11 @@ static int __ipmi_bmc_register(struct ip
+               bmc->pdev.name = "ipmi_bmc";
+               rv = ida_simple_get(&ipmi_bmc_ida, 0, 0, GFP_KERNEL);
+-              if (rv < 0)
++              if (rv < 0) {
++                      kfree(bmc);
+                       goto out;
++              }
++
+               bmc->pdev.dev.driver = &ipmidriver.driver;
+               bmc->pdev.id = rv;
+               bmc->pdev.dev.release = release_bmc_device;
diff --git a/queue-4.19/leds-tlc591xx-update-the-maximum-brightness.patch b/queue-4.19/leds-tlc591xx-update-the-maximum-brightness.patch
new file mode 100644 (file)
index 0000000..163258e
--- /dev/null
@@ -0,0 +1,56 @@
+From a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 Mon Sep 17 00:00:00 2001
+From: Jean-Jacques Hiblot <jjhiblot@ti.com>
+Date: Mon, 23 Sep 2019 12:02:50 +0200
+Subject: leds: tlc591xx: update the maximum brightness
+
+From: Jean-Jacques Hiblot <jjhiblot@ti.com>
+
+commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.
+
+The TLC chips actually offer 257 levels:
+- 0: led OFF
+- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
+- 256: led fully ON
+
+Fixes: e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")
+Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
+Signed-off-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/leds/leds-tlc591xx.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/leds/leds-tlc591xx.c
++++ b/drivers/leds/leds-tlc591xx.c
+@@ -16,6 +16,7 @@
+ #include <linux/slab.h>
+ #define TLC591XX_MAX_LEDS     16
++#define TLC591XX_MAX_BRIGHTNESS       256
+ #define TLC591XX_REG_MODE1    0x00
+ #define MODE1_RESPON_ADDR_MASK        0xF0
+@@ -115,11 +116,11 @@ tlc591xx_brightness_set(struct led_class
+       struct tlc591xx_priv *priv = led->priv;
+       int err;
+-      switch (brightness) {
++      switch ((int)brightness) {
+       case 0:
+               err = tlc591xx_set_ledout(priv, led, LEDOUT_OFF);
+               break;
+-      case LED_FULL:
++      case TLC591XX_MAX_BRIGHTNESS:
+               err = tlc591xx_set_ledout(priv, led, LEDOUT_ON);
+               break;
+       default:
+@@ -160,7 +161,7 @@ tlc591xx_configure(struct device *dev,
+               led->priv = priv;
+               led->led_no = i;
+               led->ldev.brightness_set_blocking = tlc591xx_brightness_set;
+-              led->ldev.max_brightness = LED_FULL;
++              led->ldev.max_brightness = TLC591XX_MAX_BRIGHTNESS;
+               err = led_classdev_register(dev, &led->ldev);
+               if (err < 0) {
+                       dev_err(dev, "couldn't register LED %s\n",
diff --git a/queue-4.19/perf-map-no-need-to-adjust-the-long-name-of-modules.patch b/queue-4.19/perf-map-no-need-to-adjust-the-long-name-of-modules.patch
new file mode 100644 (file)
index 0000000..b808b79
--- /dev/null
@@ -0,0 +1,244 @@
+From f068435d9bb2d825d59e3c101bc579f09315ee01 Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Thu, 14 Nov 2019 10:46:45 -0300
+Subject: perf map: No need to adjust the long name of modules
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+commit f068435d9bb2d825d59e3c101bc579f09315ee01 upstream.
+
+At some point in the past we needed to make sure we would get the long
+name of modules and not just what we get from /proc/modules, but that
+need, as described in the cset that introduced the adjustment function:
+
+Fixes: c03d5184f0e9 ("perf machine: Adjust dso->long_name for offline module")
+
+Without using the buildid-cache:
+
+  # lsmod | grep trusted
+  # insmod trusted.ko
+  # lsmod | grep trusted
+  trusted                24576  0
+  # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted
+  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4
+  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3
+  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+    probe:key_seal       (on key_seal in trusted)
+  # perf probe -l
+    probe:key_seal       (on key_seal in trusted)
+  #
+
+No attempt at opening '[trusted]'.
+
+Now using the build-id cache:
+
+  # rmmod trusted
+  # perf buildid-cache --add ./trusted.ko
+  # insmod trusted.ko
+  # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted
+  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4
+  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3
+  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4
+  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
+  #
+
+Again, no attempt at reading '[trusted]'.
+
+Finally, adding a probe to that function and then using:
+
+[root@quaco ~]# perf trace -e probe_perf:*/max-stack=16/ --max-events=2
+     0.000 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263)
+                                       dso__adjust_kmod_long_name (/home/acme/bin/perf)
+                                       machine__process_kernel_mmap_event (/home/acme/bin/perf)
+                                       machine__process_mmap_event (/home/acme/bin/perf)
+                                       perf_event__process_mmap (/home/acme/bin/perf)
+                                       machines__deliver_event (/home/acme/bin/perf)
+                                       perf_session__deliver_event (/home/acme/bin/perf)
+                                       perf_session__process_event (/home/acme/bin/perf)
+                                       process_simple (/home/acme/bin/perf)
+                                       reader__process_events (/home/acme/bin/perf)
+                                       __perf_session__process_events (/home/acme/bin/perf)
+                                       perf_session__process_events (/home/acme/bin/perf)
+                                       process_buildids (/home/acme/bin/perf)
+                                       record__finish_output (/home/acme/bin/perf)
+                                       __cmd_record (/home/acme/bin/perf)
+                                       cmd_record (/home/acme/bin/perf)
+                                       run_builtin (/home/acme/bin/perf)
+     0.055 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263)
+                                       dso__adjust_kmod_long_name (/home/acme/bin/perf)
+                                       machine__process_kernel_mmap_event (/home/acme/bin/perf)
+                                       machine__process_mmap_event (/home/acme/bin/perf)
+                                       perf_event__process_mmap (/home/acme/bin/perf)
+                                       machines__deliver_event (/home/acme/bin/perf)
+                                       perf_session__deliver_event (/home/acme/bin/perf)
+                                       perf_session__process_event (/home/acme/bin/perf)
+                                       process_simple (/home/acme/bin/perf)
+                                       reader__process_events (/home/acme/bin/perf)
+                                       __perf_session__process_events (/home/acme/bin/perf)
+                                       perf_session__process_events (/home/acme/bin/perf)
+                                       process_buildids (/home/acme/bin/perf)
+                                       record__finish_output (/home/acme/bin/perf)
+                                       __cmd_record (/home/acme/bin/perf)
+                                       cmd_record (/home/acme/bin/perf)
+                                       run_builtin (/home/acme/bin/perf)
+  #
+
+This was the only path I could find using the perf tools that reach at this
+function, then as of november/2019, if we put a probe in the line where the
+actuall setting of the dso->long_name is done:
+
+  # perf trace -e probe_perf:*
+  ^C[root@quaco ~]
+  # perf stat -e probe_perf:*  -I 2000
+       2.000404265                  0      probe_perf:dso__adjust_kmod_long_name
+       4.001142200                  0      probe_perf:dso__adjust_kmod_long_name
+       6.001704120                  0      probe_perf:dso__adjust_kmod_long_name
+       8.002398316                  0      probe_perf:dso__adjust_kmod_long_name
+      10.002984010                  0      probe_perf:dso__adjust_kmod_long_name
+      12.003597851                  0      probe_perf:dso__adjust_kmod_long_name
+      14.004113303                  0      probe_perf:dso__adjust_kmod_long_name
+      16.004582773                  0      probe_perf:dso__adjust_kmod_long_name
+      18.005176373                  0      probe_perf:dso__adjust_kmod_long_name
+      20.005801605                  0      probe_perf:dso__adjust_kmod_long_name
+      22.006467540                  0      probe_perf:dso__adjust_kmod_long_name
+  ^C    23.683261941                  0      probe_perf:dso__adjust_kmod_long_name
+
+  #
+
+Its not being used at all.
+
+To further test this I used kvm.ko as the offline module, i.e. removed
+if from the buildid-cache by nuking it completely (rm -rf ~/.debug) and
+moved it from the normal kernel distro path, removed the modules, stoped
+the kvm guest, and then installed it manually, etc.
+
+  # rmmod kvm-intel
+  # rmmod kvm
+  # lsmod | grep kvm
+  # modprobe kvm-intel
+  modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
+  modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
+  modprobe: ERROR: could not insert 'kvm_intel': Unknown symbol in module, or unknown parameter (see dmesg)
+  # insmod ./kvm.ko
+  # modprobe kvm-intel
+  modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
+  modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
+  # lsmod | grep kvm
+  kvm_intel             299008  0
+  kvm                   765952  1 kvm_intel
+  irqbypass              16384  1 kvm
+  #
+  # perf probe -x ~/bin/perf machine__findnew_module_map:12 mname=m.name:string filename=filename:string 'dso_long_name=map->dso->long_name:string' 'dso_name=map->dso->name:string'
+  # perf probe -l
+    probe_perf:machine__findnew_module_map (on machine__findnew_module_map:12@util/machine.c in /home/acme/bin/perf with mname filename dso_long_name dso_name)
+  # perf record
+  ^C[ perf record: Woken up 2 times to write data ]
+  [ perf record: Captured and wrote 3.416 MB perf.data (33956 samples) ]
+  # perf trace -e probe_perf:machine*
+  <SNIP>
+       6.322 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[salsa20_generic]", filename: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_long_name: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_name: "[salsa20_generic]")
+       6.375 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[kvm]", filename: "[kvm]", dso_long_name: "[kvm]", dso_name: "[kvm]")
+  <SNIP>
+
+The filename doesn't come with the path, no point in trying to set the dso->long_name.
+
+  [root@quaco ~]# strace -e open,openat perf probe -m ./kvm.ko kvm_apic_local_deliver |& egrep 'open.*kvm'
+  openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 4
+  openat(AT_FDCWD, "/sys/module/kvm/notes/.note.gnu.build-id", O_RDONLY) = 4
+  openat(AT_FDCWD, "/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
+  openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 8
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/.debug/root/kvm.ko/5955f426cb93f03f30f3e876814be2db80ab0b55/probes", O_RDWR|O_CREAT, 0644) = 3
+  openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/.debug/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, ".debug/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 4
+  openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
+  [root@quaco ~]#
+
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Andi Kleen <ak@linux.intel.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Wang Nan <wangnan0@huawei.com>
+Link: https://lkml.kernel.org/n/tip-jlfew3lyb24d58egrp0o72o2@git.kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/util/machine.c |   27 +--------------------------
+ 1 file changed, 1 insertion(+), 26 deletions(-)
+
+--- a/tools/perf/util/machine.c
++++ b/tools/perf/util/machine.c
+@@ -681,24 +681,6 @@ int machine__process_switch_event(struct
+       return 0;
+ }
+-static void dso__adjust_kmod_long_name(struct dso *dso, const char *filename)
+-{
+-      const char *dup_filename;
+-
+-      if (!filename || !dso || !dso->long_name)
+-              return;
+-      if (dso->long_name[0] != '[')
+-              return;
+-      if (!strchr(filename, '/'))
+-              return;
+-
+-      dup_filename = strdup(filename);
+-      if (!dup_filename)
+-              return;
+-
+-      dso__set_long_name(dso, dup_filename, true);
+-}
+-
+ struct map *machine__findnew_module_map(struct machine *machine, u64 start,
+                                       const char *filename)
+ {
+@@ -710,15 +692,8 @@ struct map *machine__findnew_module_map(
+               return NULL;
+       map = map_groups__find_by_name(&machine->kmaps, m.name);
+-      if (map) {
+-              /*
+-               * If the map's dso is an offline module, give dso__load()
+-               * a chance to find the file path of that module by fixing
+-               * long_name.
+-               */
+-              dso__adjust_kmod_long_name(map->dso, filename);
++      if (map)
+               goto out;
+-      }
+       dso = machine__findnew_module_dso(machine, &m, filename);
+       if (dso == NULL)
index b678a7efc3a7b23ad9472b1342acd883633aef5d..9703c5f543eb606d0397b2c7a86fa53f77c5b59f 100644 (file)
@@ -9,3 +9,9 @@ powerpc-archrandom-fix-arch_get_random_seed_int.patch
 tipc-update-mon-s-self-addr-when-node-addr-generated.patch
 tipc-fix-wrong-timeout-input-for-tipc_wait_for_cond.patch
 mt7601u-fix-bbp-version-check-in-mt7601u_wait_bbp_ready.patch
+crypto-sun4i-ss-fix-big-endian-issues.patch
+perf-map-no-need-to-adjust-the-long-name-of-modules.patch
+leds-tlc591xx-update-the-maximum-brightness.patch
+soc-aspeed-fix-snoop_file_poll-s-return-type.patch
+watchdog-sprd-fix-the-incorrect-pointer-getting-from-driver-data.patch
+ipmi-fix-memory-leak-in-__ipmi_bmc_register.patch
diff --git a/queue-4.19/soc-aspeed-fix-snoop_file_poll-s-return-type.patch b/queue-4.19/soc-aspeed-fix-snoop_file_poll-s-return-type.patch
new file mode 100644 (file)
index 0000000..6f6ee18
--- /dev/null
@@ -0,0 +1,46 @@
+From a4e55ccd4392e70f296d12e81b93c6ca96ee21d5 Mon Sep 17 00:00:00 2001
+From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
+Date: Thu, 21 Nov 2019 15:48:51 +1030
+Subject: soc: aspeed: Fix snoop_file_poll()'s return type
+
+From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
+
+commit a4e55ccd4392e70f296d12e81b93c6ca96ee21d5 upstream.
+
+snoop_file_poll() is defined as returning 'unsigned int' but the
+.poll method is declared as returning '__poll_t', a bitwise type.
+
+Fix this by using the proper return type and using the EPOLL
+constants instead of the POLL ones, as required for __poll_t.
+
+Link: https://lore.kernel.org/r/20191121051851.268726-1-joel@jms.id.au
+Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev")
+Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
+Reviewed-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/aspeed-lpc-snoop.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/misc/aspeed-lpc-snoop.c
++++ b/drivers/misc/aspeed-lpc-snoop.c
+@@ -101,13 +101,13 @@ static ssize_t snoop_file_read(struct fi
+       return ret ? ret : copied;
+ }
+-static unsigned int snoop_file_poll(struct file *file,
++static __poll_t snoop_file_poll(struct file *file,
+                                   struct poll_table_struct *pt)
+ {
+       struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
+       poll_wait(file, &chan->wq, pt);
+-      return !kfifo_is_empty(&chan->fifo) ? POLLIN : 0;
++      return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0;
+ }
+ static const struct file_operations snoop_fops = {
diff --git a/queue-4.19/watchdog-sprd-fix-the-incorrect-pointer-getting-from-driver-data.patch b/queue-4.19/watchdog-sprd-fix-the-incorrect-pointer-getting-from-driver-data.patch
new file mode 100644 (file)
index 0000000..a3031ae
--- /dev/null
@@ -0,0 +1,58 @@
+From 39e68d9e7ab276880980ee5386301fb218202192 Mon Sep 17 00:00:00 2001
+From: Shuiqing Li <shuiqing.li@unisoc.com>
+Date: Fri, 8 Nov 2019 18:57:12 +0800
+Subject: watchdog: sprd: Fix the incorrect pointer getting from driver data
+
+From: Shuiqing Li <shuiqing.li@unisoc.com>
+
+commit 39e68d9e7ab276880980ee5386301fb218202192 upstream.
+
+The device driver data saved the 'struct sprd_wdt' object, it is
+incorrect to get 'struct watchdog_device' object from the driver
+data, thus fix it.
+
+Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver")
+Reported-by: Dongwei Wang <dongwei.wang@unisoc.com>
+Signed-off-by: Shuiqing Li <shuiqing.li@unisoc.com>
+Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Link: https://lore.kernel.org/r/76d4687189ec940baa90cb8d679a8d4c8f02ee80.1573210405.git.baolin.wang@linaro.org
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/watchdog/sprd_wdt.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/watchdog/sprd_wdt.c
++++ b/drivers/watchdog/sprd_wdt.c
+@@ -342,10 +342,9 @@ static int sprd_wdt_probe(struct platfor
+ static int __maybe_unused sprd_wdt_pm_suspend(struct device *dev)
+ {
+-      struct watchdog_device *wdd = dev_get_drvdata(dev);
+       struct sprd_wdt *wdt = dev_get_drvdata(dev);
+-      if (watchdog_active(wdd))
++      if (watchdog_active(&wdt->wdd))
+               sprd_wdt_stop(&wdt->wdd);
+       sprd_wdt_disable(wdt);
+@@ -354,7 +353,6 @@ static int __maybe_unused sprd_wdt_pm_su
+ static int __maybe_unused sprd_wdt_pm_resume(struct device *dev)
+ {
+-      struct watchdog_device *wdd = dev_get_drvdata(dev);
+       struct sprd_wdt *wdt = dev_get_drvdata(dev);
+       int ret;
+@@ -362,7 +360,7 @@ static int __maybe_unused sprd_wdt_pm_re
+       if (ret)
+               return ret;
+-      if (watchdog_active(wdd)) {
++      if (watchdog_active(&wdt->wdd)) {
+               ret = sprd_wdt_start(&wdt->wdd);
+               if (ret) {
+                       sprd_wdt_disable(wdt);