Re: [PATCH v2 06/10] mm/kmemleak: Replace strncpy() with __get_task_comm()

2024-06-14 Thread Yafang Shao
On Fri, Jun 14, 2024 at 6:57 PM Catalin Marinas wrote: > > On Thu, Jun 13, 2024 at 08:10:17PM +0800, Yafang Shao wrote: > > On Thu, Jun 13, 2024 at 4:37 PM Catalin Marinas > > wrote: > > > On Thu, Jun 13, 2024 at 10:30:40AM +0800, Yafang Shao wrote: > > > > Using __get_task_comm() to read the ta

Re: [PATCH v2 06/10] mm/kmemleak: Replace strncpy() with __get_task_comm()

2024-06-14 Thread Catalin Marinas
On Thu, Jun 13, 2024 at 08:10:17PM +0800, Yafang Shao wrote: > On Thu, Jun 13, 2024 at 4:37 PM Catalin Marinas > wrote: > > On Thu, Jun 13, 2024 at 10:30:40AM +0800, Yafang Shao wrote: > > > Using __get_task_comm() to read the task comm ensures that the name is > > > always NUL-terminated, regard

Re: [PATCH v2 06/10] mm/kmemleak: Replace strncpy() with __get_task_comm()

2024-06-14 Thread Yafang Shao
On Thu, Jun 13, 2024 at 4:37 PM Catalin Marinas wrote: > > On Thu, Jun 13, 2024 at 10:30:40AM +0800, Yafang Shao wrote: > > Using __get_task_comm() to read the task comm ensures that the name is > > always NUL-terminated, regardless of the source string. This approach also > > facilitates future e

[PATCH v2 06/10] mm/kmemleak: Replace strncpy() with __get_task_comm()

2024-06-13 Thread Yafang Shao
Using __get_task_comm() to read the task comm ensures that the name is always NUL-terminated, regardless of the source string. This approach also facilitates future extensions to the task comm. Signed-off-by: Yafang Shao Cc: Catalin Marinas Cc: Andrew Morton --- mm/kmemleak.c | 8 +--- 1 f

Re: [PATCH v2 06/10] mm/kmemleak: Replace strncpy() with __get_task_comm()

2024-06-13 Thread Catalin Marinas
On Thu, Jun 13, 2024 at 10:30:40AM +0800, Yafang Shao wrote: > Using __get_task_comm() to read the task comm ensures that the name is > always NUL-terminated, regardless of the source string. This approach also > facilitates future extensions to the task comm. > > Signed-off-by: Yafang Shao > Cc: