Thread (10 messages) 10 messages, 3 authors, 2021-09-01

Re: [PATCH] ANDROID: staging: add userpanic-dev driver

From: Woody Lin <hidden>
Date: 2021-08-26 10:24:10
Also in: lkml

On Thu, Aug 26, 2021 at 5:48 PM Greg Kroah-Hartman
[off-list ref] wrote:
On Thu, Aug 26, 2021 at 05:28:54PM +0800, Woody Lin wrote:
quoted
Add char device driver 'userpanic-dev' that exposes an interface to
userspace processes to request a system panic with customized panic
message.

Signed-off-by: Woody Lin <redacted>
---
 drivers/staging/android/Kconfig         |  12 +++
 drivers/staging/android/Makefile        |   1 +
 drivers/staging/android/userpanic-dev.c | 110 ++++++++++++++++++++++++
Why is this in staging?  What is wrong with it that it can not just go
into the real part of the kernel?  A TODO file is needed explaining what
needs to be done here in order for it to be accepted.
Got it. No more TODO for this driver and I will move it to drivers/android/.
But why is this really needed at all?  Why would userspace want to panic
the kernel in yet-another-way?
The idea is to panic the kernel with a panic message specified by the userspace
process requesting the panic. Without this the panic handler can only collect
panic message "sysrq triggered crash" for a panic triggered by user processes.
Using this driver, user processes can put an informative description -
process name,
reason ...etc. - to the panic message.
thanks,

greg k-h
Regards,
Woody
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help