Skip to content

feat(syscall): add uname syscall + uname userland program#117

Merged
FlareCoding merged 7 commits intostellux-3.0-prototypingfrom
cursor/uname-syscall-76e8
Apr 1, 2026
Merged

feat(syscall): add uname syscall + uname userland program#117
FlareCoding merged 7 commits intostellux-3.0-prototypingfrom
cursor/uname-syscall-76e8

Conversation

@FlareCoding
Copy link
Copy Markdown
Owner

@FlareCoding FlareCoding commented Apr 1, 2026

Summary

Implements the Linux-compatible uname(2) syscall and a userland uname utility.

Kernel changes

  • config.mk — Added STLX_VERSION ?= 3.0.1, single source of truth for the kernel version string.
  • kernel/Makefile — Passes STLX_VERSION to the compiler as -DSTLX_VERSION.
  • kernel/syscall/handlers/sys_uname.h / sys_uname.cpp — Implements sys_uname: fills a new_utsname struct using STLX_VERSION for release/version fields, copies to userspace.
  • kernel/arch/x86_64/syscall/linux_syscalls.hUNAME = 63.
  • kernel/arch/aarch64/syscall/linux_syscalls.hUNAME = 160.
  • kernel/syscall/syscall_table.cpp — Registers the handler.

Userland changes

  • userland/apps/uname/ — New uname utility with Linux-compatible flags:
    • -s kernel name, -n hostname, -r release, -v version, -m machine
    • -a all fields, --help usage
    • Defaults to -s with no arguments
  • userland/apps/Makefile — Added uname to APP_DIRS.

utsname fields

Field Value
sysname "Stellux"
nodename "stellux"
release STLX_VERSION (currently "3.0.1")
version "Stellux " STLX_VERSION (currently "Stellux 3.0.1")
machine "x86_64" or "aarch64" (compile-time)
domainname "(none)"

Testing

  • Kernel builds cleanly on both x86_64 and aarch64 with zero errors/warnings.
  • Userland app cannot be compiled in CI without musl sysroot but follows established app conventions.
Open in Web Open in Cursor 

cursoragent and others added 5 commits April 1, 2026 02:45
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>
@FlareCoding FlareCoding marked this pull request as ready for review April 1, 2026 02:51
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

cursoragent and others added 2 commits April 1, 2026 02:56
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>
@FlareCoding FlareCoding changed the title feat(syscall): add uname syscall for both x86_64 and aarch64 feat(syscall): add uname syscall + uname userland program Apr 1, 2026
@FlareCoding FlareCoding merged commit e0884a5 into stellux-3.0-prototyping Apr 1, 2026
15 checks passed
@FlareCoding FlareCoding deleted the cursor/uname-syscall-76e8 branch April 1, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants