From: Greg Kroah-Hartman Date: Mon, 22 Aug 2022 09:14:07 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.9.326~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a4bf583454c93d639bb233057d49f704252234f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches 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 --- 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 index 00000000000..d61bfdcdd50 --- /dev/null +++ b/queue-5.4/dt-bindings-arm-qcom-fix-msm8916-mtp-compatibles.patch @@ -0,0 +1,36 @@ +From bb35fe1efbae4114bd288fae0f56070f563adcfc Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 20 May 2022 14:32:46 +0200 +Subject: dt-bindings: arm: qcom: fix MSM8916 MTP compatibles + +From: Krzysztof Kozlowski + +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 +Acked-by: Rob Herring +Link: https://lore.kernel.org/r/20220520123252.365762-3-krzysztof.kozlowski@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + 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: diff --git a/queue-5.4/series b/queue-5.4/series index 8a7a5e5b7c4..af365d875bf 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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 index 00000000000..2e3c3fde2d7 --- /dev/null +++ b/queue-5.4/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch @@ -0,0 +1,70 @@ +From 5b245985a6de5ac18b5088c37068816d413fb8ed Mon Sep 17 00:00:00 2001 +From: Roberto Sassu +Date: Tue, 19 Jul 2022 19:05:55 +0200 +Subject: tools build: Switch to new openssl API for test-libcrypto + +From: Roberto Sassu + +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 +Cc: Alexei Starovoitov +Cc: Andrii Nakryiko +Cc: bpf@vger.kernel.org +Cc: Daniel Borkmann +Cc: Ingo Molnar +Cc: John Fastabend +Cc: KP Singh +Cc: llvm@lists.linux.dev +Cc: Martin KaFai Lau +Cc: Nathan Chancellor +Cc: Nick Desaulniers +Cc: Nick Terrell +Cc: Peter Zijlstra +Cc: Quentin Monnet +Cc: Song Liu +Cc: Stanislav Fomichev +Link: https://lore.kernel.org/r/20220719170555.2576993-4-roberto.sassu@huawei.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + 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 + #include + #include + + 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 index 00000000000..4aa46f1af34 --- /dev/null +++ b/queue-5.4/tools-vm-slabinfo-use-alphabetic-order-when-two-values-are-equal.patch @@ -0,0 +1,100 @@ +From 4f5ceb8851f0081af54313abbf56de1615911faf Mon Sep 17 00:00:00 2001 +From: Yuanzheng Song +Date: Sat, 28 May 2022 06:31:17 +0000 +Subject: tools/vm/slabinfo: use alphabetic order when two values are equal + +From: Yuanzheng Song + +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 +Cc: "Tobin C. Harding" +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + 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)