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)
Sat, Apr 20, 7:09 PM
Unknown Object (File)
Tue, Apr 9, 12:05 AM
Unknown Object (File)
Sat, Apr 6, 4:16 PM
Unknown Object (File)
Mar 21 2024, 1:29 PM
Unknown Object (File)
Dec 23 2023, 1:30 AM
Unknown Object (File)
Dec 18 2023, 9:06 AM
Unknown Object (File)
Sep 15 2023, 10:39 AM
Unknown Object (File)
Jun 21 2023, 1:04 AM
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.