Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] reboot: log the task that initiated
@ 2026-07-21 15:13 Bradley Morgan
  2026-07-21 15:13 ` [PATCH v2 1/3] reboot: log the task that initiated the reboot Bradley Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bradley Morgan @ 2026-07-21 15:13 UTC (permalink / raw)
  To: akpm
  Cc: baoquan.he, rppt, pasha.tatashin, pratyush, rafael, lenb, pavel,
	kees, tony.luck, gpiccoli, linux-kernel, kexec, linux-pm,
	Bradley Morgan

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/20260719160938.3692-1-include@grrlz.net/

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(+)

-- 
2.50.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-21 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 15:13 [PATCH v2 0/3] reboot: log the task that initiated Bradley Morgan
2026-07-21 15:13 ` [PATCH v2 1/3] reboot: log the task that initiated the reboot Bradley Morgan
2026-07-21 15:13 ` [PATCH v2 2/3] kexec: log the task that initiated the kexec reboot Bradley Morgan
2026-07-21 15:13 ` [PATCH v2 3/3] PM: hibernate: log the task that initiated the power down Bradley Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox