Skip to content

reboot: log the task that initiated

Bradley Morgan kexec linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 4 repliesIn review

Changes in v2 from the cover letter

- Reworded the justification in patch 1: dropped the fleet operator claim and spelled out the concrete gap in userspace logging
- New patch 2: log the initiator for kexec reboots
- New patch 3: log the initiator for the hibernation power down
- Added the kexec and PM maintainers and lists to cc

[1] https://lore.kernel.org/all/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3reboot: log the task that initiated the rebootinclude/linux/reboot.h kernel/reboot.c+17 -00 replies
2/3kexec: log the task that initiated the kexec rebootkernel/kexec_core.c+1 -00 replies
3/3PM: hibernate: log the task that initiated the power downkernel/power/hibernate.c+2 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] reboot: log the task that initiated

When a machine reboots, powers off, kexecs or hibernates, the kernel log records what happened but not who asked for it. This series logs the comm and pid of the initiating task once the transition is committed:

reboot: initiated by systemd-shutdow[1]
reboot: Restarting system

Patch 1 covers the restart, halt and power off commands of the reboot syscall. Patches 2 and 3 give kexec and the hibernation power down the same treatment at their own points of no return, as suggested in the v1 review [1]. The kexec and PM maintainers are on cc for their input on those two.

v1 -> v2:
- Reworded the justification in patch 1: dropped the fleet operator claim and spelled out the concrete gap in userspace logging
- New patch 2: log the initiator for kexec reboots
- New patch 3: log the initiator for the hibernation power down
- Added the kexec and PM maintainers and lists to cc

[1] https://lore.kernel.org/all/[email protected]/

Bradley Morgan (3):
reboot: log the task that initiated the reboot
kexec: log the task that initiated the kexec reboot
PM: hibernate: log the task that initiated the power down

 include/linux/reboot.h   |  1 +
 kernel/kexec_core.c      |  1 +
 kernel/power/hibernate.c |  2 ++
 kernel/reboot.c          | 16 ++++++++++++++++
 4 files changed, 20 insertions(+)
Signature · 1 line
2.50.1