[PATCH v2 5/5] drivers: Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Reviewed-by: Jiri Slaby (For tty) Reviewed-by: Lyude Paul (For nouveau)

[PATCH v2 3/5] net: Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Johannes Berg --- net/wireless/wext-core.c | 4 +--- 1 file changed

[PATCH v2 4/5] security: Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Reviewed-by: Paul Moore Acked-by: Kees Cook Cc: James Morris Cc: "

[PATCH v2 1/5] kernel: Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Serge Hallyn Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra

[PATCH v2 2/5] arch: Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Vineet Gupta Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov

[PATCH v2 0/5] Remove get_task_comm() and print task comm directly

2024-12-18 Thread Yafang Shao
//lore.kernel.org/all/20241213054610.55843-1-laoar.s...@gmail.com/ Yafang Shao (5): kernel: Remove get_task_comm() and print task comm directly arch: Remove get_task_comm() and print task comm directly net: Remove get_task_comm() and print task comm directly security: Remove get_task_comm() and pri

Re: [PATCH 1/7] vsprintf: Add %pTN to print task name

2024-12-13 Thread Yafang Shao
On Fri, Dec 13, 2024 at 4:05 PM Petr Mladek wrote: > > On Fri 2024-12-13 13:46:04, Yafang Shao wrote: > > Since the task->comm is guaranteed to be NUL-ternimated, we can print it > > directly. Add a new vsnprintf format specifier "%pTN" to print task comm, &g

[PATCH 4/7] net: Replace get_task_comm() with %pTN

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Johannes Berg --- net/wireless/wext-core.c | 6 ++ 1 file changed

[PATCH 1/7] vsprintf: Add %pTN to print task name

2024-12-12 Thread Yafang Shao
ion, the user no longer needs to care about retrieving task name. checkpatch.pl is updated accordingly. Link: https://lore.kernel.org/bpf/CAHk-=wgqrwFXK-CO8-V4fwUh5ymnUZ=wjnfyufv1dm9rc1t...@mail.gmail.com Suggested-by: Linus Torvalds Signed-off-by: Yafang Shao Cc: Andrew Morton Cc: Petr Mladek

[PATCH 7/7] fs: Use %pTN to print task name

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi --- fs/ocfs2/clus

[PATCH 6/7] drivers: Repace get_task_comm() with %pTN

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Ofir Bitton Cc: Oded Gabbay Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Joo

[PATCH 5/7] security: Replace get_task_comm() with %pTN

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Kees Cook Cc: Paul Moore Cc: James Morris Cc: "Serge E

[PATCH 3/7] arch: Replace get_task_comm() with %pTN

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Vineet Gupta Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov

[PATCH 2/7] kernel: Replace get_task_comm() with %pTN

2024-12-12 Thread Yafang Shao
Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copye it into a separate buffer. This simplifies the code and avoids unnecessary operations. Signed-off-by: Yafang Shao Cc: Serge Hallyn Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra

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

2024-12-12 Thread Yafang Shao
a subsequent patch. Suggested-by: Linus Torvalds Link: https://lore.kernel.org/bpf/CAHk-=wgqrwFXK-CO8-V4fwUh5ymnUZ=wjnfyufv1dm9rc1t...@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