[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) Cc: Od

[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, 1 ins

[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: "Serge E. Ha

[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 Cc:

[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 Cc:

[PATCH v2 0/5] 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. v1->v2: - Don't add "%pTN" (Petr, Kalle, Borislav, Andy, Linus) v1: https://lore.kernel.org/all/20241213054