All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Mandlik <mmandlik@google.com>
To: Arend van Spriel <aspriel@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	marcel@holtmann.org, luiz.dentz@gmail.com
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Dan Williams <dan.j.williams@intel.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"Signed-off-by : Manish Mandlik" <mmandlik@google.com>,
	linux-bluetooth@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	chromeos-bluetooth-upstreaming@chromium.org,
	Won Chung <wonchung@google.com>,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v5 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled
Date: Wed, 10 Aug 2022 09:00:34 -0700	[thread overview]
Message-ID: <20220810085753.v5.1.I5622b2a92dca4d2703a0f747e24f3ef19303e6df@changeid> (raw)

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.

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

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.

(no changes since v4)

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


             reply	other threads:[~2022-08-10 16:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 16:00 Manish Mandlik [this message]
2022-08-10 16:00 ` [PATCH v5 2/5] devcoredump: Add per device sysfs entry to enable/disable coredump Manish Mandlik
2022-08-10 16:00 ` [PATCH v5 3/5] Bluetooth: Add support for hci devcoredump Manish Mandlik
2022-08-10 16:19   ` Greg Kroah-Hartman
2022-08-12 18:59   ` kernel test robot
2022-08-12 19:19   ` kernel test robot
2022-08-10 16:00 ` [PATCH v5 4/5] Bluetooth: btusb: Add btusb devcoredump support Manish Mandlik
2022-08-10 16:20   ` Greg Kroah-Hartman
2022-08-10 16:00 ` [PATCH v5 5/5] Bluetooth: btintel: Add Intel " Manish Mandlik
2022-08-10 16:21   ` Greg Kroah-Hartman
2022-08-10 16:03 ` [PATCH v5 1/5] sysfs: Add attribute info for /sys/devices/.../coredump_disabled Johannes Berg
2022-08-10 16:21   ` Greg Kroah-Hartman
     [not found]     ` <CAGPPCLAV=mnMcteCnqFT5zdbWdZuFQRv6-oxC3qAnLh8_8H61Q@mail.gmail.com>
2022-08-12  6:09       ` Greg Kroah-Hartman
2022-08-13  9:39         ` Arend van Spriel
2022-08-10 16:22 ` Greg Kroah-Hartman
2022-08-10 17:25 ` [v5,1/5] " bluez.test.bot

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=20220810085753.v5.1.I5622b2a92dca4d2703a0f747e24f3ef19303e6df@changeid \
    --to=mmandlik@google.com \
    --cc=abhishekpandit@chromium.org \
    --cc=aspriel@gmail.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgg@ziepe.ca \
    --cc=johannes@sipsolutions.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wonchung@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.