summaryrefslogtreecommitdiff
path: root/arch/x86/mm/maccess.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-26 06:53:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-26 06:53:50 +0100
commita560a5672826fc1e057068bda93b3d4c98d037a2 (patch)
tree7bc3774f7ec5fa2346a86b7158f975b9a762697a /arch/x86/mm/maccess.c
parente89fbb5bc21a10a0de2bb878d4df09f538dc523b (diff)
parentd206a76d7d2726f3b096037f2079ce0bd3ba329b (diff)
downloadlinux-a560a5672826fc1e057068bda93b3d4c98d037a2.tar.gz
linux-a560a5672826fc1e057068bda93b3d4c98d037a2.tar.bz2
linux-a560a5672826fc1e057068bda93b3d4c98d037a2.zip
Merge v6.8-rc6 into usb-next
We need it here for the USB fixes, and it resolves a merge conflict as reported in linux-next in drivers/usb/roles/class.c Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/mm/maccess.c')
-rw-r--r--arch/x86/mm/maccess.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/mm/maccess.c b/arch/x86/mm/maccess.c
index 6993f026adec..42115ac079cf 100644
--- a/arch/x86/mm/maccess.c
+++ b/arch/x86/mm/maccess.c
@@ -3,6 +3,8 @@
#include <linux/uaccess.h>
#include <linux/kernel.h>
+#include <asm/vsyscall.h>
+
#ifdef CONFIG_X86_64
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
{
@@ -16,6 +18,14 @@ bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
return false;
/*
+ * Reading from the vsyscall page may cause an unhandled fault in
+ * certain cases. Though it is at an address above TASK_SIZE_MAX, it is
+ * usually considered as a user space address.
+ */
+ if (is_vsyscall_vaddr(vaddr))
+ return false;
+
+ /*
* Allow everything during early boot before 'x86_virt_bits'
* is initialized. Needed for instruction decoding in early
* exception handlers.