Commit graph

17556 commits

Author SHA1 Message Date
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
AnicJov
68f2ef1097 Ports: Add libogg
This library will allow us to port more multimedia programs and games,
since it's a common dependency of such projects. I was looking at
Scummvm's dependencies in particular, with a goal of porting them all
eventually, so that we can have Myst running in Serenity!
2021-03-09 07:29:35 +01:00
Tom
389dddd4b3 Meta: Add a build helper script
This script automatically manages the toolchain and cmake/ninja folders
making it easier to manage the different target architectures.
2021-03-09 07:28:59 +01:00
Mițca Dumitru
b07310dc8b LibM: Add nan{f, l} 2021-03-09 07:28:06 +01:00
Mițca Dumitru
efe4845c56 LibM: Implement more rounding functions
This patch implements the entire rint family, while taking into account
the current rounding mode, and implements ceil, round, trunc, and floor
for types which they weren't before.
2021-03-09 07:28:06 +01:00
Mițca Dumitru
88d342d007 LibM: Implement the frexp family 2021-03-09 07:28:06 +01:00
Mițca Dumitru
b274120b3c LibM: Implement copysign for float and long double 2021-03-09 07:28:06 +01:00
Mițca Dumitru
87b61b0eef LibM: Add scalbn and associated functions
Also implement ldexp in terms of them, and add ldexpl
2021-03-09 07:28:06 +01:00
Mițca Dumitru
8f7aa1e03a AK: Include Assertions.h in StdLibExtras.h 2021-03-09 07:28:06 +01:00
Mițca Dumitru
352b383280 LibM: Add ilogb and logb 2021-03-09 07:28:06 +01:00
Mițca Dumitru
190952675e LibM: Specialiase FloatExtractor for long double as well 2021-03-09 07:28:06 +01:00
Mițca Dumitru
a13f2b7df3 LibC: Add defines to float.h
This doesn't define FLT_EVAL_METHOD as I'm not sure what I should actually use for that
2021-03-09 07:28:06 +01:00
Mițca Dumitru
857b0e1dc3 LibC: Add imaxdiv and lldiv 2021-03-09 07:28:06 +01:00
Mițca Dumitru
42a8186728 LibM: Define floating point comparsion macros 2021-03-09 07:28:06 +01:00
Mițca Dumitru
70737b42b2 LibM: Define math_errhandling and associated macros 2021-03-09 07:28:06 +01:00