From patchwork Wed Nov 2 08:15:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Linxuan X-Patchwork-Id: 14073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3481220wru; Wed, 2 Nov 2022 01:19:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4mAUBrR7UKOr6troaDlBJ4/QC6g7pUbkfJVYMjtr1ieZTyKeZFhznjDgevQZHdAGhSA87b X-Received: by 2002:a05:6a00:1889:b0:56c:3d4f:ae14 with SMTP id x9-20020a056a00188900b0056c3d4fae14mr23611589pfh.49.1667377149782; Wed, 02 Nov 2022 01:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667377149; cv=none; d=google.com; s=arc-20160816; b=lLWptpsF9hpUCleMOrVaI/tbjkbWMDR4yma21AHwl/EUPZenRWOIZ+Vy55ypk0s2a7 w7vKpX3mpP0ItqycJdv3DNtyQZSeMSvqb1lKSOKfJsPr9LZlvpYfR9oVyKG6g+t5z7SK IDDM/RjPP23MY0ayCiVujIBwArPVtHtx1ZXkILV4IjXyGOq8Zi4BRNZdWy8/QuV/Lut8 1mZLUVNcnl2sVPKJwiMFRo5jMZmfRtb7C+QaEj1RYpjPDpcLEgsYMM4bYRIAt+XUELwb F74xlmG0tzS2etA7IvMm3jxlZbGXKawSmgLAL/WoU1t1e7HE7OFZtVJEPLiY8CTQ4FLO 5sPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=k71nA6t6KkYbTVj2ZYaP+5YvFttnA/endttout3YXyI=; b=L10lvYu/xdyY4q5eswZxOMvLmqFUF+si1rR4W4wWrypBtcicskFw36AUMlnkrF/tkd rkaAP3E4ysU4qzJJO+fB5QdQYeIXvH6bk3zvo0b/iRDQLXwATROtliAOpKWTjJ7uCgr8 ceaVlS3hxV/dut6IuYgz1uXyYlvDTU8aqYJT24ZghCPxaElC/bP8dackLFiVluy6bAsy tAKU+IXfALS9tuxiNV7MD9pb8h5c3y3aLtKovFXHO/nirtReycHSbMQ9MeiOuOSy+J2D gznxPpohD52fOrDv9Ni0YszL/dDiPpmQc+w1RoOhbvPUUpm2uFyCGBd0ecp+vV/Wju4z aD5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g70-20020a636b49000000b0046ed15a820esi15719767pgc.385.2022.11.02.01.18.54; Wed, 02 Nov 2022 01:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbiKBIQL (ORCPT + 99 others); Wed, 2 Nov 2022 04:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230171AbiKBIQA (ORCPT ); Wed, 2 Nov 2022 04:16:00 -0400 Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51A491FCD9; Wed, 2 Nov 2022 01:15:56 -0700 (PDT) X-QQ-mid: bizesmtp65t1667376944t1aaelus Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 02 Nov 2022 16:15:43 +0800 (CST) X-QQ-SSF: 01400000000000B0E000000A0000020 X-QQ-FEAT: +ynUkgUhZJnFi+nBwbjX5Y6S1DXktWOdmidqSUs8sMgNyFzkIDG30PQjjlYry uKGj47UpcJ25qQSY87LcC8fEFDed43t65dtRZsDFV7hFlax4ZIsd7Lw0Sxwa8Vmd3eEHp07 OpRLotAh/nYXqXuoF0iFxfM6VRj3zgxhPnQcJ34cud2dbT4LKLoDs9gVnA1r10kJZ9avufC 7vWvpqJL/VuLzDM1rf0Q9AZRM/cmFwwWLJmEUl1XYxzYxMm6JDZI9pjLti43molP2mHgTyO 04AnLrIscXwn4FeIocgQt4/m2XRwSFyHXm/x5TJG4gbrACLz1O8sFs4MvP5V626vBYFFb/g U1+6JgVdOWWsxgU2tnR9wImzlVkJa89N0C6dUMXrXbhT7w4avx4zU5+6a0EtvJeGEcSweVH X-QQ-GoodBg: 1 From: Chen Linxuan To: Jonathan Corbet Cc: Chen Linxuan , Yuan Haisheng , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH] Documentation: update the description of TracerPid in procfs.rst Date: Wed, 2 Nov 2022 16:15:17 +0800 Message-Id: <20221102081517.19770-1-chenlinxuan@uniontech.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvr:qybglogicsvr6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748371662300606377?= X-GMAIL-MSGID: =?utf-8?q?1748371662300606377?= When the tracer of process is outside of current pid namespace, field `TracerPid` in /proc//status will be 0, too, just like this process not have been traced. This is because that function `task_pid_nr_ns` used to get the pid of tracer will return 0 in this situation. Co-authored-by: Yuan Haisheng Signed-off-by: Chen Linxuan --- Documentation/filesystems/proc.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 898c99eae8e4..e98e0277f05e 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -245,7 +245,8 @@ It's slow but very precise. Ngid NUMA group ID (0 if none) Pid process id PPid process id of the parent process - TracerPid PID of process tracing this process (0 if not) + TracerPid PID of process tracing this process (0 if not, or + the tracer is outside of the current pid namespace) Uid Real, effective, saved set, and file system UIDs Gid Real, effective, saved set, and file system GIDs FDSize number of file descriptor slots currently allocated