mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Bradley Morgan <include@grrlz.net>
Cc: Kees Cook <kees@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] reboot: log the task that requested a reboot or shutdown
Date: Sun, 19 Jul 2026 23:15:40 -0700	[thread overview]
Message-ID: <20260719231540.455bd5c3eac842686c05bd7f@linux-foundation.org> (raw)
In-Reply-To: <20260719160938.3692-1-include@grrlz.net>

On Sun, 19 Jul 2026 16:09:38 +0000 Bradley Morgan <include@grrlz.net> wrote:

> When a machine reboots or powers off, the kernel log records what
> happened but not who asked for it.  The reboot syscall throws the
> caller identity away, and reconstructing it afterwards from userspace
> logs is unreliable and more likely than not impossible.
> "What made this reboot?" is a question every fleet operator has had to
> answer with guesswork.

There's a need for this?  May I ask your source for this information?

> Log the comm and pid of the calling task in the reboot syscall, once
> the requested command is committed and can no longer fail, e.g:
> 
>   reboot: initiated by systemd-shutdow[1]
>   reboot: Restarting system

I can see it might be useful.

> The existing "Restarting system", "System halted" and "Power down"
> lines are left untouched, so anything parsing dmesg today keeps
> working. The two ctrl alt del toggle commands are excluded so init
> setting the mode does not add a line to dmesg on every boot.

Perhaps kexec and swsusp would benefit from the same treatment. 
Perhaps add the relevant maintainers to cc and seek their input?



  reply	other threads:[~2026-07-20  6:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 16:09 Bradley Morgan
2026-07-20  6:15 ` Andrew Morton [this message]
2026-07-20  7:51   ` Bradley Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260719231540.455bd5c3eac842686c05bd7f@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=include@grrlz.net \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®