public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled
@ 2022-08-09 15:35 Manish Mandlik
  2022-08-09 15:35 ` [PATCH v4 2/5] devcoredump: Add per device sysfs entry to enable/disable coredump Manish Mandlik
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Manish Mandlik @ 2022-08-09 15:35 UTC (permalink / raw)
  To: Arend van Spriel, marcel, luiz.dentz
  Cc: chromeos-bluetooth-upstreaming, linux-bluetooth, Manish Mandlik,
	Abhishek Pandit-Subedi, linux-kernel

This patch adds the specification for /sys/devices/.../coredump_disabled
attribute which allows the userspace to enable/disable devcoredump for a
particular device and drivers can use it to enable/disable functionality
accordingly. It is available when the CONFIG_DEV_COREDUMP is enabled and
driver has implemented the .coredump() callback.

Signed-off-by: Manish Mandlik <mmandlik@google.com>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---
Hi Arend,

The existing /sys/class/devcoredump/disabled provides only a one-way
disable functionality for devcoredump. It also disables the devcoredump
for everyone who is using it.

This and the next patch provides a way to selectively enable/disable the
devcoredump by creating a /sys/devices/.../coredump_disabled sysfs entry.
The userspace can write 0/1 to it to enable/disable devcoredump for that
particular device and drivers can use it accordingly. It will only be
available along with the /sys/devices/.../coredump sysfs entry when the
CONFIG_DEV_COREDUMP is enabled and the driver has implemented the
.coredump() callback.

Please let me know what you think about this.

Thanks,
Manish.

Changes in v4:
- New patch in the series

 Documentation/ABI/testing/sysfs-devices-coredump | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-devices-coredump b/Documentation/ABI/testing/sysfs-devices-coredump
index e459368533a4..4bcfc7dbad67 100644
--- a/Documentation/ABI/testing/sysfs-devices-coredump
+++ b/Documentation/ABI/testing/sysfs-devices-coredump
@@ -8,3 +8,17 @@ Description:
 		file will trigger the .coredump() callback.
 
 		Available when CONFIG_DEV_COREDUMP is enabled.
+
+What:		/sys/devices/.../coredump_disabled
+Date:		July 2022
+Contact:	Manish Mandlik <mmandlik@google.com>
+Description:
+		The /sys/devices/.../coredump_disabled attribute can be used by
+		drivers to selectively enable/disable devcoredump functionality
+		for a device. The userspace can write 0/1 to it to control
+		enabling/disabling of devcoredump for that particular device.
+		This attribute is present only when the device is bound to a
+		driver which implements the .coredump() callback. The attribute
+		is readable and writeable.
+
+		Available when CONFIG_DEV_COREDUMP is enabled.
-- 
2.37.1.559.g78731f0fdb-goog


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

end of thread, other threads:[~2022-08-09 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 15:35 [PATCH v4 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled Manish Mandlik
2022-08-09 15:35 ` [PATCH v4 2/5] devcoredump: Add per device sysfs entry to enable/disable coredump Manish Mandlik
2022-08-09 17:27   ` Greg Kroah-Hartman
2022-08-09 17:31   ` Greg Kroah-Hartman
2022-08-09 15:35 ` [PATCH v4 3/5] Bluetooth: Add support for hci devcoredump Manish Mandlik
2022-08-09 15:35 ` [PATCH v4 4/5] Bluetooth: btusb: Add btusb devcoredump support Manish Mandlik
2022-08-09 15:35 ` [PATCH v4 5/5] Bluetooth: btintel: Add Intel " Manish Mandlik
2022-08-09 16:09 ` [v4,1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled bluez.test.bot

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