From b8d8ff6d4dd1891e81d05965d774f42ef877ce81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 14 Dec 2022 14:09:24 +0100 Subject: [PATCH] libdrm/lima: use sync-fd range beyond libc's reach Sync file-descriptors a purely virtual and are not known by the libc and should be only accessed by 'drm_poll'. To prevent accidental access move them to range never used by the libc fd allocator. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 2a617a924f..1634dc8351 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -769,7 +769,8 @@ class Lima::Call public: - static constexpr int const SYNC_FD { 384 }; + /* arbitrary start value out of the libc's FD alloc range */ + static constexpr int const SYNC_FD { 10000 }; Call() {