1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

Kernel+Userland: Remove shared buffers (shbufs)

All users of this mechanism have been switched to anonymous files and
passing file descriptors with sendfd()/recvfd().

Shbufs got us where we are today, but it's time we say good-bye to them
and welcome a much more idiomatic replacement. :^)
This commit is contained in:
Andreas Kling 2021-01-17 08:51:41 +01:00
parent 2cd16778b5
commit bf0719092f
28 changed files with 2 additions and 1022 deletions

View file

@ -80,8 +80,7 @@ extern VirtualAddress g_return_to_ring3_from_signal_trampoline;
__ENUMERATE_PLEDGE_PROMISE(accept) \
__ENUMERATE_PLEDGE_PROMISE(settime) \
__ENUMERATE_PLEDGE_PROMISE(sigaction) \
__ENUMERATE_PLEDGE_PROMISE(setkeymap) \
__ENUMERATE_PLEDGE_PROMISE(shared_buffer)
__ENUMERATE_PLEDGE_PROMISE(setkeymap)
enum class Pledge : u32 {
#define __ENUMERATE_PLEDGE_PROMISE(x) x,
@ -334,10 +333,6 @@ public:
int sys$get_thread_name(pid_t tid, Userspace<char*> buffer, size_t buffer_size);
int sys$rename(Userspace<const Syscall::SC_rename_params*>);
int sys$mknod(Userspace<const Syscall::SC_mknod_params*>);
int sys$shbuf_create(int, void** buffer);
int sys$shbuf_allow_pid(int, pid_t peer_pid);
void* sys$shbuf_get(int shbuf_id, Userspace<size_t*> size);
int sys$shbuf_release(int shbuf_id);
int sys$halt();
int sys$reboot();
int sys$realpath(Userspace<const Syscall::SC_realpath_params*>);
@ -530,7 +525,6 @@ private:
KResultOr<RefPtr<FileDescription>> find_elf_interpreter_for_executable(const String& path, const Elf32_Ehdr& elf_header, int nread, size_t file_size);
int alloc_fd(int first_candidate_fd = 0);
void disown_all_shared_buffers();
KResult do_kill(Process&, int signal);
KResult do_killpg(ProcessGroupID pgrp, int signal);