21
submitted 10 months ago by mvirts@lemmy.world to c/linux@lemmy.ml

Any thoughts on why cat /sys/kernel/notes gives me:

LinuxLinuXen@ XenlinuxXen2.Xenxen-3.Xen����XenXen��&����� XenXeXeXen������XeXengenericXen Xenyes

I'm beginning to look into another issue I posted about, but this struck me as odd

you are viewing a single comment's thread
view the rest of the comments
[-] sin_free_for_00_days@sopuli.xyz 20 points 10 months ago

It was added in a patch to 2.6.23

Notes from the coder:

The bonus feature in my patch series adds the magic file /sys/kernel/notes. Reading this gives you the binary contents of the ELF notes section built into the kernel. Here you can find the build ID of the running kernel. This gives a solution to a problem that has arisen for systemtap users, where nothing prevents them from using the kernel-debuginfo.i586 data to drive Systemtap's probe details, but are actually running the kernel from the kernel.i686 rpm. This is a failure on many levels, but some simple sanity-checking at the bottom always helps. Now it is easy to verify you have the right debuginfo file for the kernel you are running.

This is incorporated upstream now.

[-] Static_Rocket@lemmy.world 12 points 10 months ago

Yep, from kernel/ksysfs.c

/*
 * Make /sys/kernel/notes give the raw contents of our kernel .notes section.
 */
this post was submitted on 21 Jan 2024
21 points (95.7% liked)

Linux

48366 readers
1454 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS