summaryrefslogtreecommitdiff
path: root/Kernel/API
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-22Kernel: Don't assume paths of TTYs and pseudo terminals anymoreLiav A
The obsolete ttyname and ptsname syscalls are removed. LibC doesn't rely on these anymore, and it helps simplifying the Kernel in many places, so it's an overall an improvement. In addition to that, /proc/PID/tty node is removed too as it is not needed anymore by userspace to get the attached TTY of a process, as /dev/tty (which is already a character device) represents that as well.
2022-03-22Kernel: Define MS_WXALLOWED mount optionint16
2022-03-18Kernel: Mark `serenity_dev_` functions as staticBrian Gianforcaro
This avoids multiple definition errors when linking software which may utilize these functions from different compilation units.
2022-03-16Kernel: Define IF_NAMESIZE in net/if.hLinus Groh
This makes the _socket module from the Python port build. :^)
2022-03-09Kernel: Mark sys$lseek() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09Kernel: Mark sys$emuctl() as not needing the big lockAndreas Kling
This syscall doesn't do anything at all, and definitely doesn't need the big lock. :^)
2022-03-09Kernel: Mark sys$chmod() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09Kernel: Mark sys$fchmod() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09Kernel: Mark sys$dup2() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09Kernel: Mark sys$ftruncate() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09Kernel: Mark sys$fstatvfs() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-09LibC: Add ioctls for VirGLSahan Fernando
2022-03-08Kernel: Remove an unused fd_set.h importTim Schumacher
The project appears to build just fine without it, and the explicit use of `LibC` causes it to conflict with the system-wide `fd_set.h` when building inside of Serenity.
2022-03-08Kernel: Mark sys$fsync() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$readlink() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$stat() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$fstat() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$fchdir() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$chdir() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$getcwd() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$realpath() as not needing the big lockAndreas Kling
This syscall doesn't access any data that was implicitly protected by the big lock.
2022-03-08Kernel: Mark sys$anon_create() as not needing the big lockAndreas Kling
This syscall is already safe for no-big-lock since it doesn't access any unprotected data.
2022-03-07Kernel: Wrap HIDManagement keymap data in SpinlockProtectedAndreas Kling
This serializes access to the current keymap data everywhere in the kernel, allowing to mark sys$setkeymap() as not needing the big lock.
2022-03-04Kernel: Fill some siginfo and ucontext fields on SA_SIGINFOAli Mohammad Pur
There's no reason to fill in any of these fields if SA_SIGINFO is not given, as the signal handler won't be reading from them at all.
2022-03-04Kernel: Add support for SA_SIGINFOAli Mohammad Pur
We currently don't really populate most of the fields, but that can wait :^)
2022-02-28Kernel: Add getrusage() syscallLucas CHOLLET
Only the two timeval fields are maintained, as required by the POSIX standard.
2022-02-14Kernel/Profiling: Add profiling to read syscallJakub Berkop
Syscalls to read can now be profiled, allowing us to monitor filesystem usage by different applications.
2022-02-13Kernel: Expose maximum argument limit in sysconfAndrew Kaster
Move the definitions for maximum argument and environment size to Process.h from execve.cpp. This allows sysconf(_SC_ARG_MAX) to return the actual argument maximum of 128 KiB to userspace.
2022-01-23Kernel: Add ioctl to get the EDID from a framebufferTom
2022-01-23Kernel/Devices: Introduce the Device Control DeviceLiav A
This device will assist userspace to manage hotplug events. A userspace application reads a DeviceEvent entry until the return value is zero which indicates no events that are queued and waiting for processing. Trying to read with a buffer smaller than sizeof(DeviceEvent) results in EOVERFLOW. For now, there's no ioctl mechanism for this device but in the future an acknowledgement mechanism can be implemented via ioctl(2) interface.
2022-01-20Kernel: Add horizontal mouse scroll supportDmitry Petrov
2022-01-12Kernel+LibC+LibCore+UE: Implement `fchmodat(2)`Daniel Bertalan
This function is an extended version of `chmod(2)` that lets one control whether to dereference symlinks, and specify a file descriptor to a directory that will be used as the base for relative paths.
2022-01-09Everywhere: Add `serenity_dev_{makedev,major,minor}`Michel Hermier
Add them in `<Kernel/API/Device.h>` and use these to provides `{makedev,major,minor}` in `<sys/sysmacros.h>`. It aims to be more in line with other Unix implementations and avoid code duplication in user land.
2022-01-08Kernel: Remove EWHYTHO error code :^)Andreas Kling
This error code was a hack for catching error handling mistakes in the kernel. It's no longer used anywhere.
2022-01-04Kernel: Update key_code_countAatos Majava
This was not updated when the Menu button was added.
2022-01-03Kernel: Allow backspace '\b' to be remappedCorey Williamson
Previously, one could put '\b' in a keymap, but in non-Terminal applications, it would just insert a literal '\b' character instead of behaving like backspace. This patch modifes `visible_code_point_to_key_code` to include backspace, as well as renaming it to `code_point_to_key_code` since '\b' is not a visible character. Additionally, `KeyboardDevice::key_state_changed` has been rearranged to apply the user's keymap before checking for things like caps lock.
2022-01-01Kernel+LibC+LibCore: Add lchown and fchownat functionscircl
This modifies sys$chown to allow specifying whether or not to follow symlinks and in which directory. This was then used to implement lchown and fchownat in LibC and LibCore.
2021-12-29Kernel: Add EPROMISEVIOLATION as a kernel ErrnoCodeBrian Gianforcaro
2021-12-29Kernel+LibC: Add ECANCELED errno valueDaniel Bertalan
This is needed for clangd to compile.
2021-12-28Kernel: Implement and use the syscall/sysret instruction pair on x86_64Owen Smith
2021-12-28Kernel: Add _SC_MAPPED_FILES sysconf APIBrian Gianforcaro
This is mandated by POSIX, it's fine that we don't actually implement it, just as long as it's present during compilation. :^)
2021-12-28LibC: Add in6addr_loopback and IN6ADDR_LOOPBACK_INIT constantBrian Gianforcaro
Much like the existing in6addr_any global and the IN6ADDR_ANY_INIT macro, our LibC is also expected to export the in6addr_loopback global and the IN6ADDR_LOOPBACK_INIT constant. These were found by the stress-ng port.
2021-12-23Kernel+UE+LibC: Store address as void* in SC_m{re,}map_paramsDaniel Bertalan
Most other syscalls pass address arguments as `void*` instead of `uintptr_t`, so let's do that here too. Besides improving consistency, this commit makes `strace` correctly pretty-print these arguments in hex.
2021-12-23Kernel+UE: Add MAP_FIXED_NOREPLACE mmap() flagDaniel Bertalan
This feature was introduced in version 4.17 of the Linux kernel, and while it's not specified by POSIX, I think it will be a nice addition to our system. MAP_FIXED_NOREPLACE provides a less error-prone alternative to MAP_FIXED: while regular fixed mappings would cause any intersecting ranges to be unmapped, MAP_FIXED_NOREPLACE returns EEXIST instead. This ensures that we don't corrupt our process's address space if something is already at the requested address. Note that the more portable way to do this is to use regular MAP_ANONYMOUS, and check afterwards whether the returned address matches what we wanted. This, however, has a large performance impact on programs like Wine which try to reserve large portions of the address space at once, as the non-matching addresses have to be unmapped separately.
2021-12-22LibC: Add support for `posix_madvise(..)`Brian Gianforcaro
Add the `posix_madvise(..)` LibC implementation that just forwards to the normal `madvise(..)` implementation. Also define a few POSIX_MADV_DONTNEED and POSIX_MADV_NORMAL as they are part of the POSIX API for `posix_madvise(..)`. This is needed by the `fio` port.
2021-12-22Kernel: Add the si_errno and si_band siginfo_t membersIdan Horowitz
These 2 members are required by POSIX and are also used by some ports. Zero is a valid value for both of these, so no further work to support them is required.
2021-12-22Kernel: Move userspace virtual address range base to 0x10000Idan Horowitz
Now that the shared bottom 2 MiB virtual address mappings are gone userspace can use lower virtual addresses.
2021-12-22Kernel+LibC: Stub out getifaddrs() and freeifaddrs()Idan Horowitz
These are required for some ports.
2021-12-22Kernel+LibC: Stub out if_nameindex() and if_freenameindex()Idan Horowitz
These should allow users to receive the names of network interfaces in the system, but for now these are only stubs required to compile some ports.