feat(kernel): the live patches the running kernel carries, with the kernel facts (NetOrk/netork#2701)
/sys/kernel/livepatch with each patch's enabled and transition, kpatch list, and Canonical Livepatch's status for the running kernel with the CVEs it names. status reads the daemon's last state; refresh is never run. Where the client is installed and its status needs root, a driver that supplies _run_livepatch_status_command reads it again as root.
This commit is contained in:
1 parent
14217b6eeb
commit
b9b6297815
6 files changed
+597
-2
No files matched your search
@@ -159,6 +159,13 @@ rather than by a role base: what a Linux kernel has built and loaded is read the
|
||||
everywhere, so the command and its parse are concrete here and a driver supplies only
|
||||
`_run_kernel_facts_command`. `OSDriver` does not carry it — a Windows host is an OS driver
|
||||
too, and `hasattr(driver, "get_kernel_facts")` has to stay truthful.
|
||||
The kernel facts carry the kernel's live patches too (`live_patches`, from
|
||||
`napalm_device_types.livepatch`): the patches loaded in `/sys/kernel/livepatch` with whether
|
||||
each is enabled, `kpatch list`, and Canonical Livepatch's status for the running kernel with
|
||||
the CVEs it fixes (`canonical-livepatch status --format json`, the daemon's last state; never
|
||||
`refresh`). Where Canonical's client is installed and its status does not read without root, a
|
||||
driver that can gain root supplies `_run_livepatch_status_command` and the mixin reads
|
||||
`LIVEPATCH_STATUS_COMMAND` again through it.
|
||||
|
||||
`HardeningMixin` (`get_hardening`) is mixed in the same way: how the host is hardened, as
|
||||
its kernel and its own tools say it, in one read-only command. The active security modules
|
||||
|
||||
Reference in new issue
Block a user