From: Laura Abbott <labbott@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH] mm/usercopy: Drop extra is_vmalloc_or_module check
Date: Tue, 4 Apr 2017 14:09:00 -0700 [thread overview]
Message-ID: <1491340140-18238-1-git-send-email-labbott@redhat.com> (raw)
virt_addr_valid was previously insufficient to validate if virt_to_page
could be called on an address on arm64. This has since been fixed up
so there is no need for the extra check. Drop it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
I've given this some testing on my machine and haven't seen any problems
(e.g. random crashes without the check) and the fix has been in for long
enough now. I'm in no rush to have this merged so I'm okay if this sits in
a tree somewhere to get more testing.
---
mm/usercopy.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/mm/usercopy.c b/mm/usercopy.c
index d155e12563b1..4d23a0e0e232 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -206,17 +206,6 @@ static inline const char *check_heap_object(const void *ptr, unsigned long n,
{
struct page *page;
- /*
- * Some architectures (arm64) return true for virt_addr_valid() on
- * vmalloced addresses. Work around this by checking for vmalloc
- * first.
- *
- * We also need to check for module addresses explicitly since we
- * may copy static data from modules to userspace
- */
- if (is_vmalloc_or_module_addr(ptr))
- return NULL;
-
if (!virt_addr_valid(ptr))
return NULL;
--
2.12.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2017-04-04 21:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 21:09 Laura Abbott [this message]
2017-04-04 21:10 ` Kees Cook
2017-04-05 13:17 ` Mark Rutland
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=1491340140-18238-1-git-send-email-labbott@redhat.com \
--to=labbott@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
/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