mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
Kernel: Use FixedStringBuffer for fixed-length strings in syscalls
Using the kernel stack is preferable, especially when the examined strings should be limited to a reasonable length. This is a small improvement, because if we don't actually move these strings then we don't need to own heap allocations for them during the syscall handler function scope. In addition to that, some kernel strings are known to be limited, like the hostname string, for these strings we also can use FixedStringBuffer to store and copy to and from these buffers, without using any heap allocations at all.
This commit is contained in:
parent
3fd4997fc2
commit
d8b514873f
13 changed files with 100 additions and 46 deletions
|
@ -65,6 +65,7 @@ Promises marked with an asterisk (\*) are SerenityOS specific extensions not sup
|
|||
* `EFAULT`: `promises` and/or `execpromises` are not null and not in readable memory.
|
||||
* `EINVAL`: One or more invalid promises were specified.
|
||||
* `EPERM`: An attempt to increase capabilities was rejected.
|
||||
* `E2BIG`: `promises` string or `execpromises `string are longer than all known promises strings together.
|
||||
|
||||
## History
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ the error.
|
|||
* `EPERM`: The veil is locked, or an attempt to add more permissions for an
|
||||
already unveiled path was rejected.
|
||||
* `EINVAL`: `path` is not an absolute path, or `permissions` are malformed.
|
||||
* `E2BIG`: `permissions` string is longer than 5 characters.
|
||||
|
||||
All of the usual path resolution errors may also occur.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue