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)
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
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: "
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
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
//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
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
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
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
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
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
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
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
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
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
15 matches
Mail list logo