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

  • @[email protected]
    link
    fedilink
    1910 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
      link
      English
      1110 months ago

      Yep, from kernel/ksysfs.c

      /*
       * Make /sys/kernel/notes give the raw contents of our kernel .notes section.
       */
      
  • @Static_Rocket
    link
    English
    410 months ago

    There’s a bunch of other data being printed aside from the usual printable characters. Run it through strings if you want something human readable.

    As to what that extra data is… I actually don’t know off hand. Let’s see if the mailing list has any info…