From patchwork Mon Mar 31 12:18:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh X-Patchwork-Id: 14033751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 975FBC3600B for ; Mon, 31 Mar 2025 15:58:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B9565280003; Mon, 31 Mar 2025 11:58:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B449F280001; Mon, 31 Mar 2025 11:58:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0D5E280003; Mon, 31 Mar 2025 11:58:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 86999280001 for ; Mon, 31 Mar 2025 11:58:48 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BDEC1A8C49 for ; Mon, 31 Mar 2025 12:18:56 +0000 (UTC) X-FDA: 83281750272.23.331A58F Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf22.hostedemail.com (Postfix) with ESMTP id 22701C0013 for ; Mon, 31 Mar 2025 12:18:54 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=TqEYOS1L; spf=pass (imf22.hostedemail.com: domain of bhupesh@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=bhupesh@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743423535; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1vPxYQklOIhLFkReMGUcHBCTjGCn9JiiqKZjhqBdRYE=; b=bRUq8TVEXuVAiFQ9foRThBjXuJy0lyMcrLvBR4mIF0DjQWVjO8p+7Oy4Dhbol71eVhXK+p nueFnWk7qWwVGkX1o2p731OiCQpbBH3rlFkuvmLKkZ7hQMoFuUklnitMrYEcTaK9C8gArD /Q+e2OzwckZ0Qz/SpH4K2gam91cP+nU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743423535; a=rsa-sha256; cv=none; b=tqMlSX6EHdefuNy+xjkteCznVihRZeVf4ZXMPDoOPvYH8SFohe/D9aaV/iFmkPrRr7Ibuw FY0eDOSQl/Lkb0Iaf/15OMcC/ey5VDs9uyCDhlSKfAjxp9bpGelnEzAxfQWB3CXORqwlFA cM2mbPcOMpwFBInr0d/12QkyDOxoEi0= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=TqEYOS1L; spf=pass (imf22.hostedemail.com: domain of bhupesh@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=bhupesh@igalia.com; dmarc=pass (policy=none) header.from=igalia.com 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=1vPxYQklOIhLFkReMGUcHBCTjGCn9JiiqKZjhqBdRYE=; b=TqEYOS1L0FuyNPN6TTGJbIhjWh Wv6kmaGcSFWdzjyJpWyzinSSBVAvoahZ250TPc1+V1nKbFfVCBHv+FvFswD5tjZsh2dAkXqtnmTqn 5zHVmbIIPu8Jo0kw6gSUSxx9FqGex6HFS2inBsaidT5/qFyGPtuKfYSej51pL3w2heC79jIeihsYX Bv+yr86mXTMVr04VBnoEKyF1IRgG84bZ0qFmsuV2jRLOhgTfXlx/Z4jwy4Sbkd/l9Rbs805RMbwSk em+a+oZX74gkW+JRxRK6rA1gPrTj5zz4XLyDTiurr4h06HWLoQEhfwFblTMYFQEazwBPiYZg7S4O1 pmUfRABg==; Received: from [223.233.69.2] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1tzE6M-009Btr-UZ; Mon, 31 Mar 2025 14:18:51 +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 Subject: [PATCH v2 2/3] fs/proc: Pass 'task->full_name' via 'proc_task_name()' Date: Mon, 31 Mar 2025 17:48:19 +0530 Message-Id: <20250331121820.455916-3-bhupesh@igalia.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20250331121820.455916-1-bhupesh@igalia.com> References: <20250331121820.455916-1-bhupesh@igalia.com> MIME-Version: 1.0 X-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Zgj4s2eEXE283A0tcZ2Hd5e5fJ cWVuEf/5 Jg7RHjxKMwuyCvDoN9QTDR6YEFyW5pHE+JFaPtawjCgNI5y3hTn/IdUg3Tf0iU4RmRAf2d7nPfhcH7cOwDv3VKb21FVbXiEyUDJGDb48Zh4qhqDfZrnhvz0ZZfVy1QNodYO5odl+EvoF+A0V0/hfpmQBFGij9iOJUfGZ/RkSeN3barh4Vouxz5XFDEs3MpHzAA5qX+Ti7e6K6GvFDgYxuqXDzfzhXZs0x3DIT5qomo2REvml/LBLy4IJI6Ze+dx6oADD0qgIfEhOEjYMM9e02b5/q4Y2GiHi0ZE6VYbjVnjJXvRWlLND0Ji+QsUWFwdJIKcAWhzKcGjLLhNcE/R79w7dmIl1xjdLMv9CUDxvJ4stwmlWsDVQIV0X6W7we43C1Ejnv4/oyLF9xAe0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that we have the get_task_full_name() implementation which allows the dynamically allocated and filled in task's full name to be passed to interested users, use it in proc_task_name() by default for task names so that user-land can see them through appropriate tools (such as 'ps'). Signed-off-by: Bhupesh --- fs/proc/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index d6a0369caa93..2cbeb1584f8a 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -109,7 +109,7 @@ void proc_task_name(struct seq_file *m, struct task_struct *p, bool escape) else if (p->flags & PF_KTHREAD) get_kthread_comm(tcomm, sizeof(tcomm), p); else - get_task_comm(tcomm, p); + get_task_full_name(tcomm, sizeof(tcomm), p); if (escape) seq_escape_str(m, tcomm, ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\");