[Webkit-unassigned] [Bug 189741] [Linux] Use memfd_create when available in SharedMemory implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 19 06:59:25 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=189741

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com
 Attachment #350101|review?                     |review+
              Flags|                            |

--- 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"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180919/eea8a4f6/attachment.html>


More information about the webkit-unassigned mailing list