lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200925153703.288236-1-dlesho@codeweavers.com>
Date:   Fri, 25 Sep 2020 10:37:03 -0500
From:   Derek Lesho <dlesho@...eweavers.com>
To:     linux-kernel@...r.kernel.org
Cc:     Derek Lesho <dlesho@...eweavers.com>
Subject: [RFC] mm: Allow 64-bit mmap syscalls to access higher addresses.

For those curious about my usecase, I'm working on running some windows 64-bit driver code in context of any given process.  I accomplish this by mapping some of the fake kernel
bits in the target process, and running the code in a dedicated thread.
---
 mm/mmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 40248d84ad5f..3a6940ef6128 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2240,7 +2240,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
 	if (IS_ERR_VALUE(addr))
 		return addr;
 
-	if (addr > TASK_SIZE - len)
+	if (addr > TASK_SIZE_MAX - len)
 		return -ENOMEM;
 	if (offset_in_page(addr))
 		return -EINVAL;
@@ -2767,7 +2767,7 @@ int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len,
 	unsigned long end;
 	struct vm_area_struct *vma, *prev, *last;
 
-	if ((offset_in_page(start)) || start > TASK_SIZE || len > TASK_SIZE-start)
+	if ((offset_in_page(start)) || start > TASK_SIZE_MAX || len > TASK_SIZE_MAX-start)
 		return -EINVAL;
 
 	len = PAGE_ALIGN(len);
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ