Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-06-10 17:22:09 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-06-10 17:22:09 +0200
commit7faf413bc16963cc27735751075dd4d4fdd234a2 (patch)
treee319cefa4ffdbfe937c7f07c4e3411a311c198c2
parent106942e4c1ea6383470c3d192adba0efb3381299 (diff)
powerpc/process: Fix sparse address space warnings
(bsc#1065729).
-rw-r--r--patches.arch/powerpc-process-Fix-sparse-address-space-warnings.patch46
-rw-r--r--series.conf1
2 files changed, 47 insertions, 0 deletions
diff --git a/patches.arch/powerpc-process-Fix-sparse-address-space-warnings.patch b/patches.arch/powerpc-process-Fix-sparse-address-space-warnings.patch
new file mode 100644
index 0000000000..94ebff38f4
--- /dev/null
+++ b/patches.arch/powerpc-process-Fix-sparse-address-space-warnings.patch
@@ -0,0 +1,46 @@
+From e33ad429d25df3746d47f2db1888ee82236edbc6 Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+Date: Sat, 6 Oct 2018 16:51:12 +0000
+Subject: [PATCH] powerpc/process: Fix sparse address space warnings
+
+References: bsc#1065729
+Patch-mainline: v4.20-rc1
+Git-commit: 3b35bd48b8a06e02a25af84baba782876b8a6572
+
+This patch fixes the following warnings, which are leftovers
+from when __get_user() was replaced by probe_kernel_address().
+
+arch/powerpc/kernel/process.c:1287:22: warning: incorrect type in argument 2 (different address spaces)
+arch/powerpc/kernel/process.c:1287:22: expected void const *src
+arch/powerpc/kernel/process.c:1287:22: got unsigned int [noderef] <asn:1>*<noident>
+arch/powerpc/kernel/process.c:1319:21: warning: incorrect type in argument 2 (different address spaces)
+arch/powerpc/kernel/process.c:1319:21: expected void const *src
+arch/powerpc/kernel/process.c:1319:21: got unsigned int [noderef] <asn:1>*<noident>
+
+Fixes: 7b051f665c32d ("powerpc: Use probe_kernel_address in show_instructions")
+Reviewed-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
+Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
+[mpe: Split out of larger patch]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+[we don't have show_user_instructions in 4.12]
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/process.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
+index dee3f6d76b61..5a24b0e3b429 100644
+--- a/arch/powerpc/kernel/process.c
++++ b/arch/powerpc/kernel/process.c
+@@ -1314,7 +1314,7 @@ static void show_instructions(struct pt_regs *regs)
+ #endif
+
+ if (!__kernel_text_address(pc) ||
+- probe_kernel_address((unsigned int __user *)pc, instr)) {
++ probe_kernel_address((const void *)pc, instr)) {
+ pr_cont("XXXXXXXX ");
+ } else {
+ if (regs->nip == pc)
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 20f5ffe05f..569a3efae5 100644
--- a/series.conf
+++ b/series.conf
@@ -19836,6 +19836,7 @@
patches.arch/powerpc-64s-consolidate-MCE-counter-increment.patch
patches.arch/powerpc-tm-Reformat-comments.patch
patches.arch/powerpc-64s-hash-Do-not-use-PPC_INVALIDATE_ERAT-on-C.patch
+ patches.arch/powerpc-process-Fix-sparse-address-space-warnings.patch
patches.arch/powerpc-boot-Expose-Kconfig-symbols-to-wrapper.patch
patches.arch/powerpc-boot-Fix-opal-console-in-boot-wrapper.patch
patches.arch/powerpc-pseries-mobility-Extend-start-stop-topology-.patch