diff options
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r-- | pkg/sentry/platform/filemem/filemem.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/platform/filemem/filemem.go b/pkg/sentry/platform/filemem/filemem.go index feb020ef8..f278c8d63 100644 --- a/pkg/sentry/platform/filemem/filemem.go +++ b/pkg/sentry/platform/filemem/filemem.go @@ -233,6 +233,9 @@ func newFromFile(file *os.File) (*FileMem, error) { func New(name string) (*FileMem, error) { fd, err := memutil.CreateMemFD(name, 0) if err != nil { + if e, ok := err.(syscall.Errno); ok && e == syscall.ENOSYS { + return nil, fmt.Errorf("memfd_create(2) is not implemented. Check that you have Linux 3.17 or higher") + } return nil, err } return newFromFile(os.NewFile(uintptr(fd), name)) |