Truly independent web browser
Find a file
Luke 865f5ed4f6 Kernel: Prevent sign bit extension when creating a PDPTE
When doing the cast to u64 on the page directory physical address,
the sign bit was being extended. This only beomes an issue when
crossing the 2 GiB boundary. At >= 2 GiB, the physical address
has the sign bit set. For example, 0x80000000.

This set all the reserved bits in the PDPTE, causing a GPF
when loading the PDPT pointer into CR3. The reserved bits are
presumably there to stop you writing out a physical address that
the CPU physically cannot handle, as the size of the reserved bits
is determined by the physical address width of the CPU.

This fixes this by casting to FlatPtr instead. I believe the sign
extension only happens when casting to a bigger type. I'm also using
FlatPtr because it's a pointer we're writing into the PDPTE.
sizeof(FlatPtr) will always be the same size as sizeof(void*).

This also now asserts that the physical address in the PDPTE is
within the max physical address the CPU supports. This is better
than getting a GPF, because CPU::handle_crash tries to do the same
operation that caused the GPF in the first place. That would cause
an infinite loop of GPFs until the stack was exhausted, causing a
triple fault.

As far as I know and tested, I believe we can now use the full 32-bit
physical range without crashing.

Fixes #4584. See that issue for the full debugging story.
2020-12-30 20:33:15 +01:00
.github Build: Support non-i686 toolchains 2020-12-29 17:42:04 +01:00
AK AK: Add {Input,Output}FileStream 2020-12-30 13:31:55 +01:00
Applications CrashReporter: Show assertion message in backtrace, if any 2020-12-30 16:28:27 +01:00
Base Base: Add Amazon's intermediate root certificate (Server CA 1B) 2020-12-30 13:31:55 +01:00
Demos WidgetGallery: Tweak UI layout for "Modals" tab 2020-12-30 16:13:38 +01:00
DevTools Playground: Add autocomplete 2020-12-30 12:53:39 +01:00
Documentation Docs: Update WSL notes with some workarounds for known issues 2020-12-30 20:31:30 +01:00
Games LibGUI: Rewrite layout system in terms of min and max sizes 2020-12-30 01:36:41 +01:00
Kernel Kernel: Prevent sign bit extension when creating a PDPTE 2020-12-30 20:33:15 +01:00
Libraries LibC: Set "assertion" coredump metadata in __assertion_failed() 2020-12-30 16:28:27 +01:00
MenuApplets LibGUI: Rename AbstractSlider::on_value_changed => on_change 2020-12-30 15:20:47 +01:00
Meta Build: Expose symbols SECTION_start and SECTION_size for embedded resources. 2020-12-29 23:38:48 +01:00
Ports Build: Support non-i686 toolchains 2020-12-29 17:42:04 +01:00
Services WebContent: Pledge "recvfd" :^) 2020-12-30 15:21:29 +01:00
Shell Shell: Implement a very basic exec builtin 2020-12-30 02:13:53 +01:00
Toolchain Toolchain: Fix incorrect use of ENV{SERENITY_ARCH} in CMakeToolchain.txt 2020-12-30 20:30:43 +01:00
Userland ProtocolServer: Stream the downloaded data if possible 2020-12-30 13:31:55 +01:00
.clang-format
.gitattributes
.gitignore Revert "Meta: Remove catchall lines in .gitignore (#4565)" 2020-12-28 00:16:46 +01:00
.pre-commit-config.yaml Meta: Update lint-{clang-format,shell-scripts}.sh to take a list of files 2020-12-27 21:25:27 +01:00
.prettierignore Meta: Add lint-prettier.sh 2020-12-27 21:25:27 +01:00
.prettierrc
CMakeLists.txt Build: Support non-i686 toolchains 2020-12-29 17:42:04 +01:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Meta: s/Travis/GitHub Actions/ in CONTRIBUTING.md 2020-11-12 10:16:45 +01:00
LICENSE
ReadMe.md Meta: Add Brendan Coles to the contributors list :^) 2020-12-24 10:47:36 +01:00

SerenityOS

Graphical Unix-like operating system for x86 computers.

Build status Fuzzing Status

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.

I (Andreas) regularly post raw hacking sessions and demos on my YouTube channel.

Sometimes I write about the system on my github.io blog.

I'm also on Patreon and GitHub Sponsors if you would like to show some support that way.

Screenshot

Screenshot as of 8ea4375

Kernel features

  • x86 (32-bit) kernel with pre-emptive multi-threading
  • Hardware protections (SMEP, SMAP, UMIP, NX, WP, TSD, ...)
  • IPv4 stack with ARP, TCP, UDP and ICMP protocols
  • ext2 filesystem
  • POSIX signals
  • Purgeable memory
  • /proc filesystem
  • Pseudoterminals (with /dev/pts filesystem)
  • Filesystem notifications
  • CPU and memory profiling
  • SoundBlaster 16 driver
  • VMWare/QEMU mouse integration

System services

  • Launch/session daemon (SystemServer)
  • Compositing window server (WindowServer)
  • Text console manager (TTYServer)
  • DNS client (LookupServer)
  • Network protocols server (ProtocolServer)
  • Software-mixing sound daemon (AudioServer)
  • Desktop notifications (NotificationServer)
  • HTTP server (WebServer)
  • Telnet server (TelnetServer)
  • DHCP client (DHCPClient)

Libraries

  • C++ templates and containers (AK)
  • Event loop and utilities (LibCore)
  • 2D graphics library (LibGfx)
  • GUI toolkit (LibGUI)
  • Cross-process communication library (LibIPC)
  • HTML/CSS engine (LibWeb)
  • JavaScript engine (LibJS)
  • Markdown (LibMarkdown)
  • Audio (LibAudio)
  • PCI database (LibPCIDB)
  • Terminal emulation (LibVT)
  • Out-of-process network protocol I/O (LibProtocol)
  • Mathematical functions (LibM)
  • ELF file handling (LibELF)
  • POSIX threading (LibPthread)
  • Higher-level threading (LibThread)
  • Transport Layer Security (LibTLS)
  • HTTP and HTTPS (LibHTTP)

Userland features

  • Unix-like libc and userland
  • Shell with pipes and I/O redirection
  • On-line help system (both terminal and GUI variants)
  • Web browser (Browser)
  • C++ IDE (HackStudio)
  • IRC client
  • Desktop synthesizer (Piano)
  • Various desktop apps & games
  • Color themes

How do I read the documentation?

Man pages are browsable outside of SerenityOS under Base/usr/share/man.

When running SerenityOS you can use man for the terminal interface, or help for the GUI interface.

How do I build and run this?

See the SerenityOS build instructions

Before opening an issue

Please see the issue policy.

Communication hubs

The main hub is #serenityos on the Freenode IRC network.

We also have a project mailing list: serenityos-dev.

Author

Contributors

(And many more!) The people listed above have landed more than 100 commits in the project. :^)

License

SerenityOS is licensed under a 2-clause BSD license.