ladybird/Kernel/Syscalls
Ben Wiederhake c05c5a7ff4 Kernel: Clarify ambiguous {File,Description}::absolute_path
Found due to smelly code in InodeFile::absolute_path.

In particular, this replaces the following misleading methods:

File::absolute_path
This method *never* returns an actual path, and if called on an
InodeFile (which is impossible), it would VERIFY_NOT_REACHED().

OpenFileDescription::try_serialize_absolute_path
OpenFileDescription::absolute_path
These methods do not guarantee to return an actual path (just like the
other method), and just like Custody::absolute_path they do not
guarantee accuracy. In particular, just renaming the method made a
TOCTOU bug obvious.

The new method signatures use KResultOr, just like
try_serialize_absolute_path() already did.
2021-10-31 12:06:28 +01:00
..
access.cpp Kernel: Use TRY() in sys$access() 2021-09-05 16:25:40 +02:00
alarm.cpp Kernel: Use TRY() in sys$alarm() 2021-09-06 13:06:05 +02:00
anon_create.cpp Kernel: Rename FileDescription => OpenFileDescription 2021-09-07 13:53:14 +02:00
beep.cpp Kernel: Disable big process lock for sys$beep() 2021-08-06 23:36:12 +02:00
chdir.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
chmod.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
chown.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
clock.cpp Kernel: Make copy_time_from_user() helpers use KResultOr<Time> 2021-09-07 01:18:02 +02:00
debug.cpp Kernel: Use TRY() in sys$dbgputstr() 2021-09-05 18:15:05 +02:00
disown.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
dup2.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
emuctl.cpp Kernel: Annotate all syscalls with VERIFY_PROCESS_BIG_LOCK_ACQUIRED 2021-07-20 03:21:14 +02:00
execve.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
exit.cpp Kernel: Fix a few typos 2021-10-01 00:51:49 +01:00
fcntl.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
fork.cpp Kernel: Rename FileDescription => OpenFileDescription 2021-09-07 13:53:14 +02:00
fsync.cpp Kernel+LibC: Implement fsync 2021-09-12 11:24:02 +02:00
ftruncate.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
futex.cpp Kernel: Make copy_time_from_user() helpers use KResultOr<Time> 2021-09-07 01:18:02 +02:00
get_dir_entries.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
get_stack_bounds.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
getrandom.cpp Kernel: Use TRY() in sys$getrandom() 2021-09-06 02:36:21 +02:00
getuid.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
hostname.cpp Kernel: Use TRY() in sys$sethostname() 2021-09-05 18:22:18 +02:00
inode_watcher.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
ioctl.cpp Kernel: Correctly interpret ioctl's FIONBIO user value 2021-10-11 10:46:01 -07:00
keymap.cpp Kernel: Use TRY() in sys$setkeymap() 2021-09-05 18:15:05 +02:00
kill.cpp Kernel: Guard the all processes list with a Spinlock rather than a Mutex 2021-08-28 20:53:38 +02:00
link.cpp Kernel: Use copy_typed_from_user<T> for fetching syscall parameters 2021-09-05 17:51:37 +02:00
lseek.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
mkdir.cpp Kernel: Use TRY() in sys$mkdir() 2021-09-05 16:25:40 +02:00
mknod.cpp Kernel: Use copy_typed_from_user<T> for fetching syscall parameters 2021-09-05 17:51:37 +02:00
mmap.cpp Kernel: Split SmapDisabler so header is platform independent 2021-10-15 21:48:45 +01:00
mount.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
open.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
perf_event.cpp Kernel: Use TRY() in sys$perf_register_string() 2021-09-05 18:15:05 +02:00
pipe.cpp Kernel: Add support for O_NONBLOCK in pipe syscall 2021-09-19 12:20:16 +02:00
pledge.cpp Kernel: Use TRY() in sys$pledge() 2021-09-05 18:15:05 +02:00
prctl.cpp Kernel: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
process.cpp Kernel: Store process names as KString 2021-09-07 13:53:14 +02:00
profiling.cpp Everywhere: Core dump => Coredump 2021-08-23 00:02:09 +02:00
ptrace.cpp Kernel: Rename ProcessPagingScope => ScopedAddressSpaceSwitcher 2021-09-06 18:56:51 +02:00
purge.cpp Kernel: Access MemoryManager static functions statically 2021-10-02 18:16:15 +02:00
read.cpp Kernel: Implement pread syscall 2021-10-13 16:10:50 +02:00
readlink.cpp Kernel: Use TRY() in sys$readlink() 2021-09-05 17:55:43 +02:00
realpath.cpp Kernel: Improvements to Custody absolute path serialization 2021-09-06 13:06:05 +02:00
rename.cpp Kernel: Use TRY() in sys$rename() 2021-09-05 17:53:59 +02:00
rmdir.cpp Kernel: Use TRY() in sys$rmdir() 2021-09-05 17:54:33 +02:00
sched.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
select.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
sendfd.cpp Kernel: Use move semantics in sys$sendfd() 2021-09-15 21:09:47 +02:00
setpgid.cpp Kernel: Use KResultOr better in ProcessGroup construction 2021-09-06 01:55:27 +02:00
setuid.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
sigaction.cpp Kernel: Split SmapDisabler so header is platform independent 2021-10-15 21:48:45 +01:00
socket.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
stat.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
statvfs.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
sync.cpp Kernel: Disable big process lock for sys$sync 2021-08-07 15:30:26 +02:00
sysconf.cpp Kernel: Add _SC_HOST_NAME_MAX 2021-09-11 00:28:39 +02:00
thread.cpp Kernel: Store process names as KString 2021-09-07 13:53:14 +02:00
times.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
ttyname.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00
umask.cpp Kernel/Process: Move protected values to the end of the object 2021-08-12 20:57:32 +02:00
uname.cpp Kernel: Make copy_{from,to}_user() return KResult and use TRY() 2021-09-05 17:38:37 +02:00
unlink.cpp Kernel: Use TRY() in sys$unlink() 2021-09-05 17:56:40 +02:00
unveil.cpp Kernel: Make KString factories return KResultOr + use TRY() everywhere 2021-09-06 19:25:36 +02:00
utime.cpp Kernel: Use TRY() in sys$utime() 2021-09-05 17:53:28 +02:00
waitid.cpp Kernel: Use AK::Variant default initialization where appropriate 2021-09-21 04:22:52 +04:30
write.cpp Kernel: Rename file_description(fd) => open_file_description(fd) 2021-09-07 13:53:14 +02:00