[webkit-reviews] review granted: [Bug 189741] [Linux] Use memfd_create when available in SharedMemory implementation : [Attachment 350101] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 19 06:59:25 PDT 2018
Michael Catanzaro <mcatanzaro at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 189741: [Linux] Use memfd_create when available in SharedMemory
implementation
https://bugs.webkit.org/show_bug.cgi?id=189741
Attachment 350101: Patch
https://bugs.webkit.org/attachment.cgi?id=350101&action=review
--- Comment #2 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 350101
--> https://bugs.webkit.org/attachment.cgi?id=350101
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=350101&action=review
In this case, I would check for sys/memfd.h instead of linux/memfd.h and use
memfd_create() directly if it's available (glibc 2.27 or newer) rather than
using syscall(). Then you don't have to check for EINTR or ENOSYS.
This way works too, of course.
> Source/WebKit/Platform/unix/SharedMemoryUnix.cpp:128
> + if (errno == ENOSYS)
> + return fileDescriptor;
Surely this isn't right? You should just remove this condition and fall through
to isMemFdAvailable = false, right?
> Source/WebKit/Platform/unix/SharedMemoryUnix.cpp:154
> - WTFLogAlways("Failed to create shared memory file %s: %s",
tempName.data(), strerror(errno));
> + WTFLogAlways("Failed to create shared memory file: %s",
strerror(errno));
Drop the word "file"
More information about the webkit-reviews
mailing list