Brian Gianforcaro
c8ae244ab8
Kernel: Use Userspace<T> for the shbuf_get syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
e073f2b59e
Kernel: Use Userspace<T> for the get_thread_name syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
9652b0ae2b
Kernel: Use Userspace<T> for the set_thread_name syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
0e20a6df0a
Kernel: Use Userspace<T> for the connect syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
8bd9dbc220
Kernel: Use Userspace<T> for the accept syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
02660b5d60
Kernel: Use Userspace<T> for the bind syscall, and implementation
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
2bac7190c8
Kernel: Use Userspace<T> for the chmod syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
82bf6e8133
Kernel: Use Userspace<T> for the umount syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
317800324c
Kernel: Use Userspace<T> for the unlink syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
ecfe20efd2
Kernel: Use Userspace<T> for the sigpending syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
fbb26b28b9
Kernel: Use Userspace<T> for the sigprocmask syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
431145148e
Kernel: Use Userspace<T> for the fstat syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
8dd78201a4
Kernel: Use Userspace<T> for the uname syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
cfedd62b5c
Kernel: Use Userspace<T> for the sethostname syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
1d9554f470
Kernel: Use Userspace<T> for the gethostname syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
b069d757a3
Kernel: Use Userspace<T> for the clock_settime syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
1be6145fdf
Kernel: Modifiy clock_settime timespec argument to const
...
The timeppec paramter is read only, and should be const.
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
b4d04fd8d1
Kernel: Use Userspace<T> for the clock_gettime syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
48d9f3c2e6
Kernel: Use Userspace<T> for the getresgid syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
3ca18a88d7
Kernel: Use Userspace<T> for the getresuid syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
7943655838
Kernel: Use Userspace<T> for the times syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
e7728ca8fd
Kernel: Use Userspace<T> for the getgroups syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
80011cd62d
Kernel: Use Userspace<T> for the setgroups syscall
2020-08-10 12:52:15 +02:00
Brian Gianforcaro
0f42463eab
Kernel: Use Userspace<T> for the execve syscall
2020-08-10 12:52:15 +02:00
Ben Wiederhake
083671ef2c
Kernel: Fix PID/TID confusion in send_signal
...
This fixes the issue of a specific type of unkillable processes.
2020-08-10 11:51:45 +02:00
Ben Wiederhake
bee08a4b9f
Kernel: More PID/TID typing
2020-08-10 11:51:45 +02:00
Ben Wiederhake
7bdf54c837
Kernel: PID/PGID typing
...
This compiles, and fixes two bugs:
- setpgid() confusion (see previous commit)
- tcsetpgrp() now allows to set a non-empty process group even if
the group leader has already died. This makes Serenity slightly
more POSIX-compatible.
2020-08-10 11:51:45 +02:00
Ben Wiederhake
f5744a6f2f
Kernel: PID/TID typing
...
This compiles, and contains exactly the same bugs as before.
The regex 'FIXME: PID/' should reveal all markers that I left behind, including:
- Incomplete conversion
- Issues or things that look fishy
- Actual bugs that will go wrong during runtime
2020-08-10 11:51:45 +02:00
Brian Gianforcaro
2eae70b097
Kernel: Mark MSIHandler as final
2020-08-10 09:57:50 +02:00
Nico Weber
0586924bbd
LibELF+Lagom: Work towards getting LibELF in Lagom
...
Mostly -Wformat fixes, some of which pointed out real (if benign) bugs.
2020-08-09 21:12:54 +02:00
Benoît Lormeau
7b356c33cb
AK: Add a GenericLexer and extend the JsonParser with it ( #2696 )
2020-08-09 11:34:26 +02:00
Brian Gianforcaro
34dd8edcb3
Kernel: Decorate KResult and KResultOr<T> methods with [[nodiscard]]
...
This would have found my error propagation bug.
2020-08-09 00:13:39 +02:00
Brian Gianforcaro
fe64d97001
Kernel: Fix my result propagation bug @BenWiederhake spotted
...
In #3001 I was trying to fix result propagation issues, and
I actually just introduced another one. Luckily Ben spotted
it in the diff after it was in the tree, thanks Ben!
2020-08-09 00:13:39 +02:00
Brian Gianforcaro
35c745ca54
Kernel: Use Userspace<T> for the realpath syscall
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
30b2c0dc85
Kernel: Use Userspace<T> for the getsockopt syscall and Socket interface
...
The way getsockopt is implemented for socket types requires us to push
down Userspace<T> using into those interfaces. This change does so, and
utilizes proper copy implementations instead of the kind of haphazard
pointer dereferencing that was occurring there before.
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
6920d5f423
Kernel: Use Userspace<T> for the setsockopt syscall
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
8fa46bcb7d
Kernel: Use Userspace<T> for the getsockname syscall
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
dc75ea9fc2
Kernel: Use Userspace<T> for the getpeername syscall
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
0db669a9d2
Kernel: Use Userspace<T> for the chown syscall
2020-08-07 16:18:36 +02:00
Brian Gianforcaro
7e7ee2ec94
Kernel: Use Userspace<T> for the mount syscall
2020-08-07 16:18:36 +02:00
Valtteri Koskivuori
471083ca3d
ProcFS: Expose the current kernel keymap as /proc/keymap
...
Programs can now ask the kernel which keymap is in use by reading from /proc/keymap
2020-08-06 17:45:06 +02:00
Valtteri Koskivuori
00a0e525e6
Kernel+LibKeyboard: Store the keymap name when setting system keymap
...
This way we can query the kernel to see which keymap is currently in use.
2020-08-06 17:45:06 +02:00
Andreas Kling
3055f73d48
AK+Kernel+LibC: Add vdbgprintf()
...
This is like dbgprintf() except it takes a va_list instead of ...
2020-08-06 13:36:06 +02:00
Andreas Kling
ddab7ab693
Kernel: Store TTY's foreground process as a WeakPtr<Process>
...
This ensures that we don't leave a stale PGID assigned to the TTY after
the process exits, which would make PID recycling attacks possible.
2020-08-06 11:17:53 +02:00
AnotherTest
05972668d1
Kernel: Send a SIGCHLD to the parent upon suspension of a process
...
...that is controlling a TTY.
2020-08-06 10:35:22 +02:00
asynts
b3d1a05261
Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)
...
This function did a const_cast internally which made the call side look
"safe". This method is removed completely and call sites are replaced
with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the
behaviour obvious.
2020-08-06 10:33:16 +02:00
Brian Gianforcaro
7e6fbef8db
Kernel: Partial usage of Userspace<T> for the poll syscall
...
This change mostly converts poll to Userspace<T> with the caveat
of the fds member of SC_poll_params. It's current usage is a bit
too gnarly for me to take on right now, this appears to need a lot
more love.
In addition to enlightening the syscall to use Userspace<T>, I've
also re-worked most of the handling to use validate_read_and_copy
instead of just directly de-referencing the user pointer. We also
appeared to be missing a re-evaluation of the fds array after the
thread block is awoken.
2020-08-06 10:22:44 +02:00
Tom
41d2a0e9f7
Kernel: Dequeue dying threads from WaitQueue
...
If a thread is waiting but getting killed, we need to dequeue
the thread from the WaitQueue so that a potential wake before
finalization doesn't happen.
2020-08-06 10:02:55 +02:00
Nico Weber
ce95628b7f
Unicode: Try s/codepoint/code_point/g again
...
This time, without trailing 's'. Ran:
git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00
Nico Weber
19ac1f6368
Revert "Unicode: s/codepoint/code_point/g"
...
This reverts commit ea9ac3155d
.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00