feat(syscall): add uname syscall + uname userland program#117
Merged
FlareCoding merged 7 commits intostellux-3.0-prototypingfrom Apr 1, 2026
Merged
feat(syscall): add uname syscall + uname userland program#117FlareCoding merged 7 commits intostellux-3.0-prototypingfrom
FlareCoding merged 7 commits intostellux-3.0-prototypingfrom
Conversation
Implements the Linux-compatible uname(2) syscall that fills a
struct utsname with system identification:
- sysname: "Stellux"
- nodename: "stellux"
- release: "3.0.0"
- version: "Stellux 3.0.0"
- machine: architecture-specific ("x86_64" or "aarch64")
- domainname: "(none)"
Registered at syscall 63 (x86_64) and 160 (aarch64), matching
the Linux syscall numbering convention.
Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
Added STLX_VERSION=3.0.1 to config.mk and pass it to the kernel as -DSTLX_VERSION via CXXFLAGS_CONFIG. sys_uname.cpp now uses the STLX_VERSION macro for the release and version fields instead of hardcoded strings. Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Supports -s (sysname), -n (nodename), -r (release), -v (version), -m (machine), -a (all), and --help. Defaults to -s when no flags are given. Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
Prevents leaking uninitialized kernel stack data to userspace if compiled for an architecture that is neither x86_64 nor aarch64. Co-authored-by: Albert Slepak <FlareCoding@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Implements the Linux-compatible
uname(2)syscall and a userlandunameutility.Kernel changes
config.mk— AddedSTLX_VERSION ?= 3.0.1, single source of truth for the kernel version string.kernel/Makefile— PassesSTLX_VERSIONto the compiler as-DSTLX_VERSION.kernel/syscall/handlers/sys_uname.h/sys_uname.cpp— Implementssys_uname: fills anew_utsnamestruct usingSTLX_VERSIONfor release/version fields, copies to userspace.kernel/arch/x86_64/syscall/linux_syscalls.h—UNAME = 63.kernel/arch/aarch64/syscall/linux_syscalls.h—UNAME = 160.kernel/syscall/syscall_table.cpp— Registers the handler.Userland changes
userland/apps/uname/— Newunameutility with Linux-compatible flags:-skernel name,-nhostname,-rrelease,-vversion,-mmachine-aall fields,--helpusage-swith no argumentsuserland/apps/Makefile— AddedunametoAPP_DIRS.utsname fields
sysname"Stellux"nodename"stellux"releaseSTLX_VERSION(currently"3.0.1")version"Stellux " STLX_VERSION(currently"Stellux 3.0.1")machine"x86_64"or"aarch64"(compile-time)domainname"(none)"Testing