567 Commits
Author SHA1 Message Date
Lucas Chollet 5f37b60744 SSHServer+LibSSH: Read the host keys from /etc/ssh/
This will allow SSHServer to have a stable private key without using
--unsafe-stub-private-key. We already had support for reading public
keys and this commit adds support for openssh's proprietary private key
file format. It is unfortunately not standardized, and while I
considered using a custom file format I think that being compatible with
`ssh-keygen` is better for the moment.
2026-08-22 21:49:12 +02:00
Sönke Holz e5a7173492 Documentation: Update list of required and supported RISC-V extensions
We started conditionally using Svpbmt in a2f75c5f5e, Zicbom in
f0af457011, and Zkr in 048ba5b4d0.
2026-08-18 09:25:44 -04:00
Sönke Holz e22c1f2df8 Kernel/Net: Integrate the E1000E driver into the E1000 driver
This removes quite a bit of duplicate code.
The only real remaining difference between the E1000 driver and its
subclassed E1000E driver is that the E1000E driver supports MDIO
access.

Keeping track of hardware differences in a m_hardware_features member
seems better than adding new subclasses.
2026-07-19 18:10:12 +02:00
Lucas Chollet b055d7ed31 Documentation: Add a document to explain how to connect to SSHServer 2026-04-08 13:43:19 +02:00
Liav A. 2a4a096e0f Kernel+runc: Make unshare syscalls more fd-oriented
Instead of creating a new resource that has its own ID number and work
with it directly, we can create a file that describes the unshared
resource, execute ioctl calls on it and only enter into it in the end,
essentially creating the resource only during the last call instead
of the previous method of creation of a resource when "attaching" to
that resource.

We can enter a resource for current program execution, after the exec
syscall, or both.
That change allows userspace to create a resource and attach to it only
in the new program, which makes it more comfortable to do cleanups or
track the new process, outside of the created container.

It should be noted that until this commit, we entered a resource without
detaching the old one, essentially leaking the attach counter of a
resource. While this bug didn't have severe effects, it was obvious that
a proper cleanup userspace code later on wouldn't work in that situation
anyway, so this commit changes the way we work, and the terminology of
entering a resource is actually to **replace** it.

These changes essentially open an opportunity to extend runc to be a
container manager rather being launcher of a containerized environment,
which makes it possible to do all sorts of nice cleanups and tracking of
containers' states.
2026-03-14 11:45:37 +01:00
Liav A. 1a4e055920 Documentation: Lint Kernel/Containers.md file 2026-03-14 11:45:37 +01:00
Lucas Chollet cc0939a666 Everywhere: Stop using pc in our target triples
While `pc` is not particularly wrong on x86_64, it's nonsensical on
other supported platforms, namely aarch64 and riscv64.

For consistency, we now don't use this vendor anymore, regardless of the
platform.

Within the LLVM project, we now build as `$arch-serenity`. This is
enough in most cases, the only place where we have to specify a vendor
is the target .cfg file where we use `$arch-unknown-serenity`.

When building GCC and friends, again we simply identify as
`$arch-serenity` and this is enough.

As a result, the tools in Toolchain/Local/$arch/bin are now named after
this pattern: `$arch-serenity-$tool`.

These changes affect the toolchain build scripts, serenity's build
scripts and the Ports.

The last place where we should see `x86_64-pc-serenity` is the output of
`config.sub`, which assume the vendor is `pc` on vendor-less `x86*`
triples. So `x86_64-serenity` is expanded to `x86_64-pc-serenity`,
luckily enough and AFAICT, the whole GNU ecosystem considers `pc`,
`unknown` and vendor-less target triples the same. So `configure`
shouldn't have an issue finding the right tools anyway.

The gn files were edited with sed and are not tested.

This commit also includes a check in `Meta/serenity.sh` to give a nicer
error message when trying to build the system with an old toolchain.

----

To test this patch, on a clean tree I:
 - Ran `./Meta/serenity.sh x86_64 GNU`
 - Ran `./Toolchain/BuildJakt.sh`
 - Tested these ports: python3(configure based), libjxl(cmake based) and
   rizin(meson based)
 - Also booted on aarch64 and risv64

I also repeated the steps above with a Clang toolchain.

On a working tree I tested all the affected ports, the results are:
 - tinycc build fine but can't compile programs, I observed the same on
   master.
 - gdb and epsilon don't build but report the same errors as on master.
 - I manually edited the libgpg-error, and it builds fine.
 - The gcc port works fine.
2026-03-13 20:59:49 +01:00
Sönke Holz 52a88a8ea8 Everywhere: Stop building with -fsigned-char
Ports aren't guaranteed to compile with `-fsigned-char`, resulting in
them using a different incompatible ABI when using serenity libraries.
I think we should rather follow the target architecture ABI than
assuming that `char` is signed.

Building without `-fsigned-char` only required a couple of small changes
to prevent -Wtype-limits warnings.
2026-02-08 15:51:33 +01:00
Sönke Holz 3c8233af08 Everywhere: Move to C++26 2026-01-04 13:47:22 +01:00
Sönke Holz ddeebc09a5 Meta: Require at least GCC 14
This will be necessary for moving to C++26.
2026-01-04 13:47:22 +01:00
garry00107 4b88cbb93e Documentation: Clarify macOS build requirements and improve instructions
- Clarify that Command Line Tools are sufficient without full Xcode
- Update 'System Preferences' to 'System Settings' for modern macOS
- Add 'Next Steps' section linking to main build instructions
- Improve wording around Xcode requirements
2025-11-15 08:07:21 -05:00
Sönke Holz e62b601134 Meta+Documentation: Combine all Raspberry Pi disk images into one
Instead of having a separate disk image target for the Pi 4, we can
conditionally build a disk image that uses EDK II on Pi 4 if RPI_EFI.fd
was built for it.
If that file wasn't found, print a warning that the disk image won't
work on Pi 4.
2025-10-12 16:07:33 -04:00
Lucas CHOLLET 8a3f29fe9e Meta: Switch to clang-format-20 as the standard formatter 2025-10-10 00:02:50 +02:00
Sönke Holz a122dafc5a Documentation: Document the RISC-V port
This documents the current state of the RISC-V port and notes current
limitations and what extensions are required.
2025-08-26 00:38:16 +02:00
Sönke Holz 82b46b7b26 Ladybird: Remove the Qt Multimedia audio plugin
Now that ladybird was moved moved to its own repository, we don't need
to keep unnecessary features like the Qt Multimedia audio backend.
This means that PulseAudio is now required to have working audio in the
Qt chrome.

Ladybird only still exists in the SerenityOS repo to make testing LibWeb
easier.
2025-08-10 17:38:01 +02:00
Sönke Holz bd261325f8 Documentation: Delete leftover images from Pi 3 netboot guide
I forgot to delete these files in 0d2c2445ca.
2025-08-06 08:30:00 -04:00
Sönke Holz 9b753077c3 Meta: Split serial console guide into a separate section
Now that we boot to desktop on the Pi 4 and 5, connecting a serial cable
is not absolutely necessary anymore.
2025-08-05 17:32:25 +02:00
Sönke Holz 276bd0a467 Meta: Add instructions for building an EDK II-based Pi 4 image
Remove the paragraph mentioning support for the USB Type-C ports
entirely, as using them was just a workaround until we support the
Type-A ports. That paragraph also makes running SerenityOS on Raspberry
Pis sound scarier than it actually is.
2025-08-05 17:32:25 +02:00
Sönke Holz 19a20e6b03 Everywhere: Replace discord.gg/serenityos with serenityos.org/discord
This redirect should be more stable than the current
discord.gg/serenityos custom invite link.
2025-06-25 20:53:07 +02:00
Hendiadyoin1 c5d713864b Meta+Kernel: Enable -fno-sanitize-recover=undefined by default
This makes the Kernel UBSan deadly by compile time,
it can be made recoverable by setting
`ENABLE_KERNEL_UNDEFINED_SANITIZER_ALWAYS_DEADLY` to `OFF` in the
CMake options, and the `ubsan_is_deadly` sysctl option to `0`.
2025-06-20 23:22:07 +02:00
Cameron Youell 35fd7a6770 Documentation: Update Ubuntu dependencies
Closes #25916
2025-05-31 18:19:27 +02:00
Sönke Holz a0ee48ce87 Documentation: Add Raspberry Pi 4 and 5 USB installation instructions
We currently only boot to desktop when using a USB drive, so update
the guide to mention that.
2025-05-31 18:04:45 +02:00
Sönke Holz 0d2c2445ca Documentation: Remove the Raspberry Pi 3 netboot guide
Only the Pi 4 and 5 currently boot to the desktop, so having a Pi 3-only
netbooting guide is a bit confusing. I don't have a Windows machine, so
I also can't update the guide easily.
2025-05-31 18:04:45 +02:00
Sönke Holz fe62c0fb9d Documentation: Tweak Raspberry Pi QEMU booting guide
Since ee891462b8 the default machine is no longer a Raspberry Pi.
Also remove some unnecessary comparisons to the x86 version and mention
that it should boot to the desktop.
2025-05-31 18:04:45 +02:00
theonlyasdk 80f586503d Documentation: Update Fedora package group names
Replaced deprecated package group names in Fedora's
prerequisites install command with updated group names.
2025-05-11 19:31:03 +02:00
matyalatte 011830eebc Ports: Add msttcorefonts 2025-05-10 00:06:02 +02:00
implicitfield cddb8cc424 Everywhere: Make the FUSE device a generic device 2025-04-27 11:01:18 +02:00
Sönke Holz 85353a1a02 Documentation: Remove rarely updated hardware compatibility list
This document was rarely updated and refers to hardware that is no
longer supported: ATA drives.
USB might also work on these machines now.
2025-04-09 22:38:05 -04:00
Sönke Holz d905956fc5 Documentation: Update the bare metal installation guide
This guide previously referred to no longer supported hardware and
quirks that are no longer necessary.

We also have USB and UEFI support now, so tweak the text accordingly.
2025-04-09 22:38:05 -04:00
Sönke Holz dfa746236a Documentation: Remove an outdated note from RunningOnRaspberryPi.md
The framebuffer works now on both the Pi 3 and 4.
2025-03-22 12:54:53 +01:00
Sönke Holz c544f979f0 Meta: Add a script for building Raspberry Pi 3 and 4 images 2025-03-22 12:54:53 +01:00
kleines Filmröllchen 9ae2dd5596 Documentation: Consolidate and extend clangd configuration docs
These were previously spread over multiple editor documentation files,
so we consolidate them into one while dropping outdated (or unexplained)
options. A new ClangdConfiguration file is created that will house the
common config.

Furthermore, since clangd 20 supports the header style options
(implemented by yours truly), document that this feature is now
available and what AngledHeaders globs to use for Serenity specifically.
2025-03-12 17:37:37 -04:00
Sönke Holz 719caa89fa Meta: Add a script for building x86-64 UEFI GRUB disk images
This script is mostly based on build-image-grub.sh.
Unlike that script, it uses the EFIPrekernel instead of the multiboot
prekernel.
2025-03-03 18:47:10 +01:00
Sönke Holz 9ba55f90fc Meta: Make some disk image targets x86-64-only
These targets only work on x86-64, so only define them if SERENITY_ARCH
is set to x86_64.
2025-03-03 18:47:10 +01:00
Vinicius Deolindo fb897913bb Nix: Add the necessary packages/build inputs for building on Darwin 2025-02-28 15:52:26 +01:00
Andrew Kaster 89c655529c Documentation: Promote aarch64 to more supported in the docs 2024-12-30 12:56:52 +01:00
Serge Croisé e3826bf791 Documentation: Fix typos in SmartPointers.md 2024-12-19 19:14:47 -05:00
Ninad Sachania 6f9cdc377e Documentation: Make the SerenityOS Patterns documentation more idiomatic 2024-11-26 14:30:25 -05:00
Nico Weber eaec863b94 Documentation: Don't use std:: in examples
We don't use `std::swap()`, so don't mention it in documentation :^)
2024-11-26 08:52:43 -05:00
Luke Wilde 772be9dec0 LibWeb: Generate IDL attributes for all supported CSS properties
The CSSOM spec tells us to potentially add up to three different IDL
attributes to CSSStyleDeclaration for every CSS property we support:
- A camelCased attribute, where a dash indicates the next character
  should be uppercase
- A camelCased attribute for every -webkit- prefixed property, with the
  first letter always being lowercase
- A dashed-attribute for every property with a dash in it.

Additionally, every attribute must have the CEReactions and
LegacyNullToEmptyString extended attributes specified on it.

Since we specify every property we support with Properties.json, we can
use that file to generate the IDL file and it's implementation.

We import it from the Build directory with the help of multiple import
base paths. Then, we add it to CSSStyleDeclaration via the mixin
functionality and inheriting the generated class in
CSSStyleDeclaration.

(cherry picked from commit aacf9b08ed8c4286c84145b52fa70f399ed0bdff;
amended to fix tiny conflict in libweb_generators.cmake, and to change
the default value of all gap-related properties from 'auto' to 'normal'
since serenity does not yet have LadybirdBrowser/ladybird#2253 and
cherry-picking that has a pretty long dependency tree. It's easy to
update the test once that is cherry-picked)
2024-11-23 22:07:22 -05:00
Sönke Holz d3a0ae5c57 Kernel/MM: Replace Region::Cacheable with a more generic MemoryType enum
This replaces all usages of Cacheable::Yes with MemoryType::Normal and
Cacheable::No with either MemoryType::NonCacheable or MemoryType::IO,
depending on the context.

The Page{Directory,Table}::set_cache_disabled function therefore also
has been replaced with a more appropriate set_memory_type_function.
Adding a memory_type "getter" would not be as easy, as some
architectures may not support all memory types, so getting the memory
type again may be a lossy conversion. The is_cache_disabled function
was never used, so just simply remove it altogether.

There is no difference between MemoryType::NonCacheable and
MemoryType::IO on x86 for now.

Other architectures currently don't respect the MemoryType at all.
2024-11-23 19:29:50 +01:00
Jamlee 3375f7d9d9 Document: Modify the storage type of VirtualBox
It has been verified on both Windows10/VirtualBox6.1.2 and
Linux/VirtualBox7.0.6 that IDE (PIIX4) fails to start SerenityOS,
but SATA can.
2024-10-31 21:53:12 -04:00
Vroumm 509de86ba6 Documentation: Remove unnecessary newline in documentation
The commit removes an unnecessary newline character in the
documentation that was breaking the bold formatting.

(cherry picked from commit 23428c0b9ace27e989ee90109d336852786e3155)
2024-10-31 19:57:33 -04:00
Sam Atkins d76b7744fd LibWeb/CSS: Implement legacy name aliases for properties
When a property is a "legacy name alias", any time it is used in CSS or
via the CSSOM its aliased name is used instead.
(See https://drafts.csswg.org/css-cascade-5/#legacy-name-alias)

This means we only care about the alias when parsing a string as a
PropertyID - and we can just return the PropertyID it is an alias for.
No need for a distinct PropertyID for it, and no need for LibWeb to
care about it at all.

Previously, we had a bunch of these properties, which misused our code
for "logical aliases", some of which I've discovered were not even
fully implemented. But with this change, all that code can go away, and
making a legacy alias is just a case of putting it in the JSON. This
also shrinks `StyleProperties` as it doesn't need to contain data for
these aliases, and removes a whole load of `-webkit-*` spam from the
style inspector.

(cherry picked from commit fdcece2e88b91b9ec6cf63c3466525fb77540316;
amended to:
* resolve a conflict on height: in getComputedStyle-print-all.txt
* run prettier on CSSGeneratedFiles.md)
2024-10-20 10:29:44 -04:00
Sam Atkins a4981ae745 LibWeb: Rename StyleValue -> CSSStyleValue
This matches the name in the CSS Typed OM spec.
https://drafts.css-houdini.org/css-typed-om-1/#cssstylevalue

No behaviour changes.

(cherry picked from commit 0e3487b9ab455a7648185995363bb3b487551d40)
2024-10-10 10:08:59 -04:00
Liav A. 96e1391c23 Kernel/Devices: Remove the DeviceManagement singleton
This change has many improvements:
- We don't use `LockRefPtr` to hold instances of many base devices as
  with the DeviceManagement class. Instead, we have a saner pattern of
  holding them in a `NonnullRefPtr<T> const`, in a small-text footprint
  class definition in the `Device.cpp` file.
- The awkwardness of using `::the()` each time we need to get references
  to mostly-static objects (like the Event queue) in runtime is now gone
  in the migration to using the `Device` class.
- Acquiring a device feel more obvious because we use now the Device
  class for this method. The method name is improved as well.
2024-10-05 12:26:48 +02:00
kleines Filmröllchen 19163e79a3 Everywhere: Format Markdown with prettier
These are the exact changes necessary to get the
next commit to pass pre-commit checks.
2024-10-04 10:46:42 -04:00
kleines Filmröllchen 35935b0e54 Documentation: Document all deps for a Clang build on Debian/Ubuntu
This was missing at least llvm-19-dev. Also, mention the LLVM apt
repositories.
2024-10-04 12:41:56 +02:00
Liav A. b93ca74d81 Kernel: Add a prctl option to enter jail mode until an execve syscall
In addition to the already existing option to enter jail mode (which is
set indefinitely), there should be a less restrictive option that should
allow exiting jail mode when doing the execve syscall.

This option will be useful for programs that need this kind of security
layer only in their runtime, but they're meant to actually initiate
another program in the end.
2024-10-03 12:39:45 +02:00
Ali Mohammad Pur 3fbdfb2096 Documentation: Add some documentation on how to configure jakt in vscode 2024-10-02 08:10:54 +02:00