The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/3] debugfs: make debugfs_create_str() read-only
@ 2026-08-06  8:48 Yichong Chen
  2026-08-06  8:48 ` [PATCH v2 1/3] interconnect: debugfs: replace writable string helper Yichong Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Yichong Chen @ 2026-08-06  8:48 UTC (permalink / raw)
  To: gregkh
  Cc: rafael, dakr, djakov, quic_mdtipton, vkoul, yung-chuan.liao,
	pierre-louis.bossart, driver-core, linux-kernel, linux-pm,
	linux-sound, Yichong Chen

debugfs_create_str() currently supports writable files through a generic
string replacement helper.  Concurrent writers can race in that helper.

Instead of adding more locking to the generic debugfs string code, convert
the existing writable in-tree users to local file operations first, then make
debugfs_create_str() read-only and refuse modes with write permission bits.

Changes since v1:
- Follow Greg's suggestion to avoid adding locking to the generic
  debugfs_create_str() write path.
- Convert the existing writable in-tree users to local file operations.
- Make debugfs_create_str() read-only and refuse writable modes.
- Split the change into a 3-patch series.

Yichong Chen (3):
  interconnect: debugfs: replace writable string helper
  soundwire: debugfs: replace writable string helper
  debugfs: make debugfs_create_str() read-only

 drivers/interconnect/debugfs-client.c | 75 ++++++++++++++++++++-----
 drivers/soundwire/debugfs.c           | 56 ++++++++++++++++--
 fs/debugfs/file.c                     | 81 ++++-----------------------
 3 files changed, 124 insertions(+), 88 deletions(-)

-- 
2.51.0

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

end of thread, other threads:[~2026-08-07  2:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06  8:48 [PATCH v2 0/3] debugfs: make debugfs_create_str() read-only Yichong Chen
2026-08-06  8:48 ` [PATCH v2 1/3] interconnect: debugfs: replace writable string helper Yichong Chen
2026-08-06  9:01   ` Greg KH
2026-08-07  1:59     ` Yichong Chen
2026-08-06  8:48 ` [PATCH v2 2/3] soundwire: " Yichong Chen
2026-08-06  9:02   ` Greg KH
2026-08-06  8:48 ` [PATCH v2 3/3] debugfs: make debugfs_create_str() read-only Yichong Chen
2026-08-06  9:02   ` Greg KH

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