HomeFreeBSD

Expose the kernel's build-ID through sysctl

Description

Expose the kernel's build-ID through sysctl

After our migration (of certain architectures) to lld the kernel is built
with a unique build-ID. Make it available via a sysctl and uname(1) to
allow the user to identify their running kernel.

Submitted by: Ali Mashtizadeh <ali_mashtizadeh.com>
MFC after: 2 weeks
Relnotes: Yes
Event: Waterloo Hackathon 2019
Differential Revision: https://reviews.freebsd.org/D20326

Details

Committed
emasteJun 4 2019, 1:07 PM
Differential Revision
D20326: Expose the buildid hash through sysctl
Parents
rS348610: build llvm-ar and llvm-nm with Clang (promote out of CLANG_EXTRAS)
Branches
Unknown
Tags
Unknown

Event Timeline

emaste added a subscriber: imp.EditedJun 27 2019, 8:28 PM

@imp asked on IRC what would happen if uname was run on a kernel without the kern.build_id sysctl - it would report:

volta% usr.bin/uname/obj/uname -b
uname: sysctlbyname: No such file or directory