From patchwork Fri Feb 4 14:50:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuo Handa X-Patchwork-Id: 12735195 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 85E23C433F5 for ; Fri, 4 Feb 2022 14:50:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE1626B0072; Fri, 4 Feb 2022 09:50:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B91D66B0073; Fri, 4 Feb 2022 09:50:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7FD96B0074; Fri, 4 Feb 2022 09:50:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id 9989E6B0072 for ; Fri, 4 Feb 2022 09:50:18 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 514E718265264 for ; Fri, 4 Feb 2022 14:50:18 +0000 (UTC) X-FDA: 79105382916.31.EDB447C Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by imf20.hostedemail.com (Postfix) with ESMTP id 54FA01C0002 for ; Fri, 4 Feb 2022 14:50:17 +0000 (UTC) Received: from fsav119.sakura.ne.jp (fsav119.sakura.ne.jp [27.133.134.246]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 214EoBeY028271; Fri, 4 Feb 2022 23:50:11 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav119.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav119.sakura.ne.jp); Fri, 04 Feb 2022 23:50:11 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav119.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 214EoBw1028265 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 4 Feb 2022 23:50:11 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <8655db93-8700-686e-cf03-68738c3f66f4@I-love.SAKURA.ne.jp> Date: Fri, 4 Feb 2022 23:50:12 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Michael Kerrisk Cc: linux-fsdevel , linux-mm From: Tetsuo Handa Subject: proc.5: Update /proc/[pid]/task/[tid]/ example file X-Stat-Signature: q7c4bz9zktp3d7o7fqs7mcf13qwkansm X-Rspam-User: nil Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=none; spf=none (imf20.hostedemail.com: domain of penguin-kernel@I-love.SAKURA.ne.jp has no SPF policy when checking 202.181.97.72) smtp.mailfrom=penguin-kernel@I-love.SAKURA.ne.jp X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 54FA01C0002 X-HE-Tag: 1643986217-996948 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: Since all of the /proc/[pid]/task/[tid]/cwd files are allowed to have different values (so that threads can use relative pathnames), using cwd file as an example of "have the same value" is not appropriate. Since threads in a multithreaded process are created using CLONE_VM flag, all of the /proc/[pid]/task/[tid]/maps files must have the same value. Therefore, let's use maps file as an example. --- Should I use [PATCH] and S-o-b for changes not in kernel tree? I didn't use them in order not to be caught by testing bot process. man5/proc.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man5/proc.5 b/man5/proc.5 index c6684620e..ea952b10f 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -2830,11 +2830,11 @@ file in the parent .I /proc/[pid] directory (e.g., in a multithreaded process, all of the -.I task/[tid]/cwd +.I task/[tid]/maps files will have the same value as the -.I /proc/[pid]/cwd +.I /proc/[pid]/maps file in the parent directory, since all of the threads in a process -share a working directory). +share the same memory space). For attributes that are distinct for each thread, the corresponding files under .I task/[tid]