Ben Wiederhake
d5925f33aa
UserspaceEmulator: Implement set_process_name syscall
2021-03-11 08:54:54 +01:00
Ben Wiederhake
ec8e3edd05
UserspaceEmulator: Split large file into logical pieces
2021-03-11 08:54:54 +01:00
Luke
4477a0d6fd
LibWeb: Remove FIXME in is_javascript_mime_type_essence_match
...
This was misleading. The spec just wants us to check a string matches
a string in the JavaScript MIME type essence list. It doesn't want us
to parse the string as a MIME type to then use its essence for the
check.
Renames "mime_type" to "string" to make this less misleading.
2021-03-11 08:30:02 +01:00
Tom
929c90f8c8
Meta: Add gdb command to serenity.sh
...
This uses tmux for a split screen setup, which makes it easy do debug
the kernel while viewing the QEMU output in the same terminal.
2021-03-11 08:29:23 +01:00
Andreas Kling
de6c5128fd
Kernel: Move process pledge promises into protected data
2021-03-10 22:50:00 +01:00
Andreas Kling
37ad880660
Kernel: Move process "dumpable" flag into protected data
2021-03-10 22:42:07 +01:00
Andreas Kling
3d27269f13
Kernel: Move process parent PID into protected data :^)
2021-03-10 22:30:02 +01:00
Andreas Kling
d677a73b0e
Kernel: Move process extra_gids into protected data :^)
2021-03-10 22:30:02 +01:00
Andreas Kling
cbcf891040
Kernel: Move select Process members into protected memory
...
Process member variable like m_euid are very valuable targets for
kernel exploits and until now they have been writable at all times.
This patch moves m_euid along with a whole bunch of other members
into a new Process::ProtectedData struct. This struct is remapped
as read-only memory whenever we don't need to write to it.
This means that a kernel write primitive is no longer enough to
overwrite a process's effective UID, you must first unprotect the
protected data where the UID is stored. :^)
2021-03-10 22:30:02 +01:00
Andreas Kling
839d2d70a4
Kernel: Add non-const KBuffer::impl() getter
2021-03-10 22:30:02 +01:00
Andreas Kling
a77ecac900
fuzz-syscalls: Mark sys$emuctl() as someone who returns ENOSYS
...
This syscall is only relevant inside UserspaceEmulator and the kernel
will just return ENOSYS for it.
2021-03-10 16:36:11 +01:00
Andreas Kling
9b5c9efd73
Kernel: Build with -Wvla
...
Now that all use of VLA's (variable-length arrays) has been purged from
the kernel, let's make sure we don't reintroduce them.
2021-03-10 16:33:55 +01:00
Andreas Kling
e58a600d52
Kernel: Remove VLA usage in Ext2FS block traversal code
...
This was using up to 12KB of kernel stack in the triply indirect case
and looks generally spooky. Let's just allocate a ByteBuffer for now
and take the performance hit (of heap allocation). Longer term we can
reorganize the code to reduce the majority of the heap churn.
2021-03-10 16:33:47 +01:00
Andreas Kling
3dbb9c8448
Kernel: Turn a VLA into a statically-sized array in dump_backtrace()
2021-03-10 16:23:11 +01:00
Andreas Kling
ced8dfa037
UserspaceEmulator: Remove debug spam about tracked malloc blocks
2021-03-10 15:21:26 +01:00
Brendan Coles
0e18c7ffda
Documentation: Add Serenity installation guide for VMware
2021-03-10 11:59:32 +01:00
Andreas Kling
54f6436598
Kernel: Convert klog() => dmesgln() in TCPSocket
2021-03-09 23:06:47 +01:00
Andreas Kling
b007bc07b7
Kernel: Convert klog() => dmesgln() in MemoryManager
2021-03-09 22:44:04 +01:00
Andreas Kling
232738fb7a
Kernel: Use dbgln_if() and PANIC() in Thread.cpp
2021-03-09 22:35:51 +01:00
Andreas Kling
c67d550df1
Kernel: Convert klog() => dmesgln() in IPv4Socket
2021-03-09 22:25:09 +01:00
Andreas Kling
b12734cf13
Kernel: Convert klog() => dmesgln() in PageDirectory
2021-03-09 22:10:41 +01:00
Andreas Kling
65131334e7
Kernel: Convert klog() => dmesgln() in E1000NetworkAdapter
2021-03-09 22:10:41 +01:00
Andreas Kling
c8a8923842
Kernel: Convert klog() => dmesgln() in init()
2021-03-09 22:10:41 +01:00
Andreas Kling
ac1c01cc30
Kernel: Convert klog() => dmesgln() in ARP/routing code
2021-03-09 22:10:41 +01:00
Andreas Kling
aef6474ea7
Kernel: Convert klog() to dmesgln() in Region
2021-03-09 22:10:41 +01:00
Andreas Kling
4d30166d61
AK: Add Formatter for RefPtr
2021-03-09 22:10:41 +01:00
Andreas Kling
07564577c0
Kernel: Convert klog() => dmesgln() in AnonymousVMObject
2021-03-09 22:10:41 +01:00
Andreas Kling
db0bca4153
Kernel: Convert klog() => dmesgln() in HPET
2021-03-09 22:10:41 +01:00
Andreas Kling
ed8d68d8fe
Kernel: Convert klog() => dmesgln() in KernelRng
2021-03-09 22:10:41 +01:00
Andreas Kling
a906670d1c
Kernel: Convert klog() => dmesgln() in VMWareBackdoor
2021-03-09 22:10:41 +01:00
Andreas Kling
5fd3006db2
Kernel: Convert klog() => dmesgln() in PS2MouseDevice
2021-03-09 22:10:41 +01:00
Andreas Kling
52ef08081c
Kernel: Remove some unused things in kmalloc.cpp
2021-03-09 22:10:41 +01:00
Andreas Kling
cb4fcaa4b5
Kernel: Convert klog() => dmesgln() in kmalloc
2021-03-09 22:10:41 +01:00
Andreas Kling
10f10abaa3
Kernel: Convert klog() => dmesgln() in filesystem code
2021-03-09 22:10:41 +01:00
Andreas Kling
2fc684f6bc
Kernel: Remove ancient FIFO_DEBUG code
2021-03-09 22:10:41 +01:00
Ben Wiederhake
a265ea98b9
Utilities: Add a quotes database and 'fortunes' program
...
I told you, we need a quotes ~~page~~ file! :D
2021-03-09 22:10:30 +01:00
Andreas Kling
df621b9415
LibWeb: Run clang-format on CSS/Parser/StyleComponentValueRule.h
2021-03-09 20:06:52 +01:00
Andreas Kling
7c222d1bdf
LibWeb: Run clang-format on CSS/Parser/Token.h
2021-03-09 20:06:23 +01:00
Andreas Kling
5a050cb8d1
LibX86: Don't use "if (foo) [[unlikely]] { }" for now (to please clang)
2021-03-09 17:47:28 +01:00
Andreas Kling
ad152bfa59
LibWeb: Add a whole bunch of rule classes for the new CSS parser
...
Original work by @stelar7.
2021-03-09 17:36:21 +01:00
Andreas Kling
16cde3f14a
LibWeb: Rename CSSParser => DeprecatedCSSParser
2021-03-09 17:35:57 +01:00
Andreas Kling
078f0a5c67
LibWeb: Add specification-based CSS tokenizer
...
Original work by @stelar7 for #2628 .
2021-03-09 17:35:38 +01:00
Andreas Kling
82aea65bd3
UserspaceEmulator: Add fast-path for is<MmapRegion>()
...
Don't use default RTTI for these since they are performance-sensitive.
2021-03-09 15:17:15 +01:00
Andreas Kling
656cd477c2
UserspaceEmulator+LibX86: Sprinkle some [[unlikely]] and ALWAYS_INLINE
2021-03-09 15:10:08 +01:00
Andreas Kling
c192b6c61d
Emulator: Use libc.so bounds to fast-reject non-malloc addresses
...
The auditing code always starts by checking if we're in one of the
ignored code ranges (malloc, free, realloc, syscall, etc.)
To reduce the number of checks needed, we can cache the bounds of
the LibC text segment. This allows us to fast-reject addresses that
cannot possibly be a LibC function.
2021-03-09 15:01:08 +01:00
Brendan Coles
0c46918b73
UserspaceEmulator: Support FLDL2E / FLDPI, fix typos, use M_LN2 constant
2021-03-09 14:57:55 +01:00
Andreas Kling
54bd2ee738
UserspaceEmulator: Add Emulator::dump_regions() helper function
2021-03-09 14:44:54 +01:00
Andreas Kling
397f564144
UserspaceEmulator: Honor alignment requests in virt$mmap(MAP_RANDOMIZED)
2021-03-09 14:42:49 +01:00
Andreas Kling
0bf457f715
UserspaceEmulator: Add partial support for some more x87 instructions
...
Patch by @bcoles
2021-03-09 14:30:30 +01:00
Andreas Kling
57142a29a0
UserspaceEmulator: Don't set the MmapRegion malloc-block bit too early
...
We were setting it before the malloc metadata had been instantiated.
Fixes #5707 .
2021-03-09 13:57:17 +01:00