Skip to content

vsprintf: Add %pTN to print Task Name

Yafang Shao dri-devel intel-gfx intel-xe linux-security-module linux-snps-arc linux-wireless lkml nouveau ocfs2-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7vsprintf: Add %pTN to print task namelib/vsprintf.c scripts/checkpatch.pl+22 -25 replies
2/7kernel: Replace get_task_comm() with %pTNkernel/capability.c kernel/futex/waitwake.c+6 -110 replies
3/7arch: Replace get_task_comm() with %pTNarch/arc/kernel/unaligned.c arch/x86/kernel/vm86_32.c+6 -80 replies
4/7net: Replace get_task_comm() with %pTNnet/wireless/wext-core.c+2 -40 replies
5/7security: Replace get_task_comm() with %pTNsecurity/yama/yama_lsm.c+2 -43 replies
6/7drivers: Repace get_task_comm() with %pTNdrivers/accel/habanalabs/common/context.c drivers/accel/habanalabs/common/habanalabs_ioctl.c drivers/gpu/drm/i915/display/intel_display_driver.c +3 more+17 -292 replies
7/7fs: Use %pTN to print task namefs/ocfs2/cluster/netdebug.c+2 -30 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchJiri SlabyLyude PaulPaul MooreKees Cook
1/7
2/7
3/7
4/7
5/7R-b A-b
6/7R-b R-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] vsprintf: Add %pTN to print Task Name

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.

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(-)
Signature · 1 line
2.43.5