1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-26 01:25:08 +00:00
serenity/Userland/Libraries/LibC/sys
Liav A 977aa81310 Kernel+Userland: Add ioctl to set process ownership of DisplayConnector
Now that the infrastructure of the Graphics subsystem is quite stable,
it is time to try to fix a long-standing problem, which is the lack of
locking on display connector devices. Reading and writing from multiple
processes to a framebuffer controlled by the display connector is not a
huge problem - it could be solved with POSIX locking.

The real problem is some program that will try to do ioctl operations on
a display connector without the WindowServer being aware of that which
can lead to very bad situations, for example - assuming a framebuffer is
encoded at a known resolution and certain display timings, but another
process changed the ModeSetting of the display connector, leading to
inconsistency on the properties of the current ModeSetting.

To solve this, there's a new "master" ioctl to take "ownership" and
another one to release that ownership of a display connector device. To
ensure we will not hold a Process object forever just because it has an
ownership over a display connector, we hold it with a weak reference,
and if the process is gone, someone else can take an ownership.
2022-07-23 10:42:08 +01:00
..
arch Kernel: Add support for SA_SIGINFO 2022-03-04 20:07:05 +01:00
auxv.cpp LibC+LibELF: Move getauxval and AT_* flags to sys/auxv.h 2021-10-28 11:24:36 +02:00
auxv.h LibC+LibDl: Declare functions taking no arguments as taking void 2022-01-08 19:22:00 +01:00
cdefs.h LibC: Define offsetof in stddef.h instead of sys/cdefs.h 2022-02-28 20:28:01 -08:00
file.cpp LibC: Support blocking flock() 2022-07-21 16:39:22 +02:00
file.h LibC: Implement flock(2) using fcntl's F_SETLK 2021-07-20 17:44:30 +04:30
internals.h LibC+LibDl: Declare functions taking no arguments as taking void 2022-01-08 19:22:00 +01:00
ioctl.h Kernel+LibC: Implement FIONREAD ioctl 2021-08-22 10:29:06 +02:00
ioctl_numbers.h Kernel+Userland: Add ioctl to set process ownership of DisplayConnector 2022-07-23 10:42:08 +01:00
kcov.h Kernel: Add option to build with coverage instrumentation and KCOV 2021-07-26 17:40:28 +02:00
mman.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
mman.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
param.h LibC: Add MIN, MAX and howmany macros to sys/param.h 2022-04-29 22:01:27 +02:00
poll.h LibC: Add <sys/poll.h> as an alias for <poll.h> 2021-08-22 10:29:06 +02:00
prctl.cpp LibC: Make prctl() a varargs function 2022-03-29 09:10:34 -07:00
prctl.h LibC: Make prctl() a varargs function 2022-03-29 09:10:34 -07:00
prctl_numbers.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ptrace.cpp LibCore: Implement new ptrace_peekbuf wrapper for PT_PEEKBUF syscall 2021-12-05 22:59:09 +01:00
ptrace.h Kernel+LibC: Fix ptrace for 64-bit 2021-11-20 21:22:24 +00:00
resource.h LibC: Add getpriority() and setpriority() stubs 2021-09-23 18:51:21 +02:00
select.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
select.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
socket.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
socket.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
stat.h Kernel+LibC: Implement futimens(3) 2022-05-21 18:15:00 +02:00
statvfs.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
statvfs.h Kernel+LibC: Share definitions for sys/statvfs.h 2021-08-14 19:58:11 +02:00
sysmacros.h Everywhere: Add serenity_dev_{makedev,major,minor} 2022-01-09 00:58:44 +01:00
time.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
times.h Kernel+LibC: Share definitions for sys/times.h 2021-08-14 19:58:11 +02:00
ttydefaults.h Userland: Locally suppress -Wc99-designator and re-enable globally 2022-01-04 07:51:31 +00:00
types.h Kernel+LibC: Share definitions in fcntl.h and sys/types.h 2021-08-14 19:58:11 +02:00
uio.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
uio.h Kernel+LibC: Share definitions for sys/uio.h 2021-08-14 19:58:11 +02:00
un.h Kernel+LibC: Share definitions for sys/socket.h and sys/un.h 2021-08-14 19:58:11 +02:00
utsname.h Kernel+LibC: Share definitions for utsname.h 2021-08-14 19:58:11 +02:00
wait.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
wait.h Kernel+LibC: Share definitions for sys/wait.h 2021-08-14 19:58:11 +02:00
xattr.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
xattr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00