]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Aug 2022 09:14:07 +0000 (11:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Aug 2022 09:14:07 +0000 (11:14 +0200)
added patches:
dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch
tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch
tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch

queue-5.4/dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch [new file with mode: 0644]
queue-5.4/tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch [new file with mode: 0644]

diff --git a/queue-5.4/dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch b/queue-5.4/dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch
new file mode 100644 (file)
index 0000000..d61bfdc
--- /dev/null
@@ -0,0 +1,36 @@
+From bb35fe1efbae4114bd288fae0f56070f563adcfc Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Fri, 20 May 2022 14:32:46 +0200
+Subject: dt-bindings: arm: qcom: fix MSM8916 MTP compatibles
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+commit bb35fe1efbae4114bd288fae0f56070f563adcfc upstream.
+
+The order of compatibles for MSM8916 MTP board is different:
+
+  msm8916-mtp.dtb: /: compatible: 'oneOf' conditional failed, one must be fixed:
+    ['qcom,msm8916-mtp', 'qcom,msm8916-mtp/1', 'qcom,msm8916'] is too long
+
+Fixes: 9d3ef77fe568 ("dt-bindings: arm: Convert QCom board/soc bindings to json-schema")
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Acked-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/r/20220520123252.365762-3-krzysztof.kozlowski@linaro.org
+Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/arm/qcom.yaml |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/arm/qcom.yaml
++++ b/Documentation/devicetree/bindings/arm/qcom.yaml
+@@ -112,8 +112,8 @@ properties:
+           - const: qcom,msm8974
+       - items:
+-          - const: qcom,msm8916-mtp/1
+           - const: qcom,msm8916-mtp
++          - const: qcom,msm8916-mtp/1
+           - const: qcom,msm8916
+       - items:
index 8a7a5e5b7c403cc6b44620536aaa441b64f3f5fa..af365d875bf54ebef894bef3316ebb459c56a82f 100644 (file)
@@ -318,3 +318,6 @@ geneve-do-not-use-rt_tos-for-ipv6-flowlabel.patch
 plip-avoid-rcu-debug-splat.patch
 vsock-fix-memory-leak-in-vsock_connect.patch
 vsock-set-socket-state-back-to-ss_unconnected-in-vsock_connect_timeout.patch
+dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch
+tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch
+tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch
diff --git a/queue-5.4/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch b/queue-5.4/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch
new file mode 100644 (file)
index 0000000..2e3c3fd
--- /dev/null
@@ -0,0 +1,70 @@
+From 5b245985a6de5ac18b5088c37068816d413fb8ed Mon Sep 17 00:00:00 2001
+From: Roberto Sassu <roberto.sassu@huawei.com>
+Date: Tue, 19 Jul 2022 19:05:55 +0200
+Subject: tools build: Switch to new openssl API for test-libcrypto
+
+From: Roberto Sassu <roberto.sassu@huawei.com>
+
+commit 5b245985a6de5ac18b5088c37068816d413fb8ed upstream.
+
+Switch to new EVP API for detecting libcrypto, as Fedora 36 returns an
+error when it encounters the deprecated function MD5_Init() and the others.
+
+The error would be interpreted as missing libcrypto, while in reality it is
+not.
+
+Fixes: 6e8ccb4f624a73c5 ("tools/bpf: properly account for libbfd variations")
+Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
+Cc: Alexei Starovoitov <ast@kernel.org>
+Cc: Andrii Nakryiko <andrii@kernel.org>
+Cc: bpf@vger.kernel.org
+Cc: Daniel Borkmann <daniel@iogearbox.net>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: John Fastabend <john.fastabend@gmail.com>
+Cc: KP Singh <kpsingh@kernel.org>
+Cc: llvm@lists.linux.dev
+Cc: Martin KaFai Lau <martin.lau@linux.dev>
+Cc: Nathan Chancellor <nathan@kernel.org>
+Cc: Nick Desaulniers <ndesaulniers@google.com>
+Cc: Nick Terrell <terrelln@fb.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Quentin Monnet <quentin@isovalent.com>
+Cc: Song Liu <song@kernel.org>
+Cc: Stanislav Fomichev <sdf@google.com>
+Link: https://lore.kernel.org/r/20220719170555.2576993-4-roberto.sassu@huawei.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/build/feature/test-libcrypto.c |   15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- a/tools/build/feature/test-libcrypto.c
++++ b/tools/build/feature/test-libcrypto.c
+@@ -1,16 +1,23 @@
+ // SPDX-License-Identifier: GPL-2.0
++#include <openssl/evp.h>
+ #include <openssl/sha.h>
+ #include <openssl/md5.h>
+ int main(void)
+ {
+-      MD5_CTX context;
++      EVP_MD_CTX *mdctx;
+       unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
+       unsigned char dat[] = "12345";
++      unsigned int digest_len;
+-      MD5_Init(&context);
+-      MD5_Update(&context, &dat[0], sizeof(dat));
+-      MD5_Final(&md[0], &context);
++      mdctx = EVP_MD_CTX_new();
++      if (!mdctx)
++              return 0;
++
++      EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
++      EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat));
++      EVP_DigestFinal_ex(mdctx, &md[0], &digest_len);
++      EVP_MD_CTX_free(mdctx);
+       SHA1(&dat[0], sizeof(dat), &md[0]);
diff --git a/queue-5.4/tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch b/queue-5.4/tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch
new file mode 100644 (file)
index 0000000..4aa46f1
--- /dev/null
@@ -0,0 +1,100 @@
+From 4f5ceb8851f0081af54313abbf56de1615911faf Mon Sep 17 00:00:00 2001
+From: Yuanzheng Song <songyuanzheng@huawei.com>
+Date: Sat, 28 May 2022 06:31:17 +0000
+Subject: tools/vm/slabinfo: use alphabetic order when two values are equal
+
+From: Yuanzheng Song <songyuanzheng@huawei.com>
+
+commit 4f5ceb8851f0081af54313abbf56de1615911faf upstream.
+
+When the number of partial slabs in each cache is the same (e.g., the
+value are 0), the results of the `slabinfo -X -N5` and `slabinfo -P -N5`
+are different.
+
+/ # slabinfo -X -N5
+...
+Slabs sorted by number of partial slabs
+---------------------------------------
+Name                   Objects Objsize           Space Slabs/Part/Cpu  O/S O %Fr %Ef Flg
+inode_cache              15180     392         6217728        758/0/1   20 1   0  95 a
+kernfs_node_cache        22494      88         2002944        488/0/1   46 0   0  98
+shmem_inode_cache          663     464          319488         38/0/1   17 1   0  96
+biovec-max                  50    3072          163840          4/0/1   10 3   0  93 A
+dentry                   19050     136         2600960        633/0/2   30 0   0  99 a
+
+/ # slabinfo -P -N5
+Name                   Objects Objsize           Space Slabs/Part/Cpu  O/S O %Fr %Ef Flg
+bdev_cache                  32     984           32.7K          1/0/1   16 2   0  96 Aa
+ext4_inode_cache            42     752           32.7K          1/0/1   21 2   0  96 a
+dentry                   19050     136            2.6M        633/0/2   30 0   0  99 a
+TCPv6                       17    1840           32.7K          0/0/1   17 3   0  95 A
+RAWv6                       18     856           16.3K          0/0/1   18 2   0  94 A
+
+This problem is caused by the sort_slabs().  So let's use alphabetic order
+when two values are equal in the sort_slabs().
+
+By the way, the content of the `slabinfo -h` is not aligned because the
+
+`-P|--partial Sort by number of partial slabs`
+
+uses tabs instead of spaces.  So let's use spaces instead of tabs to fix
+it.
+
+Link: https://lkml.kernel.org/r/20220528063117.935158-1-songyuanzheng@huawei.com
+Fixes: 1106b205a3fe ("tools/vm/slabinfo: add partial slab listing to -X")
+Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
+Cc: "Tobin C. Harding" <tobin@kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/vm/slabinfo.c |   32 ++++++++++++++++++++++----------
+ 1 file changed, 22 insertions(+), 10 deletions(-)
+
+--- a/tools/vm/slabinfo.c
++++ b/tools/vm/slabinfo.c
+@@ -125,7 +125,7 @@ static void usage(void)
+               "-n|--numa              Show NUMA information\n"
+               "-N|--lines=K           Show the first K slabs\n"
+               "-o|--ops               Show kmem_cache_ops\n"
+-              "-P|--partial           Sort by number of partial slabs\n"
++              "-P|--partial           Sort by number of partial slabs\n"
+               "-r|--report            Detailed report on single slabs\n"
+               "-s|--shrink            Shrink slabs\n"
+               "-S|--Size              Sort by size\n"
+@@ -1045,15 +1045,27 @@ static void sort_slabs(void)
+               for (s2 = s1 + 1; s2 < slabinfo + slabs; s2++) {
+                       int result;
+-                      if (sort_size)
+-                              result = slab_size(s1) < slab_size(s2);
+-                      else if (sort_active)
+-                              result = slab_activity(s1) < slab_activity(s2);
+-                      else if (sort_loss)
+-                              result = slab_waste(s1) < slab_waste(s2);
+-                      else if (sort_partial)
+-                              result = s1->partial < s2->partial;
+-                      else
++                      if (sort_size) {
++                              if (slab_size(s1) == slab_size(s2))
++                                      result = strcasecmp(s1->name, s2->name);
++                              else
++                                      result = slab_size(s1) < slab_size(s2);
++                      } else if (sort_active) {
++                              if (slab_activity(s1) == slab_activity(s2))
++                                      result = strcasecmp(s1->name, s2->name);
++                              else
++                                      result = slab_activity(s1) < slab_activity(s2);
++                      } else if (sort_loss) {
++                              if (slab_waste(s1) == slab_waste(s2))
++                                      result = strcasecmp(s1->name, s2->name);
++                              else
++                                      result = slab_waste(s1) < slab_waste(s2);
++                      } else if (sort_partial) {
++                              if (s1->partial == s2->partial)
++                                      result = strcasecmp(s1->name, s2->name);
++                              else
++                                      result = s1->partial < s2->partial;
++                      } else
+                               result = strcasecmp(s1->name, s2->name);
+                       if (show_inverted)