Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5773283ioo; Wed, 1 Jun 2022 12:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl1UzRQK9CSN7NGQcQ/Vawf84PNg7RcsPM4C+XcH9qn6SKNzGXSucM2ol52ZTWzm93shMN X-Received: by 2002:a05:6a00:ad0:b0:4f7:a357:6899 with SMTP id c16-20020a056a000ad000b004f7a3576899mr1112264pfl.80.1654110969892; Wed, 01 Jun 2022 12:16:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654110969; cv=pass; d=google.com; s=arc-20160816; b=NeXAvTg5tgybkwOi3LEfl5QI3vFBkCtUkfD8fJYXTvl0IYvVzDz6csFpvUdiJASXTO YLdzD048eoKxC1gNYz3aTsZQi/2JffdU7juWhY+gVFZuNIgHvBFpveuFO71077TfekEY 6cmiocELW0aamvWSuq3F3/a91JGq7OgWI+70UtIC419UDolg3Xto52QlznLyTNsjLooI EJpB6PX1Wsi/qgOsAgcA8dtr7YHVQfBuGlK06lbkWYMwAnr281QbLdMsshYvR10/3jhG Ktg9So7s6xcnmcH7jAO6FS/2JAi6JuJ5Jt9MsHuUAd2Q9NUy8I/papziyYV3CH7D5xhI 0CUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=doaBt3rHjKx9iK28vUcq4wmB1ISh9zs8gKHU5gQ6Fpg=; b=oqexdqOTiWr6i3cclSzNX4dBnqi/o9gwAbpYP67TuiSyqt3iuODfmu2cHUWLnGJAgX Ne3CBB1bsS/+i9IR4fonZ/NENdUhKvNr3ZMpPoxl3CqcRozBSTelgK3j8uMl+VnH9K5l JrlgFadBDcShgzJPOqBc4HyHiHHmmWlvNTr5hmoPh0US/8kYrHI9JqYtN5qqpY3YlNx6 v4crs7986YsiPXiZv7XlQ/jDt4m4ACrkDl8KQNIh0iA/2Id0obBgfudKuFj9LvUmXeSy XHu2di6+sSo65BrleG3YFyzkmZgLEoFyJ7aFnLNlTEymcEjI1dEkGZeLzqm6m/CFiA8M ZWtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ehTdBgmv; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TD9AHoYU; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k8-20020aa788c8000000b00518fc8adc58si2947059pff.380.2022.06.01.12.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ehTdBgmv; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TD9AHoYU; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C096C14AC98; Wed, 1 Jun 2022 11:53:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348312AbiEaWI2 (ORCPT + 99 others); Tue, 31 May 2022 18:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbiEaWIZ (ORCPT ); Tue, 31 May 2022 18:08:25 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05D75712D8; Tue, 31 May 2022 15:08:23 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24VKrxT9031603; Tue, 31 May 2022 22:07:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=doaBt3rHjKx9iK28vUcq4wmB1ISh9zs8gKHU5gQ6Fpg=; b=ehTdBgmvFKcytqcmolPSeZ4IUsnPVZog15A3le33pfyGmi8297oEzywC/BpqyUE0svO2 cCZq6Apw3wruIOZu6E7/A8HPRvoXFMdFr1Uqqkxfq9fYTomVCxgMZJCgMj4DtYS931kL LHJPVkuJiICnmUiIH5uVGHIPaNB0NTwd57ggBV3Ki6KGu9oXr11fD4hc0Fbqvis7nqE/ iJlARlT/xfo4o21qcXdizdSpgfzFalPRf7zX1WlgTTFz3O015pBJeGOnGeaSH2m3JkVh 5MlvP/vCODCOTuSbfJzWeCJQqRZ3fTWUQ9CoSwd85voC0tILzR1k+/Pz+FFBNN4RbShJ 7A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gbcahpbv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 22:07:11 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24VM66m2032286; Tue, 31 May 2022 22:07:10 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2049.outbound.protection.outlook.com [104.47.56.49]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gc8hsy4ry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 22:07:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lODRU/4Ce2XhfioVmlrrTrjIwxXRWGhnce6fi3mBzJNT2QSe9bQEotFQjdSkH5dThl4K9sO2UZLy1CIurEX1s3AdnX8tvQnd+1ME68mX1pcpTt1ZzLLZqnJD32+tIvqM8b5euwNkkZxFKecZ89vePr1BytVXi5WQQfRl9OirIG+73ZI/JLDuSb2zUu2TL36rvkEoTFEx5YG6BF1Ifkrrl8qPmvf6KkACx3Ef++MZ56nEnOuiBBl1XsL+CVHup98tRyPPbLLy/yvrK6kp2j9mZW76eWoZLTKXAvDUEIbp0iOQ3/g4EfWMxdscfFJcGn5fxgs0Pn56iRJXiu9nZJ8sCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=doaBt3rHjKx9iK28vUcq4wmB1ISh9zs8gKHU5gQ6Fpg=; b=cLd981IxwS+twTZtBF3woZAokRny0DksIEtRh/TJErYVx5iNhFKRZ9WqXBGy4yFM8rW5PRS2TVa+mJL6fbbOOAaivw03xN/4i0UUqOCezIIamlnItqk8B31xVb01SU/P8pIvIddlxWaTWZ2YO5We7Gtpl4vprmvnw/woScVh2sKg7ZrhIRzHLjdgRq2PJGewYxVU1lbWgxonFJ112CjX8kXbQQh2lmJ9GEOo87Xmk5EBtClUfSh4tC571VETdatnyrY23Z27OmLZSDjULwTdHqJIIycyb48QVlvYym5UQOPXU1q5HXBJwRNFQwgwNRuS6Up3lDi5gDNMLRqiG40R9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=doaBt3rHjKx9iK28vUcq4wmB1ISh9zs8gKHU5gQ6Fpg=; b=TD9AHoYUnIlSvRvF+Ruqh3Yb7jZuYys68rw1lorywi/gTynJp+ioniUlagR2zu340nSxah9XYBniG+4XEhuNMogO33vPeHIsQPNVmNzzj75c8Qw9HZ3v5UXZwzYz6AGsX2ejbekalRUkVUQ8DZJKHzpK54GJETIsOwtqFg/nRJw= Received: from CH2PR10MB4166.namprd10.prod.outlook.com (2603:10b6:610:78::20) by MN2PR10MB3408.namprd10.prod.outlook.com (2603:10b6:208:127::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Tue, 31 May 2022 22:07:08 +0000 Received: from CH2PR10MB4166.namprd10.prod.outlook.com ([fe80::4421:897e:e867:679c]) by CH2PR10MB4166.namprd10.prod.outlook.com ([fe80::4421:897e:e867:679c%9]) with mapi id 15.20.5293.019; Tue, 31 May 2022 22:07:08 +0000 Message-ID: <14f85d24-a9de-9706-32f0-30be4999c71c@oracle.com> Date: Tue, 31 May 2022 15:07:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 2/2] procfs: Add 'path' to /proc//fdinfo/ Content-Language: en-US To: Kalesh Singh Cc: ilkos@google.com, tjmercier@google.com, surenb@google.com, kernel-team@android.com, Jonathan Corbet , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , Andrew Morton , David Hildenbrand , Christoph Anton Mitterer , Johannes Weiner , Colin Cross , Mike Rapoport , Paul Gortmaker , Randy Dunlap , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org References: <20220531212521.1231133-1-kaleshsingh@google.com> <20220531212521.1231133-3-kaleshsingh@google.com> From: Stephen Brennan In-Reply-To: <20220531212521.1231133-3-kaleshsingh@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY5PR17CA0029.namprd17.prod.outlook.com (2603:10b6:a03:1b8::42) To CH2PR10MB4166.namprd10.prod.outlook.com (2603:10b6:610:78::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 880be326-65ba-41bb-5f06-08da4351e75d X-MS-TrafficTypeDiagnostic: MN2PR10MB3408:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vt96wQH8ohLkzlXFUK2mhlGbzrmf2ylI20MAcT3GREjIdECeUA3eukulq5OaIfIjKIJK4KFuelM+v5W6SMwjQwggv6IjQldD7D6/Ry1cMcx8vVlKdbmDWRE5AIsIJACINp7vkUPg0BsTySIYOdmXtVfBehkSUTWpEB2XoTk5vzefplpBIUFM5vYzNQ+o9ng2GkFRPX2/IDYJzfBJq15JCdkBccDEQ0Pf2OSrT27eP25p1Q9T4Ifdma0RfH9nXXiWOLAi8c0fp+VxdwTPnR+I6//tkpRPxcsfyYLvBps4XNIW7qFHElJNTa1kh9WFfwhHQ9RphKHgibvdDVtrBpGanP1g5iEEmmD+/zA6mktWAEF2eUtqmbmegCquhuEzQdJZDyQvAkyIg+0EwiwI7wDDpOaP+V9BF3tJOqYNVapi7S6HpX51lZ7d5yYFbHA1nvLNYgbRGF7a1Cg5a4rijL++v7E1F1CivABUFTryEG22zikleWt+I1LzGzw8dgEwnWnUSyftxSWh1LHVgupFc/XIXbevub5/jMUHxl4w1lA47HrOM46TxHYUsUFL63DnkSypRwZDxvpX9rCpQzcqHcDBlmvERFkETW88G/f2NpbR7pSwUNe5YTql0jE9f0neaj9B2uBHkOCe/Dz9DwWvoqpkVldkymay+7nBn/JR6wDvmMz++RyMgN/hRpgU0CzCY92daUCchfcAo3htnL2y0T6YSgOsTsFviaRalWPnKWOt5VZqZa/lHW1YuSKqF6L0dL31JqT/t6TjHw17XExv8kddnA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR10MB4166.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(2616005)(316002)(31686004)(31696002)(36756003)(83380400001)(66946007)(66556008)(4326008)(8676002)(66476007)(86362001)(2906002)(38100700002)(7416002)(8936002)(5660300002)(508600001)(6486002)(26005)(6506007)(53546011)(6512007)(6666004)(6916009)(54906003)(186003)(21314003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RDUyMllCMWpQeDN5aDE5aTcya2o1N1hJUEs1V3NnTHRaQXBvaU93RWhYbkNE?= =?utf-8?B?Z1EreEpSc2J3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ZnNFdtR2VVdGN6VzQ2OWh3dlI5?= =?utf-8?B?cExFTmFrTStDOTlHZFhkbXh4Ri90Qzg4N29BWW5pc3NkK1MrZkNWR1E1QUhv?= =?utf-8?B?L2kweHZnMTNwMk9RYUdIT3JyZWtyUjVmUWRROHRVSkpadWxOU1phMkVmWTkv?= =?utf-8?B?MEwwTmVXRjBSQ1ZSZnZySWQwN1MwR3VYYU1PMUxNaEdVdkI1dWtKaHJvWTRX?= =?utf-8?B?c094a3l6L2ZZVFlBMElpblBMVDlsN0ZQWW5oYWVFWEY5R1dkNkJqUC94elN5?= =?utf-8?B?RmtuRFZWVXlBb0RrUmd4MElnVzBwdzRYZ0d0RmxBN1ZrRkc1SVRXSW1xa25a?= =?utf-8?B?UkpMczlYelZaZzBhMC85WlcyUEovSVRFMXpRN2NxejMwMGJTSllXZjArZTBx?= =?utf-8?B?cHZpMWU3RCtHYXVNd3lOWXhpd1BycDVhZzVyNncrL0Q1cDJpdXlkS25rV1FT?= =?utf-8?B?eUNhUmJvREVOU1dPYzJIOG5MdG8zSWxEamEvOHM2MGZUa0lGN1dxa2hmcG9H?= =?utf-8?Q?bOVGGRTKWfFUMOis=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 880be326-65ba-41bb-5f06-08da4351e75d X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4166.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 22:07:08.1757 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i5ZAQcWuY2B/ggyBq9GjqFzqOtGSQ2aaw2KuoA7Aq8OBkkeN7CPbsXbTCXZW/I2KCWN5ab9uKF9A6ja2/gFTXO8rQpxwISzQQUKsBCtaVDU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3408 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-05-31_08:2022-05-30,2022-05-31 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205310096 X-Proofpoint-ORIG-GUID: vtGIMmriu2B-m-nMXLrecZZNJvN2t0kz X-Proofpoint-GUID: vtGIMmriu2B-m-nMXLrecZZNJvN2t0kz X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 5/31/22 14:25, Kalesh Singh wrote: > In order to identify the type of memory a process has pinned through > its open fds, add the file path to fdinfo output. This allows > identifying memory types based on common prefixes. e.g. "/memfd...", > "/dmabuf...", "/dev/ashmem...". > > Access to /proc//fdinfo is governed by PTRACE_MODE_READ_FSCREDS > the same as /proc//maps which also exposes the file path of > mappings; so the security permissions for accessing path is consistent > with that of /proc//maps. Hi Kalesh, I think I see the value in the size field, but I'm curious about path, which is available via readlink /proc//fd/, since those are symlinks to the file themselves. File paths can contain fun characters like newlines or colons, which could make parsing out filenames in this text file... fun. How would your userspace parsing logic handle "/home/stephen/filename\nsize:\t4096"? The readlink(2) API makes that easy already. Is the goal avoiding races (e.g. file descriptor 3 is closed and reopened to a different path between reading fdinfo and stating the fd)? Stephen > Signed-off-by: Kalesh Singh > --- > > Changes from rfc: > - Split adding 'size' and 'path' into a separate patches, per Christian > - Fix indentation (use tabs) in documentaion, per Randy > > Documentation/filesystems/proc.rst | 14 ++++++++++++-- > fs/proc/fd.c | 4 ++++ > 2 files changed, 16 insertions(+), 2 deletions(-) > > diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst > index 779c05528e87..591f12d30d97 100644 > --- a/Documentation/filesystems/proc.rst > +++ b/Documentation/filesystems/proc.rst > @@ -1886,14 +1886,16 @@ if precise results are needed. > 3.8 /proc//fdinfo/ - Information about opened file > --------------------------------------------------------------- > This file provides information associated with an opened file. The regular > -files have at least five fields -- 'pos', 'flags', 'mnt_id', 'ino', and 'size'. > +files have at least six fields -- 'pos', 'flags', 'mnt_id', 'ino', 'size', > +and 'path'. > > The 'pos' represents the current offset of the opened file in decimal > form [see lseek(2) for details], 'flags' denotes the octal O_xxx mask the > file has been created with [see open(2) for details] and 'mnt_id' represents > mount ID of the file system containing the opened file [see 3.5 > /proc//mountinfo for details]. 'ino' represents the inode number of > -the file, and 'size' represents the size of the file in bytes. > +the file, 'size' represents the size of the file in bytes, and 'path' > +represents the file path. > > A typical output is:: > > @@ -1902,6 +1904,7 @@ A typical output is:: > mnt_id: 19 > ino: 63107 > size: 0 > + path: /dev/null > > All locks associated with a file descriptor are shown in its fdinfo too:: > > @@ -1920,6 +1923,7 @@ Eventfd files > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:[eventfd] > eventfd-count: 5a > > where 'eventfd-count' is hex value of a counter. > @@ -1934,6 +1938,7 @@ Signalfd files > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:[signalfd] > sigmask: 0000000000000200 > > where 'sigmask' is hex value of the signal mask associated > @@ -1949,6 +1954,7 @@ Epoll files > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:[eventpoll] > tfd: 5 events: 1d data: ffffffffffffffff pos:0 ino:61af sdev:7 > > where 'tfd' is a target file descriptor number in decimal form, > @@ -1968,6 +1974,7 @@ For inotify files the format is the following:: > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:inotify > inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d > > where 'wd' is a watch descriptor in decimal form, i.e. a target file > @@ -1992,6 +1999,7 @@ For fanotify files the format is:: > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:[fanotify] > fanotify flags:10 event-flags:0 > fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003 > fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4 > @@ -2018,6 +2026,7 @@ Timerfd files > mnt_id: 9 > ino: 63107 > size: 0 > + path: anon_inode:[timerfd] > clockid: 0 > ticks: 0 > settime flags: 01 > @@ -2042,6 +2051,7 @@ DMA Buffer files > mnt_id: 9 > ino: 63107 > size: 32768 > + path: /dmabuf: > count: 2 > exp_name: system-heap > > diff --git a/fs/proc/fd.c b/fs/proc/fd.c > index 464bc3f55759..8889a8ba09d4 100644 > --- a/fs/proc/fd.c > +++ b/fs/proc/fd.c > @@ -60,6 +60,10 @@ static int seq_show(struct seq_file *m, void *v) > seq_printf(m, "ino:\t%lu\n", file_inode(file)->i_ino); > seq_printf(m, "size:\t%lli\n", (long long)file_inode(file)->i_size); > > + seq_puts(m, "path:\t"); > + seq_file_path(m, file, "\n"); > + seq_putc(m, '\n'); > + > /* show_fd_locks() never deferences files so a stale value is safe */ > show_fd_locks(m, file, files); > if (seq_has_overflowed(m))