From f5909927c9390e125af764d1c099f60fcb53f7bd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 24 Apr 2020 12:12:59 +0200 Subject: [PATCH] 4.19-stable patches added patches: bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch drm-msm-use-the-correct-dma_sync-calls-harder.patch vti4-removed-duplicate-log-message.patch --- ...ng-incorrect-pointer-in-btf_dump_ptr.patch | 41 +++++++++++++ ...ull_hash-and-sha256_null_hash-static.patch | 42 +++++++++++++ ...se-the-correct-dma_sync-calls-harder.patch | 60 +++++++++++++++++++ queue-4.19/series | 4 ++ .../vti4-removed-duplicate-log-message.patch | 37 ++++++++++++ 5 files changed, 184 insertions(+) create mode 100644 queue-4.19/bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch create mode 100644 queue-4.19/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch create mode 100644 queue-4.19/drm-msm-use-the-correct-dma_sync-calls-harder.patch create mode 100644 queue-4.19/vti4-removed-duplicate-log-message.patch diff --git a/queue-4.19/bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch b/queue-4.19/bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch new file mode 100644 index 00000000000..70047d5dfdf --- /dev/null +++ b/queue-4.19/bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch @@ -0,0 +1,41 @@ +From 555089fdfc37ad65e0ee9b42ca40c238ff546f83 Mon Sep 17 00:00:00 2001 +From: Martin KaFai Lau +Date: Fri, 10 Jan 2020 15:16:44 -0800 +Subject: bpftool: Fix printing incorrect pointer in btf_dump_ptr + +From: Martin KaFai Lau + +commit 555089fdfc37ad65e0ee9b42ca40c238ff546f83 upstream. + +For plain text output, it incorrectly prints the pointer value +"void *data". The "void *data" is actually pointing to memory that +contains a bpf-map's value. The intention is to print the content of +the bpf-map's value instead of printing the pointer pointing to the +bpf-map's value. + +In this case, a member of the bpf-map's value is a pointer type. +Thus, it should print the "*(void **)data". + +Fixes: 22c349e8db89 ("tools: bpftool: fix format strings and arguments for jsonw_printf()") +Signed-off-by: Martin KaFai Lau +Signed-off-by: Alexei Starovoitov +Reviewed-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20200110231644.3484151-1-kafai@fb.com +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + tools/bpf/bpftool/btf_dumper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/bpf/bpftool/btf_dumper.c ++++ b/tools/bpf/bpftool/btf_dumper.c +@@ -26,7 +26,7 @@ static void btf_dumper_ptr(const void *d + bool is_plain_text) + { + if (is_plain_text) +- jsonw_printf(jw, "%p", data); ++ jsonw_printf(jw, "%p", *(void **)data); + else + jsonw_printf(jw, "%lu", *(unsigned long *)data); + } diff --git a/queue-4.19/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch b/queue-4.19/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch new file mode 100644 index 00000000000..0f3be1fd182 --- /dev/null +++ b/queue-4.19/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch @@ -0,0 +1,42 @@ +From ce4e45842de3eb54b8dd6e081765d741f5b92b56 Mon Sep 17 00:00:00 2001 +From: Wei Yongjun +Date: Thu, 11 Oct 2018 01:49:48 +0000 +Subject: crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static + +From: Wei Yongjun + +commit ce4e45842de3eb54b8dd6e081765d741f5b92b56 upstream. + +Fixes the following sparse warnings: + +drivers/crypto/mxs-dcp.c:39:15: warning: + symbol 'sha1_null_hash' was not declared. Should it be static? +drivers/crypto/mxs-dcp.c:43:15: warning: + symbol 'sha256_null_hash' was not declared. Should it be static? + +Fixes: c709eebaf5c5 ("crypto: mxs-dcp - Fix SHA null hashes and output length") +Signed-off-by: Wei Yongjun +Signed-off-by: Herbert Xu +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/mxs-dcp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/crypto/mxs-dcp.c ++++ b/drivers/crypto/mxs-dcp.c +@@ -37,11 +37,11 @@ + * Null hashes to align with hw behavior on imx6sl and ull + * these are flipped for consistency with hw output + */ +-const uint8_t sha1_null_hash[] = ++static const uint8_t sha1_null_hash[] = + "\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf" + "\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda"; + +-const uint8_t sha256_null_hash[] = ++static const uint8_t sha256_null_hash[] = + "\x55\xb8\x52\x78\x1b\x99\x95\xa4" + "\x4c\x93\x9b\x64\xe4\x41\xae\x27" + "\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a" diff --git a/queue-4.19/drm-msm-use-the-correct-dma_sync-calls-harder.patch b/queue-4.19/drm-msm-use-the-correct-dma_sync-calls-harder.patch new file mode 100644 index 00000000000..c94c692326d --- /dev/null +++ b/queue-4.19/drm-msm-use-the-correct-dma_sync-calls-harder.patch @@ -0,0 +1,60 @@ +From 9f614197c744002f9968e82c649fdf7fe778e1e7 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Wed, 4 Sep 2019 09:56:03 -0700 +Subject: drm/msm: Use the correct dma_sync calls harder + +From: Rob Clark + +commit 9f614197c744002f9968e82c649fdf7fe778e1e7 upstream. + +Looks like the dma_sync calls don't do what we want on armv7 either. +Fixes: + + Unable to handle kernel paging request at virtual address 50001000 + pgd = (ptrval) + [50001000] *pgd=00000000 + Internal error: Oops: 805 [#1] SMP ARM + Modules linked in: + CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc6-00271-g9f159ae07f07 #4 + Hardware name: Freescale i.MX53 (Device Tree Support) + PC is at v7_dma_clean_range+0x20/0x38 + LR is at __dma_page_cpu_to_dev+0x28/0x90 + pc : [] lr : [] psr: 20000013 + sp : d80b5a88 ip : de96c000 fp : d840ce6c + r10: 00000000 r9 : 00000001 r8 : d843e010 + r7 : 00000000 r6 : 00008000 r5 : ddb6c000 r4 : 00000000 + r3 : 0000003f r2 : 00000040 r1 : 50008000 r0 : 50001000 + Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none + Control: 10c5387d Table: 70004019 DAC: 00000051 + Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) + +Signed-off-by: Rob Clark +Fixes: 3de433c5b38a ("drm/msm: Use the correct dma_sync calls in msm_gem") +Tested-by: Fabio Estevam +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/msm/msm_gem.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/msm/msm_gem.c ++++ b/drivers/gpu/drm/msm/msm_gem.c +@@ -61,7 +61,7 @@ static void sync_for_device(struct msm_g + { + struct device *dev = msm_obj->base.dev->dev; + +- if (get_dma_ops(dev)) { ++ if (get_dma_ops(dev) && IS_ENABLED(CONFIG_ARM64)) { + dma_sync_sg_for_device(dev, msm_obj->sgt->sgl, + msm_obj->sgt->nents, DMA_BIDIRECTIONAL); + } else { +@@ -74,7 +74,7 @@ static void sync_for_cpu(struct msm_gem_ + { + struct device *dev = msm_obj->base.dev->dev; + +- if (get_dma_ops(dev)) { ++ if (get_dma_ops(dev) && IS_ENABLED(CONFIG_ARM64)) { + dma_sync_sg_for_cpu(dev, msm_obj->sgt->sgl, + msm_obj->sgt->nents, DMA_BIDIRECTIONAL); + } else { diff --git a/queue-4.19/series b/queue-4.19/series index cb481c941cb..e29c68df466 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -1 +1,5 @@ ext4-fix-extent_status-fragmentation-for-plain-files.patch +drm-msm-use-the-correct-dma_sync-calls-harder.patch +bpftool-fix-printing-incorrect-pointer-in-btf_dump_ptr.patch +crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch +vti4-removed-duplicate-log-message.patch diff --git a/queue-4.19/vti4-removed-duplicate-log-message.patch b/queue-4.19/vti4-removed-duplicate-log-message.patch new file mode 100644 index 00000000000..1bdfb17c6a2 --- /dev/null +++ b/queue-4.19/vti4-removed-duplicate-log-message.patch @@ -0,0 +1,37 @@ +From 01ce31c57b3f07c91c9d45bbaf126124cce83a5d Mon Sep 17 00:00:00 2001 +From: Jeremy Sowden +Date: Tue, 19 Mar 2019 15:39:21 +0000 +Subject: vti4: removed duplicate log message. + +From: Jeremy Sowden + +commit 01ce31c57b3f07c91c9d45bbaf126124cce83a5d upstream. + +Removed info log-message if ipip tunnel registration fails during +module-initialization: it adds nothing to the error message that is +written on all failures. + +Fixes: dd9ee3444014e ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel") +Signed-off-by: Jeremy Sowden +Signed-off-by: Steffen Klassert +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/ip_vti.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/net/ipv4/ip_vti.c ++++ b/net/ipv4/ip_vti.c +@@ -677,10 +677,8 @@ static int __init vti_init(void) + + msg = "ipip tunnel"; + err = xfrm4_tunnel_register(&ipip_handler, AF_INET); +- if (err < 0) { +- pr_info("%s: cant't register tunnel\n",__func__); ++ if (err < 0) + goto xfrm_tunnel_failed; +- } + + msg = "netlink interface"; + err = rtnl_link_register(&vti_link_ops); -- 2.47.3