Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146130070
D27017.id78983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
836 B
Referenced Files
None
Subscribers
None
D27017.id78983.diff
View Options
Index: head/sys/compat/linux/linux_mmap.c
===================================================================
--- head/sys/compat/linux/linux_mmap.c
+++ head/sys/compat/linux/linux_mmap.c
@@ -394,6 +394,16 @@
case LINUX_MADV_SOFT_OFFLINE:
linux_msg(curthread, "unsupported madvise MADV_SOFT_OFFLINE");
return (EINVAL);
+ case -1:
+ /*
+ * -1 is sometimes used as a dummy value to detect simplistic
+ * madvise(2) stub implementations. This safeguard is used by
+ * BoringSSL, for example, before assuming MADV_WIPEONFORK is
+ * safe to use. Don't produce an "unsupported" error message
+ * for this special dummy value, which is unlikely to be used
+ * by any new advisory behavior feature.
+ */
+ return (EINVAL);
default:
linux_msg(curthread, "unsupported madvise behav %d", behav);
return (EINVAL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 1, 1:58 AM (16 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29091173
Default Alt Text
D27017.id78983.diff (836 B)
Attached To
Mode
D27017: linux(4): Quiesce warning about madvise(..., -1)
Attached
Detach File
Event Timeline
Log In to Comment