66896 Commits

Author SHA1 Message Date
Sönke Holz
c11f877284 NetworkServer: Make "IPv4Address" Network.ini entry work again
ac44ec5ebc removed the short "-i" flag from ifconfig, breaking this
code.
2026-04-20 09:26:47 -04:00
MacDue
ab76043248 Meta: Only disable SPICE on QEMU 10.1
The kernel panic is only present on QEMU 10.1. The cause was fixed in
QEMU 10.2, as the QEMU change (see #26210), also caused regressions for
the Windows SPICE agent.

See: 4be62d3117
2026-04-18 19:17:49 -04:00
Linus Groh
6365c369b8 Ports: Update python3 to 3.14.4 2026-04-18 12:51:49 +02:00
Linus Groh
eb13cb1e02 Ports: Update zig to 0.16.0
Some notes:

- Zig removed support for z/OS[1] and with it some files from libc++
  that we were using with patches originating from the LLVM port:
  - libcxx/include/__support/ibm/locale_mgmt_zos.h
  - libcxx/src/support/ibm/xlocale_zos.cpp
  I put them back in and applied the previous patches, all in one big
  change.
- The directory iterator code needs to be ported to the new std.Io
  interface, but unlike before missing platforms are handled gracefully
  by returning an error at runtime so I'll do this later.
- Minor parts of the patch set have been upstreamed[2][3], more will
  follow.

[1]: https://github.com/ziglang/zig/pull/25731
[2]: https://codeberg.org/ziglang/zig/pulls/31916
[3]: https://codeberg.org/ziglang/zig/pulls/31931
2026-04-17 13:38:44 -04:00
Sönke Holz
5544af66c7 LibVT: Ignore DECCKM when modifiers are held
DECCKM (`ESC [?1h`/`ESC [?1l`) controls whether cursor keys send
application sequences (e.g. `ESC OD`) or standard ANSI cursor sequences
(`ESC [D`).

However, xterm only uses this alternative sequence when no modifiers
are held. This can be tested by running `echo -e '\e[?1h'; cat` and then
pressing some of the cursor keys:
The cursor left key prints `^[OD` (as expected), but Shift+Left prints
`^[[1;2D`, same for the other cursor keys and other modifiers (Ctrl and
Alt).

To match this xterm behavior, only use the application sequence when
no modifiers are held.
This makes the Ctrl+{Left,Right} keybinds work in neovim.
2026-04-17 13:30:23 +02:00
Nico Weber
4f7b1aed44 Meta: Port recent changes to the GN build
75f4597628 LibGfx/JPEGXL: Move JPEG XL secondary files to own folder
1d193fea6f LibGfx/JPEGXL: Read the HfGlobal bundle
ee48ee8ac7 SSHServer: Add the start of an ssh server implementation
ff75e05bbd LibLine: Write history file atomically
2026-04-15 22:21:30 -04:00
Nico Weber
640a54261d Meta: Port Mac SDK header patching to the GN build
This ports

631ed53082 Meta: Patch up Apple SDK headers to work with C++26

from #26524. As this is not fully mechanical, I'm putting it into
its own commit.
2026-04-15 22:21:30 -04:00
Nico Weber
d434c94018 Lagom: Move Mac SDK header patch stamp file creation into script
No behavior change.
2026-04-15 22:21:30 -04:00
Lucas Chollet
900b879147 SSHServer: Add support for writing keylog files
These files are used by wireshark to decode SSH packets. This is really
useful for inspecting the traffic after the SSH peers started
encryption.

To use it, you need to pass --unsafe-keylog-file FILE when starting the
server and then make Wireshark's ssh.keylog_file setting point to the
same file.

Note that this option leaks secrets to the file system and thus is not
safe to use.

The file format is described here:
6add14a3f3/epan/dissectors/packet-ssh.c (L2684-2704)
2026-04-14 12:11:37 +02:00
Sönke Holz
242fdddd1e LibVT+Userland+Kernel: Make DECTCEM not reset the cursor shape
Previously, making the cursor visible with DECTCEM caused the cursor
to reset its appearance to the shape that was set before the last
DECTCEM command making it invisible.
However, the cursor shape could have been changed between those two
commands (or the cursor could have never been made invisible before),
causing us to display an incorrect cursor shape.

Instead of (incorrectly) keeping track of the old cursor shape in
`m_saved_cursor_shape`, let's simplify this code by introducing a
`set_cursor_hidden` function, which is used by `TerminalWidget` to
set its `m_cursor_is_hidden` variable to enable/disable drawing of
the cursor.

This causes neovim to display the bar cursor shape in insert mode.
Previously, it displayed the block shape since it always issues a
"set cursor visible" command after setting the cursor shape,
therefore we incorrectly reset the shape to a block cursor.
2026-04-13 16:13:29 +02:00
Sönke Holz
f616e57762 LibVT+Userland+Kernel: Use the ConEmu OSC sequence for progress bars
Instead of having our own incompatible OSC 9 sequence for showing a
progress bar in the task bar, switch to using the more commonly used
OSC 9;4 sequence, introduced by ConEmu [1].
Other terminal emulators, like iTerm2 [2], Ghostty [3], and the
Windows Terminal [4] also use this OSC sequence.

This makes progress bar updates sent by Neovim work properly in our
terminal. Previously, it was always stuck at 100%.

[1] https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
[2] https://iterm2.com/documentation-escape-codes.html
[3] https://ghostty.org/docs/vt/osc/conemu#change-progress-state-(osc-94)
[4] https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
2026-04-13 16:06:07 +02:00
Sönke Holz
6075be9543 Meta: Don't write .pcap USB traffic dump for UAS drives
This appears to be leftover debugging code.
2026-04-12 14:07:34 +02:00
Sönke Holz
e834fbaf43 Meta: Use the "max" QEMU CPU for RISC-V
The "max" CPU has been supported by the QEMU RISC-V target since version
8.2. The latest Ubuntu LTS and Debian Stable releases both have newer
versions packaged, so it should be safe to require QEMU 8.2.

This enables extensions like Zkr, which support was added for in the
previous commit.
2026-04-12 14:07:26 +02:00
Sönke Holz
048ba5b4d0 Kernel/riscv64: Use the Zkr extension for entropy, if supported 2026-04-12 14:07:26 +02:00
Sönke Holz
3e0ef9397a Ports/neovim: Add SerenityOS system clipboard support
This makes the "+ (and "*) registers work in SerenityOS.
2026-04-09 22:04:19 +02:00
Sönke Holz
184b342781 Ports/neovim: Add has('serenity') to check if system is SerenityOS
This will be needed in the next commit to check if the SerenityOS
`copy` and `paste` command-line utilities are supported.
2026-04-09 22:04:19 +02:00
Sönke Holz
9daae4cad3 Ports/neovim: Support the SerenityOS "open" tool 2026-04-09 22:04:19 +02:00
Lucas Chollet
d7fb163c06 Tests/LibSSH: Change inherited methods' visibility with using
This is way cleaner than wrappers!
2026-04-09 17:38:28 +02:00
Gurkirat Singh
6c9677f27d WebServer: Set Content-Length: 0 header during redirection
Fixes #26431

Ref: https://bugs.python.org/issue43972
2026-04-09 10:47:41 -04:00
dependabot[bot]
0c9c0ba44c CI: Bump mymindstorm/setup-emsdk from 14 to 15
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 14 to 15.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](https://github.com/mymindstorm/setup-emsdk/compare/v14...v15)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-version: '15'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 14:26:53 +02:00
Lucas Chollet
b055d7ed31 Documentation: Add a document to explain how to connect to SSHServer 2026-04-08 13:43:19 +02:00
Lucas Chollet
981743997d SSHServer: Only accept authentication with a valid publickey signature
Authorized public keys are read from the file given by
`--user-authorized-keys-file`. On Serenity (and only there), if
unspecified, the file is assumed to be
`$USER/.config/ssh/authorized_keys`.

Like for the rest of this SSH implementation, only ed25519 keys are
supported. So to connect to the server, one now need to generate an
ed25519 key pair first and make the public part accessible to the
server.
2026-04-08 13:43:19 +02:00
Lucas Chollet
ecf64a3fd6 SSHServer: Add an option to specify where are the user's ssh public keys
This will be used in the next commit. For comparison, the openssh server
usually read these keys from `.ssh/authorized_keys`.
2026-04-08 13:43:19 +02:00
Lucas Chollet
c8e5a4581c LibSSH: Make TypedBlob constructible from raw bytes or a string
This will later be used for reading public keys from the network or from
a local file.
2026-04-08 13:43:19 +02:00
Lucas Chollet
47c1c9cd2b LibSSH: Add a helper to convert TypedBlob::Type to StringView 2026-04-08 13:43:19 +02:00
Lucas Chollet
ea28ea7877 LibSSH: Add a getter and a test for Peer::m_session_id 2026-04-08 13:43:19 +02:00
Lucas Chollet
60304ac57d SSHServer: Remove veils for the moment
Let's just remove them until the server architecture is more mature.
Right now it just bothers me every time I want to add a new feature.
2026-04-08 13:43:19 +02:00
Lucas Chollet
891dd64e97 SSHServer: Only accept authentication with publickey
As we don't check the public key itself, we still allow anyone to log
in. We now do require the client to try a key based authentication,
which is done if you have at least one private key your .ssh
configuration folder.
2026-04-08 13:43:19 +02:00
Lucas Chollet
384af7857d SSHServer: Reject unknown service names during authentication 2026-04-08 13:43:19 +02:00
Sönke Holz
40a956c49c Kernel/aarch64: Allow userspace to access CTR_EL0
CTR_EL0 is a read-only register that contains information about the
architecture of the caches. Both FreeBSD and Linux seem to allow direct
access to this register, so I don't think we should disallow EL0 to
access it.

This register is typically read during `__clear_cache()` to determine
the data/instruction cache line sizes and whether they are coherent.
`__clear_cache()` in turn is used by JITs to ensure that self-modifying
code works properly.
2026-04-08 00:19:14 +02:00
Sönke Holz
7ce6753f25 Kernel/aarch64: Print the raw ESR_EL1 value during crashes
Similar to the SPSR_EL1 dbgln, print the raw value after the decoded
value.

This is useful for using the ESR_EL1 value with tools like the
https://esr.arm64.dev/ website to get a more detailed decoding.
2026-04-08 00:19:14 +02:00
Sönke Holz
1b61338746 Ports: Remove multilib handling from luajit
i686 support war removed, so there is no need to pass -m64 explicitly.
Before i686 support was removed in b49c4eb94f, we used to pass -m32
for 32-bit systems here.

Additionally, installing multilib development packages like
libc6-dev-i386 should be unnecessary now, so the flashy warning message
can be removed.

This also makes the port compile on AArch64 now. Previously, it failed
to build because M_FLAG was undefined.

It still won't build on RISC-V since LuaJIT itself doesn't support
RISC-V yet (https://github.com/LuaJIT/LuaJIT/pull/1267).
2026-04-07 21:37:52 +02:00
Sönke Holz
a2f75c5f5e Kernel/riscv64: Add Svpbmt support
This makes `MemoryType`s actually work on RISC-V systems with Svpbmt.
2026-04-07 16:12:15 +02:00
Sönke Holz
2f1d3207e7 Kernel/MM: Remove PageDirectoryEntry::set_memory_type()
These functions are unused.

On RISC-V, the PBMT (memory type) bits are reserved for non-leaf PTEs,
so the semantics of this function for PageDirectoryEntry are dubious.
2026-04-07 16:12:15 +02:00
Sönke Holz
3c8d66d950 Kernel/MM: Remove PageTableEntry::raw()
Similar to the previous commit, nothing outside of the PageTableEntry
classes uses this function.

RISC-V's PageTableEntry doesn't have it at all.
2026-04-07 16:12:15 +02:00
Sönke Holz
b8e87b51dd Kernel/MM: Remove PageDirectoryEntry::raw()
Nothing outside of the PageDirectoryEntry classes uses this function.

RISC-V's PageDirectoryEntry doesn't have it at all.
2026-04-07 16:12:15 +02:00
Sönke Holz
6e6243acbf Ports: Add neovim 2026-04-07 14:51:25 +02:00
Sönke Holz
a1857bb779 Ports: Make libuv retrieve the CPU count via sysconf()
This is better than hardcoding it to 0.
This new implementation is a direct copy of the IBM i implementation.

Neovim uses this count to determine how many threads to spawn in
`vim.pack`. Previously, it spawned 0 threads and got stuck when
downloading plugins.
2026-04-07 14:51:25 +02:00
Sönke Holz
4a70dfc2db Ports: Add tree-sitter-{c,lua,markdown,query,vim,vimdoc}
These parsers are required by neovim.
2026-04-07 14:51:25 +02:00
Sönke Holz
8f22718eb0 Ports: Add utf8proc 2026-04-07 14:51:25 +02:00
Sönke Holz
6388beea92 Ports: Add msgpack-c 2026-04-07 14:51:25 +02:00
Sönke Holz
16eda703ef Ports: Add luv 2026-04-07 14:51:25 +02:00
Sönke Holz
ad461c6a88 Ports: Add LPeg 2026-04-07 14:51:25 +02:00
Sönke Holz
eea06bdf0b Ports: Add unibilium
The original project was abandoned, so this uses neovim's fork, see
https://github.com/neovim/neovim/blob/master/MAINTAIN.md#third-party-dependencies
for more details.
2026-04-07 14:51:25 +02:00
Sönke Holz
0d5087e8d0 Ports: Make libuv assume that errnos are positive in serenity 2026-04-07 14:51:25 +02:00
Sönke Holz
a266e90003 Ports: Update LuaJIT to 18b087cd
LuaJIT switched to a rolling-release model with multiple maintained
branches.
This commit hash is the current head of the branch currently marked
as "production": v2.1.
2026-04-07 14:51:25 +02:00
Sönke Holz
e6fe911bd7 LibC: Properly set termios flags in cfmakeraw()
OPOST is an c_oflag flag.
Similarly, ECHO, ECHONL etc. are c_lflag flags.
2026-04-07 14:51:25 +02:00
Sönke Holz
a6acdbf76f nproc: Use Core::System::hardware_concurrency()
This is significantly simpler than parsing JSON and using the cpuinfo
array length.

This also has the side effect of making that command work on AArch64
and RISC-V, since ProcessorInfo is not implemented on those
architectures yet.
2026-04-07 14:44:34 +02:00
Sönke Holz
14cc6d8e40 Kernel/riscv64: Support the Google Goldfish real-time clock
The QEMU virt machine uses a Goldfish RTC device as its real-time clock.
This means that we now display the correct time in riscv64 QEMU and
date-dependent tests no longer fail!

This driver is based on the PL031 driver.
2026-04-06 16:18:35 +02:00
Sönke Holz
77f058c32e Everywhere: Remove iOS support
Now that ladybird was hard-forked from SerenityOS, there's no good
reason to keep supporting iOS.

Ladybird only still exists in the SerenityOS repo to make testing LibWeb
easier.
2026-04-06 15:44:56 +02:00