From: Daniel Axtens <dja@axtens.net>
To: linuxppc-dev@ozlabs.org
Cc: Daniel Axtens <dja@axtens.net>
Subject: [PATCH 2/6] powerpc/kernel: Drop annotation for generic, unannotated function
Date: Mon, 4 Jul 2016 17:09:38 +1000 [thread overview]
Message-ID: <1467616182-30886-2-git-send-email-dja@axtens.net> (raw)
In-Reply-To: <1467616182-30886-1-git-send-email-dja@axtens.net>
Sadly, access_process_vm takes an unsigned long, rather than a void
__user *. Worse, it's a generic kernel function: changing it would be
a massive, kernel-wide effort.
So, __force the annotation away.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/kernel/ptrace32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index f52b7db327c8..c2eb319a9239 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -73,7 +73,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
- copied = access_process_vm(child, (u64)addrOthers, &tmp,
+ copied = access_process_vm(child, (u64 __force)addrOthers, &tmp,
sizeof(tmp), 0);
if (copied != sizeof(tmp))
break;
@@ -178,7 +178,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
break;
ret = 0;
- if (access_process_vm(child, (u64)addrOthers, &tmp,
+ if (access_process_vm(child, (u64 __force)addrOthers, &tmp,
sizeof(tmp), 1) == sizeof(tmp))
break;
ret = -EIO;
--
2.1.4
next prev parent reply other threads:[~2016-07-04 7:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 7:09 [PATCH 1/6] powerpc/kvm: Clarify __user annotations Daniel Axtens
2016-07-04 7:09 ` Daniel Axtens [this message]
2016-07-04 7:09 ` [PATCH 3/6] powerpc/xics: Fully qualify cast to silence sparse Daniel Axtens
2016-07-04 7:27 ` Andrew Donnellan
2016-07-04 7:46 ` Arnd Bergmann
2016-07-04 7:09 ` [PATCH 4/6] powerpc/kernel: Clean up some sparse warnings Daniel Axtens
2016-07-04 7:50 ` Arnd Bergmann
2016-07-04 7:09 ` [PATCH 5/6] powerpc/sparse: Pass endianness to sparse Daniel Axtens
2016-07-04 7:32 ` Andrew Donnellan
2016-07-04 7:52 ` Arnd Bergmann
2016-07-04 7:09 ` [PATCH 6/6] powerpc/sparse: Make ppc_md.{halt, restart} __noreturn Daniel Axtens
2016-07-04 10:20 ` kbuild test robot
2016-07-04 7:26 ` [PATCH 1/6] powerpc/kvm: Clarify __user annotations Andrew Donnellan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467616182-30886-2-git-send-email-dja@axtens.net \
--to=dja@axtens.net \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).