Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106000927
D20864.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
998 B
Referenced Files
None
Subscribers
None
D20864.diff
View Options
Index: head/sys/compat/linux/linux_mmap.h
===================================================================
--- head/sys/compat/linux/linux_mmap.h
+++ head/sys/compat/linux/linux_mmap.h
@@ -41,6 +41,8 @@
#define LINUX_MAP_ANON 0x0020
#define LINUX_MAP_GROWSDOWN 0x0100
+#define LINUX_PROT_GROWSDOWN 0x01000000
+#define LINUX_PROT_GROWSUP 0x02000000
int linux_mmap_common(struct thread *, uintptr_t, size_t, int, int,
int, off_t);
Index: head/sys/compat/linux/linux_mmap.c
===================================================================
--- head/sys/compat/linux/linux_mmap.c
+++ head/sys/compat/linux/linux_mmap.c
@@ -228,6 +228,11 @@
linux_mprotect_common(struct thread *td, uintptr_t addr, size_t len, int prot)
{
+ /* XXX Ignore PROT_GROWSDOWN and PROT_GROWSUP for now. */
+ prot &= ~(LINUX_PROT_GROWSDOWN | LINUX_PROT_GROWSUP);
+ if ((prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) != 0)
+ return (EINVAL);
+
#if defined(__amd64__)
linux_fixup_prot(td, &prot);
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 5:10 PM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15590063
Default Alt Text
D20864.diff (998 B)
Attached To
Mode
D20864: Let linuxulator mprotect mask unsupported bits before calling kern_mprotect
Attached
Detach File
Event Timeline
Log In to Comment