From nobody Tue Oct 7 02:17:17 2025 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B22521B9C8; Wed, 16 Jul 2025 12:39:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752669597; cv=none; b=X/aoNUYd5WtbtNzCkVLgw60KRXSMo1dTXXnU1FfW+DmMtrHBRMl4/i5We21vzbOyfP91w48r7k5OMq6UrRMp2NLmyiB8uGu16Rokyz1IhzR5njkf6cLSJZyf0vjDjZRBCItMlsr8aTVMD9+6ZrFQg+2mbsPe+6DaWvUOE0UFW/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752669597; c=relaxed/simple; bh=i1SVJ3+2R/vp1ZXsd0Ban/G1Pyv2ayzdehl79YdIOK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZufLQKr9feR+qytzx6/bAEDFKpG2FwLqq1OC+4M2gwTPxFnNoxU1mdYHt0/pgm0SNnO4sVvoE3fvGDJ2LXPImMCZtGxC+evrYepwA9v6WqOkhAJhmtBbV5Hl7Rs5QH6LT+240wzgSKtpp3jN1rZouxqq4z2ruAR5GdSqszlxoTc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=XSF34Vb3; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="XSF34Vb3" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LIecn/s0XJyBzk5ig5xvXaUaLyW0bSQpdUeBiP+9otU=; b=XSF34Vb3cm3SHYamAMbe5XTlEM LUXnrBMnXrF46jKD8b7XI3Y9oZ+R2ID5v0OQXpZ3mCP2LzohtxLLUME5+XK4ALq0/KqSFtSZq4tAz 8xB/fsOEuKp7jHdGpCJpGcOSMYJi00eVWfPITNu7QIRb1UH94xK/HmdcsZjFeQqpdzASyyo7lp8Tr VE8l4yTaKWxO5ofYcU1IwZLkuihzvtfiitPXlPRHEvq53lRIo6J8lv6Ma0Wez0q5b8rnnZOaRNZTx Okun3oeVodxgfjGnzmDinHqzB3RmREAyqhstkSw7GeuHVsmiC9Vu0a3CocqkvKhQsXEreOkNH3E1t X2cRPy4w==; Received: from [223.233.66.171] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1uc1QI-00HJWV-0N; Wed, 16 Jul 2025 14:39:46 +0200 From: Bhupesh To: akpm@linux-foundation.org Cc: bhupesh@igalia.com, kernel-dev@igalia.com, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, oliver.sang@intel.com, lkp@intel.com, laoar.shao@gmail.com, pmladek@suse.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, arnaldo.melo@gmail.com, alexei.starovoitov@gmail.com, andrii.nakryiko@gmail.com, mirq-linux@rere.qmqm.pl, peterz@infradead.org, willy@infradead.org, david@redhat.com, viro@zeniv.linux.org.uk, keescook@chromium.org, ebiederm@xmission.com, brauner@kernel.org, jack@suse.cz, mingo@redhat.com, juri.lelli@redhat.com, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-trace-kernel@vger.kernel.org, kees@kernel.org, torvalds@linux-foundation.org Subject: [PATCH v5 1/3] exec: Remove obsolete comments Date: Wed, 16 Jul 2025 18:09:14 +0530 Message-Id: <20250716123916.511889-2-bhupesh@igalia.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20250716123916.511889-1-bhupesh@igalia.com> References: <20250716123916.511889-1-bhupesh@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Patch 3a3f61ce5e0b ("exec: Make sure task->comm is always NUL-terminated"), replaced 'strscpy_pad()' with 'memcpy()' implementations inside '__set_task_comm()'. However a few left-over comments are still there, which mention the usage of 'strscpy_pad()' inside '__set_task_comm()'. Remove those obsolete comments. While at it, also remove an obsolete comment regarding 'task_lock()' usage while handing 'task->comm'. Signed-off-by: Bhupesh --- include/linux/sched.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index d64d3e89bd11..a4a23267a982 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1155,10 +1155,8 @@ struct task_struct { * * - normally initialized begin_new_exec() * - set it with set_task_comm() - * - strscpy_pad() to ensure it is always NUL-terminated and + * - logic inside set_task_comm() will ensure it is always NUL-terminat= ed and * zero-padded - * - task_lock() to ensure the operation is atomic and the name is - * fully updated. */ char comm[TASK_COMM_LEN]; =20 @@ -1952,7 +1950,7 @@ extern void __set_task_comm(struct task_struct *tsk, = const char *from, bool exec * User space can randomly change their names anyway, so locking for rea= ders * doesn't make sense. For writers, locking is probably necessary, as a = race * condition could lead to long-term mixed results. - * The strscpy_pad() in __set_task_comm() can ensure that the task comm = is + * The logic inside __set_task_comm() should ensure that the task comm is * always NUL-terminated and zero-padded. Therefore the race condition b= etween * reader and writer is not an issue. * --=20 2.38.1