Page MenuHomeFreeBSD

linux: Make uname less weird
Needs ReviewPublic

Authored by trasz on Apr 11 2023, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 28, 6:47 PM
Unknown Object (File)
Sun, Sep 28, 5:07 PM
Unknown Object (File)
Sun, Sep 28, 5:00 PM
Unknown Object (File)
Sun, Sep 28, 3:33 PM
Unknown Object (File)
Mon, Sep 22, 3:47 PM
Unknown Object (File)
Sun, Sep 14, 5:25 AM
Unknown Object (File)
Sep 2 2025, 3:19 PM
Unknown Object (File)
Aug 19 2025, 8:25 PM
Subscribers

Details

Reviewers
None
Group Reviewers
Linux Emulation
Summary

In Linux most of the identifying kernel information belongs in
osrelease, the one reported by "uname -r". Version ("uname -v")
contains mostly the build number and timestamp, and tools like
neofetch(1) don't even bother reporting it.

Before:
Linux pustak 4.4.0 FreeBSD 14.0-CURRENT #1 main-n262054-cc3793b1c548: Sun Apr 9 21 x86_64 x86_64 x86_64 GNU/Linux

After:
Linux pustak 4.4.0-freebsd14.0-current #1 main-n262054-cc3793b1c548: Sun Apr 9 21:06:31 BST 2023 x86_64 x86_64 x86_64 GNU/Linux

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 50838
Build 47729: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Apr 11 2023, 4:22 PM

Would you mind showing example before/after uname results?

well, the part after a dash is not standart, depends on a distributive, so we can put here any information, and it would be nice to print p_osrel of the current process here.
However, I would propose completely remove the pr_osrelease from struct linux_prison as we have pr_osrel and due to the pr_osrelease was intended to map into the vdso page at the Note section. But its not possible due to jails and can be removed now.

well, the part after a dash is not standart, depends on a distributive, so we can put here any information, and it would be nice to print p_osrel of the current process here.
However, I would propose completely remove the pr_osrelease from struct linux_prison as we have pr_osrel and due to the pr_osrelease was intended to map into the vdso page at the Note section. But its not possible due to jails and can be removed now.

I think I get what you are saying, but I'm not sure if I understand the code enough to rip it out safely.