ladybird/Userland/Utilities
Daniel Bertalan 77f9272aaf Kernel+UE: Add MAP_FIXED_NOREPLACE mmap() flag
This feature was introduced in version 4.17 of the Linux kernel, and
while it's not specified by POSIX, I think it will be a nice addition to
our system.

MAP_FIXED_NOREPLACE provides a less error-prone alternative to
MAP_FIXED: while regular fixed mappings would cause any intersecting
ranges to be unmapped, MAP_FIXED_NOREPLACE returns EEXIST instead. This
ensures that we don't corrupt our process's address space if something
is already at the requested address.

Note that the more portable way to do this is to use regular
MAP_ANONYMOUS, and check afterwards whether the returned address matches
what we wanted. This, however, has a large performance impact on
programs like Wine which try to reserve large portions of the address
space at once, as the non-matching addresses have to be unmapped
separately.
2021-12-23 23:08:10 +01:00
..
abench.cpp Utilites: Add abench utility 2021-11-28 13:33:51 -08:00
adjtime.cpp adjtime: Drop unnecessary privileges unconditionally 2021-10-21 15:41:22 +01:00
allocate.cpp allocate: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
aplay.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
arp.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
asctl.cpp LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
base64.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
basename.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
beep.cpp
blockdev.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
bt.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
cal.cpp cal: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
cat.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
checksum.cpp checksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
chgrp.cpp chgrp: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
chmod.cpp chmod+mkdir: Use convert_to_uint_from_octal 2021-12-21 13:13:04 -08:00
chown.cpp chown: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
chres.cpp chres: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
cksum.cpp cksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
clear.cpp clear: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
CMakeLists.txt mkdir: Use LibMain 2021-12-21 13:13:04 -08:00
comm.cpp comm: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
config.cpp config: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
copy.cpp copy: Port to LibMain :^) 2021-11-25 21:41:02 +01:00
cp.cpp cp: Print proper error message with strerror 2021-12-20 10:40:02 -08:00
cpp-lexer.cpp cpp-lexer: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
cpp-parser.cpp cpp-parser: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
cpp-preprocessor.cpp cpp-processor: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
cut.cpp cut: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
date.cpp date: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
dd.cpp dd: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
ddate.cpp ddate: Port to LibMain 2021-12-16 02:10:47 -08:00
df.cpp df: Port to LibMain 2021-12-16 02:10:47 -08:00
diff.cpp diff: Port to LibMain 2021-12-16 02:10:47 -08:00
dirname.cpp dirname: Port to LibMain 2021-12-16 02:10:47 -08:00
disasm.cpp LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
disk_benchmark.cpp
dmesg.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
du.cpp
echo.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
env.cpp
errno.cpp LibCore: Use ErrorOr<T> for Core::File::open() 2021-11-08 00:35:27 +01:00
expr.cpp expr: Use StringView literals more (instead of raw C strings) 2021-12-16 02:10:47 -08:00
false.cpp
fdtdump.cpp fdtdump: Port to LibMain 2021-12-16 02:10:47 -08:00
fgrep.cpp Utilities: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
file.cpp file: Add description & image details for image/x-qoi 2021-12-21 13:27:27 +01:00
find.cpp find: Implement support for multiple directories 2021-12-03 15:39:00 +01:00
flock.cpp flock: Port to LibMain 2021-12-16 02:10:47 -08:00
fortune.cpp fortune: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
functrace.cpp functrace: Port to LibMain and move away from raw C strings 2021-12-16 02:10:47 -08:00
gml-format.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
grep.cpp Utilities/grep: Implement using multiple patterns 2021-11-13 11:42:26 +01:00
gron.cpp gron: Use StringView literals more (instead of raw C strings) 2021-12-04 14:24:04 +01:00
groupadd.cpp
groupdel.cpp Utilities: Fix null deref in groupdel when given a nonexistent group 2021-10-10 03:10:05 -07:00
groups.cpp groups: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
gunzip.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
gzip.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
head.cpp
hexdump.cpp Hexdump: Add verbose option 2021-11-19 12:17:57 +03:30
host.cpp
hostname.cpp
id.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
ifconfig.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
ini.cpp
jp.cpp jp: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
js.cpp Userland: Add unveil/pledge requisites for dynamic Unicode data loading 2021-12-21 13:09:49 -08:00
kcov-example.cpp kcov-example: Print helpful error if kcov feature is missing 2021-11-21 13:52:25 +01:00
keymap.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
kill.cpp
killall.cpp
less.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
ln.cpp Utilities: Add -f option to ln 2021-10-23 15:06:33 +02:00
logout.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
ls.cpp ls: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
lsirq.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
lsof.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
lspci.cpp lspci: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
lsusb.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
man.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
markdown-check.cpp man.serenityos.org: Use pandoc for listings and landing page 2021-10-22 19:49:28 +03:00
matroska.cpp
md.cpp
mkdir.cpp chmod+mkdir: Use convert_to_uint_from_octal 2021-12-21 13:13:04 -08:00
mkfifo.cpp
mknod.cpp
mktemp.cpp
mount.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
mv.cpp LibCore: Use ErrorOr<T> for Core::File::open() 2021-11-08 00:35:27 +01:00
nc.cpp
netstat.cpp netstat: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
nl.cpp
notify.cpp Userland/Notify: Check if optional icon arg is null before loading 2021-12-19 00:50:53 -08:00
nproc.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
ntpquery.cpp
open.cpp
pape.cpp pape: Add set-random option 2021-11-08 16:36:02 -08:00
passwd.cpp LibCore+passwd+usermod: Make Core::Account::sync() return ErrorOr<void> 2021-12-16 22:48:17 +01:00
paste.cpp LibGUI+Everywhere: Make sync requests to Clipboard server more obvious 2021-11-21 11:49:06 +00:00
pathchk.cpp
pgrep.cpp LibRegex: Don't push LibRegex's "Error" into the global namespace 2021-11-08 00:35:27 +01:00
pidof.cpp
ping.cpp Utilities: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
pls.cpp pls: Port to LibMain :^) 2021-12-16 22:48:17 +01:00
pmap.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
printf.cpp LibC+AK: Implement all sorts of wprintf variants 2021-12-21 21:24:36 +03:30
pro.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
profile.cpp profile: Don't treat '--help' as an error 2021-11-01 21:12:58 +01:00
ps.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
purge.cpp
pwd.cpp
readelf.cpp LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
readlink.cpp
realpath.cpp
reboot.cpp
rev.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
rm.cpp LibCore: Use ErrorOr<T> for Core::File::remove() 2021-11-08 00:35:27 +01:00
rmdir.cpp
run-tests.cpp LibRegex: Don't push LibRegex's "Error" into the global namespace 2021-11-08 00:35:27 +01:00
seq.cpp
shot.cpp shot: Fix hanging due to zero sized Rect 2021-11-05 00:10:23 +01:00
shuf.cpp shuf: Fix division by zero when no lines are read 2021-10-17 12:07:09 -07:00
shutdown.cpp
sleep.cpp
sort.cpp
sql.cpp LibCore: Use ErrorOr<T> for Core::File::open() 2021-11-08 00:35:27 +01:00
stat.cpp stat: Modernize slightly :^) 2021-12-04 14:24:04 +01:00
strace.cpp Kernel+UE: Add MAP_FIXED_NOREPLACE mmap() flag 2021-12-23 23:08:10 +01:00
stty.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
su.cpp su: Port to LibMain :^) 2021-12-16 22:48:17 +01:00
sync.cpp
syscall.cpp Kernel+LibC: Move errno definitions to Kernel/API/POSIX 2021-12-16 22:21:35 +03:30
sysctl.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
tac.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
tail.cpp
tar.cpp tar: Support extracting symlinks 2021-11-22 21:57:42 +01:00
tee.cpp
telws.cpp AK+Everywhere: Make Base64 decoding fallible 2021-10-23 19:16:40 +01:00
test-bindtodevice.cpp
test-crypto.cpp test-crypto: Avoid implicitly copying ByteBuffer 2021-12-08 09:46:13 -08:00
test-fuzz.cpp Meta: Add a fuzzer for the QOILoader 2021-12-21 13:27:27 +01:00
test-imap.cpp LibCore: Use ErrorOr<T> for Core::get_password() 2021-11-08 00:35:27 +01:00
test-pthread.cpp
test-unveil.cpp
test.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
test_env.cpp
top.cpp top: Use Core::System::ioctl() 2021-11-30 23:34:40 +01:00
touch.cpp touch: Port to LibMain :^) 2021-12-20 22:16:05 +01:00
tr.cpp Utilities/tr: Rework squeezing to be supported during more operations 2021-11-13 23:34:49 +01:00
traceroute.cpp
tree.cpp
true.cpp
truncate.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
tt.cpp Utilities: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
tty.cpp
umount.cpp
uname.cpp
uniq.cpp
unzip.cpp LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
uptime.cpp
useradd.cpp
userdel.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
usermod.cpp LibCore+passwd+usermod: Make Core::Account::sync() return ErrorOr<void> 2021-12-16 22:48:17 +01:00
utmpupdate.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
w.cpp Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
wasm.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
watch.cpp watch: Port to LibMain 2021-12-19 18:26:57 -08:00
wc.cpp Revert "wc: Count last line even if it doesn't end in newline" 2021-10-31 21:07:29 +01:00
which.cpp
whoami.cpp whoami: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
wsctl.cpp
xargs.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
yes.cpp Utilities: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
zip.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00