Skip to content

uname enhancement #1044

@joe-lawrence

Description

@joe-lawrence

I think this idea has been floated a few times, most recently by @lulinqing or maybe @mmilgram : should kpatch provide supplemental uname information?

For reference:

  • Oracle has an uptrack-uname command to show what "effective kernel a machine is running".
  • SUSE's livepatches patch the kernel's SyS_newuname to add a kGraft-@@GITREV@@ tag to the kernel version string.

I think we have a few options:

  1. Roll something like SUSE's solution into each kpatch, manually or automatically.
  2. Add to kpatch-macro.h a macro that pushes a value into the livepatch's modinfo. The kpatch-utility could then report those values in its list or (new) uname sub-commands.
  3. Suggest a new /sys/kernel/livepatch/<patch>/uname interface or similar upstream.
  4. Save this information elsewhere in the patch distribution, in the RPM changelog for example.

Some caveats to consider:

  • Scripts may rely upon the current uname -r format. I'm reluctant to modify this.
  • The kernel and kpatch-utility support loading multiple livepatches... what does it mean if patch 1 sets an effective uname of version A and patch 2 version B?
  • An "effective kernel version" may be confusing to a user if it only includes a subset of the patches of said kernel version.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions