37362 Commits
Author SHA1 Message Date
Undefine 991222fcdb LibACPI: Add structures for PM1ControlRegister and SleepControlRegister 2026-11-07 13:27:30 +01:00
Undefine 41ffa1d87b LibACPI: Add GenericAddressStructure::is_null 2026-11-07 13:27:30 +01:00
Undefine 5ebe978d8f LibACPI: Make all objects containing a buffer explicitly noncopyable 2026-11-07 13:27:30 +01:00
Undefine 2e0c8483fc LibACPI: Explicitly clone a value when evaluating a NameNode 2026-11-07 13:27:30 +01:00
Undefine 452662dd52 LibACPI: Avoid a bunch of copies in the interpreter 2026-11-07 13:27:30 +01:00
Undefine 1895e5e413 LibACPI: Finalize an operand by moving the object into the frame
This avoids a copy.
2026-11-07 13:27:30 +01:00
Undefine 7d59d6911d LibACPI: Add a non-const way to get the operand from an OpcodeFrame
This will be needed to move objects out of the OpcodeFrame.
2026-11-07 13:27:30 +01:00
Undefine 4285c1b888 LibACPI: Avoid copies when formatting an Object 2026-11-07 13:27:30 +01:00
Undefine e5bb8b4afe LibACPI: Allow initializing an Object by moving a value 2026-11-07 13:27:30 +01:00
Undefine ee1cf23dec LibACPI: Add a failable way to clone an Object
This will be needed in the kernel.
2026-11-07 13:27:30 +01:00
Undefine 3db136af6e LibACPI: Make String, Buffer and Package getters const
Those objects should stay immutable and these getters need to be
accessible from const references.
2026-11-07 13:27:30 +01:00
Undefine a5e466bc2c LibACPI: Add Object::as_pointer and Object::release_as
Those will be needed to avoid some copies that are not allowed in the
kernel.
2026-11-07 13:27:30 +01:00
Undefine b408275768 LibACPI: Ensure reading QWordData compiles correctly
Later when finish_operand starts taking Object&& the compiler gets
confused and required this to be cast to u64 explicitly.
2026-11-07 13:27:30 +01:00
Undefine 74ea69459c LibVT: Don't use fallable StringBuilder APIs in code used by the kernel
While this is quite ugly for now, realistically it points out a real
issue and this change is needed so the kernel compiles after a later
change.
2026-11-06 20:34:06 +01:00
Undefine 3e01ecd498 LibEDID: Clone a ByteBuffer using clone
The copy operator will be unavailable in the kernel, so use the clone
function explicitly.
2026-11-06 20:34:06 +01:00
Undefine adede105a1 LibDeviceTree: Switch two calls to try_appendff
The rest of the calls used the fallible APIs already, but those were
missed.
2026-11-06 20:34:06 +01:00
Sönke Holz d2d78ed715 LibC: Add Kernel/API/POSIX/winsize.h to HEADERS
I forgot to do this in be0e1aaf8f.

This makes us actually install that header into the sysroot, unbreaking
ports like openssl, which previously failed to build with:
"fatal error: Kernel/API/POSIX/winsize.h: No such file or directory"
2026-11-05 14:53:49 +01:00
Lucas Chollet 3e6b6a88c5 LibSSH+SSHServer: Provide a properly set environment to children
Before this patch, exec commands were inheriting the environment of the
SSHServer instance while interactive shell spawned with an almost empty
env. Now, both paths start with the same basic environment and also
include modifications requested by the ssh client.

This should improve compatibility in a lot of situations but most
visibly it makes syntax highlighting and autocompletion work in
interactive shells.

The list of default environment variables is heavily inspired by what
OpenSSH is doing. Compared to what it produces on my system, we only
lack XDG_*, SSH_* and DBUS_SESSION_BUS_ADDRESS variables. As noted in
the FIXME the value of PATH also differs.
2026-11-05 09:17:57 +01:00
Lucas Chollet fe92281611 LibCore: Support passing environment variables to Process::spawn 2026-11-05 09:17:57 +01:00
Lucas Chollet 7cba67db00 LibCore: Turn ArgvList into a more general C-string array
This will be soon be used for the environment too. And put it in an
anonymous namespace while at it.
2026-11-05 09:17:57 +01:00
Lucas Chollet e984357e1f LibCore: Move the explicit cast to ArgvList::get
This makes the call site easier to read.
2026-11-05 09:17:57 +01:00
Lucas Chollet 31d7c87c68 LibSSH/SFTP: Allow relative paths in the OPEN command
Now that SSHServer sets us in the user's home directory, there is no
need to block them as they will resolve correctly according to the spec:
"File names starting with a slash are "absolute", and are relative to
 the root of the file system.  Names starting with any other character
 are relative to the user's default directory (home directory)."

Also note that we were only refusing relative paths in the OPEN command,
but STAT was already accepting them (and resolving them incorrectly).
2026-11-04 09:47:43 +01:00
Lucas Chollet cf26f5faa4 SSHServer: Set the current directory to the user's home on login
We were already changing the home directory for interactive shells, but
with this change single commands also get executed from the user's home
and SFTP relative paths will also resolve from the correct directory.
(Relative paths are still not allowed in the SFTP layer, but everything
will fall in place once we remove that restriction.)
2026-11-04 09:47:43 +01:00
Lucas Chollet 280b0b2bd5 SSHServer: Send the actual exit status of commands
We now report the actual value instead of simply returning 0/-1. We're
now using the conventional representation for signal-terminated
processes and return an exit-status of 128 + signal number.
2026-11-04 09:47:43 +01:00
Lucas Chollet 207c2f6c5f SSHServer: Use the user's default shell instead of hardcoding it 2026-11-04 09:47:43 +01:00
Lucas Chollet d85d1a984f LibC: Set the pty size in openpty
This aligns the behavior with both Linux and OpenBSD (and probably all
other implementations of openpty).

This bug was visible in SSHServer, indeed when using an interactive
shell, the start pty size was always the default (80x25) instead of
whatever the client's window is using. It is quite visible with `top`,
which now fills the whole window :^)
2026-11-03 12:10:04 +01:00
Lucas Chollet ceed7af2e2 SSHServer: Add support for the window-change request
With this patch, SSHServer is able to update the pty on the server when
the size of the client's window is updated.

Resizing your terminal emulator's window while being connected to
SSHServer no longer make you disconnect.

While the implementation is functional, it seems to have quite more
latency than with a regular SSH server, so visual artifacts may appear
when aggressively resizing the window.
2026-11-03 12:10:04 +01:00
Lucas Chollet 76175e09ba LibCore: Add wrappers for tc{get,set}winsize
On Serenity, this uses the equivalent LibC function, otherwise it
defaults to the pretty standard ioctl equivalent.

At the time of writing, it seems that only musl, BSDs and Serenity have
the standardized POSIX function.
2026-11-03 12:10:04 +01:00
Lucas Chollet 8e34c970b5 LibC: Implement tc{get,set}winsize functions
We already support the operation with ioctl, these functions are simply
the POSIX-compatible way of doing it. They were added in POSIX 2024.
2026-11-03 12:10:04 +01:00
Lucas Chollet 57d7d52024 LibSSH+SSHServer: Add support for interactive shells
Until now, we could only use SSHServer to remotely run single commands
(e.g. `ssh remote command_to_run`). With this patch, we now support
using ssh in the most usual way: starting a remote interactive shell and
then running commands on the host.
2026-11-03 09:31:27 +01:00
Lucas Chollet f680882469 LibSSH+SSHServer: Put child-managing features in a parent of ExecData
This parent will contain the data used for streaming stdin/stdout, the
pid of the child process and a few basic methods required for
subsystems. This refactoring will allow us to easily introduce another
kind of child-managing subsystem, used for interactive shells.
2026-11-03 09:31:27 +01:00
Lucas Chollet dd293dcef1 LibSSH+SSHServer: Add support for the pty-req channel request
This is a step towards supporting interactive shells with SSHServer.
This request includes the options to create the pty associated with the
shell.

Note that we don't validate or do anything else with the options
themselves. We just store them, and any issues with the values will be
discovered when we actually create the pty during the handling of the
"shell" request.
2026-11-03 09:31:27 +01:00
Stephan Unverwerth ac779f06cc LibSoftGPU: Improve depth interpolation precision
This should get rid of various artifacts when exact depth equality is
needed, such as when using GL_EQUAL or similar depth functions.
2026-11-02 18:27:57 -05:00
Eduardo Casadei 78085e276d LibShell: Stop reading error source text directly from the source file
Use the saved source text instead of trying to read it directly from the
source file, as the source file may be a relative path and the script
could have changed the current working directory which would make the
path invalid.
2026-11-02 09:33:46 +01:00
Eduardo Casadei 47b533f8d8 LibShell: Save the source text for script files
The function for running a script file already reads its source data
into a buffer, so also set the source text to it.
2026-11-02 09:33:46 +01:00
Sönke Holz cb9e1feee3 LibGL+LibSoftGPU: Support GL_{UN,}PACK_SKIP_{PIXELS,ROWS}
We already store these glPixelStorei() parameters in
m_unpacking_parameters/m_packing_parameters, but didn't do anything
with them.

Setting these parameters is equivalent to offsetting the input/output
texture data pointer by a constant offset.
2026-11-01 21:27:28 +01:00
Undefine b339c4d6ea LibACPI: Add a missing warnln to dbgln define
This was missed in TableStream.cpp.
2026-11-01 15:08:28 +01:00
Undefine 5d5f089490 LibACPI: Add an evaluate overload for passing the path as StringView 2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 e18c3fbcc5 LibACPI: Add missing predefined namespace objects
Now that we have all the primitives we need, let's add the missing
objects.

Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 1b1cd99667 LibACPI: Add support for reading ProcessorOp
While this opcode is deprecated, it is still widely used and we need to
support it.

Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 d597448c4e LibACPI: Add support for packages
Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
Undefine 96df4d227a LibACPI: Allow repeating an operand over a count
Do this similarly to repeating over a byte count.
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 e55777838d LibACPI: Add support for reading MutexOp
Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 901266253a LibACPI: Add support for buffers
Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 7150a99e75 LibACPI: Add support for strings
Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 afbe9b228c LibACPI: Add support for reading DeviceOp
Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 70f7715bca LibACPI: Add support for reading methods
For now just create a node, but don't actually do anything with the
body as it's not needed for now.

Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
UndefineandRatcheT2497 c9e5fa6ada LibACPI: Support reading OpRegionOp and FieldOp
Those two always come in pairs so lets do it in one commit. This
doesn't yet support evaluating fields as it's not yet needed and would
require setting up callbacks from the interpreter.

Co-authored-by: RatcheT2497 <[email protected]>
2026-11-01 15:08:28 +01:00
Undefine cc1e5ef63b LibACPI: Move object formatting to a dedicated formatter 2026-11-01 15:08:28 +01:00
Undefine 3b0289a11c LibACPI: Make OpcodeFrame start point to right after the opcode
This makes some math later easier and less error prone since some
opcodes have two bytes.
2026-11-01 15:08:28 +01:00