linux-snps-arc.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] vsprintf: Add %pTN to print Task Name
@ 2024-12-13  5:46 Yafang Shao
  2024-12-13  5:46 ` [PATCH 1/7] vsprintf: Add %pTN to print task name Yafang Shao
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Yafang Shao @ 2024-12-13  5:46 UTC (permalink / raw)
  To: torvalds, akpm
  Cc: linux-kernel, linux-security-module, x86, linux-snps-arc,
	linux-wireless, intel-gfx, intel-xe, nouveau, dri-devel,
	ocfs2-devel, Yafang Shao

Since task->comm is guaranteed to be NUL-terminated, it can be printed
directly. This patch introduces a new vsnprintf format specifier, %pTN, to
print a task's name. In this specifier, p represents the task pointer, T
stands for "Task," and N denotes "Name." With this abstraction, users no
longer need to manually retrieve the task name for printing purposes.

In this patchset, all instances of get_task_comm() used for printing the
task name have been replaced with the new %pTN specifier. The raw uses of
'xyz->comm' for printouts will be addressed in a subsequent patch.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/bpf/CAHk-=wgqrwFXK-CO8-V4fwUh5ymnUZ=wJnFyufV1dM9rC1t3Lg@mail.gmail.com 

Yafang Shao (7):
  vsprintf: Add %pTN to print task name
  kernel: Replace get_task_comm() with %pTN
  arch: Replace get_task_comm() with %pTN
  net: Replace get_task_comm() with %pTN
  security: Replace get_task_comm() with %pTN
  drivers: Repace get_task_comm() with %pTN
  fs: Use %pTN to print task name

 arch/arc/kernel/unaligned.c                    |  9 ++++-----
 arch/x86/kernel/vm86_32.c                      |  5 ++---
 drivers/accel/habanalabs/common/context.c      |  5 ++---
 .../accel/habanalabs/common/habanalabs_ioctl.c | 15 +++++----------
 .../drm/i915/display/intel_display_driver.c    | 10 ++++------
 drivers/gpu/drm/nouveau/nouveau_chan.c         |  4 +---
 drivers/gpu/drm/nouveau/nouveau_drm.c          |  7 +++----
 drivers/tty/tty_io.c                           |  5 ++---
 fs/ocfs2/cluster/netdebug.c                    |  5 ++---
 kernel/capability.c                            | 12 ++++--------
 kernel/futex/waitwake.c                        |  5 ++---
 lib/vsprintf.c                                 | 18 ++++++++++++++++++
 net/wireless/wext-core.c                       |  6 ++----
 scripts/checkpatch.pl                          |  6 ++++--
 security/yama/yama_lsm.c                       |  6 ++----
 15 files changed, 57 insertions(+), 61 deletions(-)

-- 
2.43.5


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

end of thread, other threads:[~2024-12-17  1:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  5:46 [PATCH 0/7] vsprintf: Add %pTN to print Task Name Yafang Shao
2024-12-13  5:46 ` [PATCH 1/7] vsprintf: Add %pTN to print task name Yafang Shao
2024-12-13  8:05   ` Petr Mladek
2024-12-13  8:35     ` Kalle Valo
2024-12-13 13:27       ` Borislav Petkov
2024-12-13 17:11         ` Andy Shevchenko
2024-12-13  8:36     ` Yafang Shao
2024-12-13  5:46 ` [PATCH 2/7] kernel: Replace get_task_comm() with %pTN Yafang Shao
2024-12-13  5:46 ` [PATCH 3/7] arch: " Yafang Shao
2024-12-13  5:46 ` [PATCH 4/7] net: " Yafang Shao
2024-12-13  5:46 ` [PATCH 5/7] security: " Yafang Shao
2024-12-16 23:02   ` Paul Moore
2024-12-17  0:41   ` Kees Cook
2024-12-17  1:08   ` Linus Torvalds
2024-12-13  5:46 ` [PATCH 6/7] drivers: Repace " Yafang Shao
2024-12-13  7:48   ` Jiri Slaby
2024-12-16 20:33   ` Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).