From: sashiko-bot@kernel.org
To: "André Almeida" <andrealmeid@igalia.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/6] treewide: Replace memcpy(..., current->comm) with copy_task_comm()
Date: Thu, 10 Sep 2026 16:58:58 +0000 [thread overview]
Message-ID: <20260910165858.699241F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260910-tonyk-long_name-v6-2-d70afbf194c5@igalia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect argument passed to copy_task_comm() causes a compilation failure due to a type mismatch.
--
commit 78bb0b12f82412f87836e6af88b5c97b35cbb5ab
Author: André Almeida <andrealmeid@igalia.com>
treewide: Replace memcpy(..., current->comm) with copy_task_comm()
This commit introduces a new copy_task_comm() function that safely copies
a task's comm string while ensuring it is NUL terminated. It then replaces
various treewide instances of memcpy() copying task comms with this new
function to prevent truncation issues.
[ ... ]
> diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> index 45a5e41f3a920..27a1c12799cf6 100644
> --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod-events.h
> @@ -20,7 +20,7 @@ TRACE_EVENT(bpf_testmod_test_read,
> ),
> TP_fast_assign(
> __entry->pid = task->pid;
> - memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
> + copy_task_comm(__entry->comm, task->comm, TASK_COMM_LEN);
[Severity: Low]
Does this cause a build failure when compiling the bpf_testmod kernel module?
The new copy_task_comm() function expects a struct task_struct pointer as
its second argument, but task->comm (a char pointer) is being passed here
causing a type mismatch. Should this be updated to pass just task instead?
> __entry->off = ctx->off;
> __entry->len = ctx->len;
> ),
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910-tonyk-long_name-v6-0-d70afbf194c5@igalia.com?part=2
next prev parent reply other threads:[~2026-09-10 16:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 16:49 [PATCH v6 0/6] sched: Add support for long task name André Almeida
2026-09-10 16:49 ` [PATCH v6 1/6] treewide: Get rid of get_task_comm() André Almeida
2026-09-10 16:58 ` sashiko-bot
2026-09-10 16:49 ` [PATCH v6 2/6] treewide: Replace memcpy(..., current->comm) with copy_task_comm() André Almeida
2026-09-10 16:58 ` sashiko-bot [this message]
2026-09-10 16:49 ` [PATCH v6 3/6] lib/string_kunit: Add test for copy_task_comm() André Almeida
2026-09-10 16:49 ` [PATCH v6 4/6] sched: Extend task command name with TASK_COMM_EXT_LEN André Almeida
2026-09-10 16:49 ` [PATCH v6 5/6] prctl: Add support for long user thread names André Almeida
2026-09-10 17:12 ` sashiko-bot
2026-09-10 16:49 ` [PATCH v6 6/6] selftests: prctl: Add test for long " André Almeida
2026-09-10 17:00 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260910165858.699241F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.