Commit graph

17620 commits

Author SHA1 Message Date
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
Andreas Kling
1381720d1d UserspaceEmulator: Don't assume entire malloc block is chunked
Accesses in the header (or trailing padding) of a malloc block should
not be associated with any mallocation since only the chunk-sized slots
actually get returned by malloc.

Basically, allow address-to-chunk lookup to fail, and handle such
failures gracefully at call sites.

Fixes #5706.
2021-03-09 13:29:41 +01:00
Andreas Kling
38fc522f5d UserspaceEmulator: Don't audit accesses in calloc() and libsystem.so
These generate a lot of false positives and nothing of value.
2021-03-09 13:24:03 +01:00
Andreas Kling
a457b90733 UserspaceEmulator: Tidy up the MallocRegionMetadata construction a bit
Use designated initializers to make it very obvious what's being set,
and also give the metadata a backpointer to the region for convenience.
2021-03-09 12:00:53 +01:00
Andreas Kling
915e8dbe71 UserspaceEmulator: Defer marking MmapRegion as malloc block
We don't want to audit accesses into the region *while* we're setting
up malloc tracking for it. Fetching the chunk size from the header
was tripping up the auditing code.
2021-03-09 11:41:28 +01:00
Andreas Kling
0b5a915725 UserspaceEmulator: Keep the MMU regions list sorted 2021-03-09 11:31:18 +01:00
Andreas Kling
728d947601 UserspaceEmulator: Remember VM region names for MAP_ANONYMOUS
For some reason we only remembered the names of MAP_FILE mmap regions.
2021-03-09 11:31:18 +01:00
Andreas Kling
735a6482ac UserspaceEmulator: Implement sys$set_mmap_name() 2021-03-09 11:31:18 +01:00
Andreas Kling
b940dd4fa8 UserspaceEmulator: Never try to mprotect(PROT_EXEC) MmapRegion backing
We never want to map host memory executable anyway, so let's always
mask off the PROT_EXEC bit.
2021-03-09 11:31:18 +01:00
Andreas Kling
9588f01739 UserspaceEmulator+LibC: Use sys$emuctl() to pass malloc info to UE
Get rid of the awkward secret handshake sequence between malloc and UE
and simply use sys$emuctl() to notify UE of malloc, free and realloc.
2021-03-09 11:31:18 +01:00
Andreas Kling
4faeaf101c LibC: Don't scrub memory in malloc/free when running in UE
Since UE is keeping track of the heap anyway, we can skip the scrubbing
and drastically improve the speed of malloc and free when emulating.
2021-03-09 08:59:10 +01:00
Andreas Kling
84725ef3a5 Kernel+UserspaceEmulator: Add sys$emuctl() system call
This returns ENOSYS if you are running in the real kernel, and some
other result if you are running in UserspaceEmulator.

There are other ways we could check if we're inside an emulator, but
it seemed easier to just ask. :^)
2021-03-09 08:58:26 +01:00
Luke
d650b38eb9 LibWeb: Expose new CSS interfaces on the window object 2021-03-09 07:57:33 +01:00
Bui Quang Minh
ec063f4f63 HackStudio: Add language client check in identifier click 2021-03-09 07:54:30 +01:00