Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp338795ioo; Sat, 21 May 2022 00:27:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKkPcOQ3oZDtp49ltM/xiA2bt+Nugo0OQrHnyHhQOHawkNG7MbUq06BWy+KgpMT9PrLihj X-Received: by 2002:a05:6402:f07:b0:42a:e705:b6c3 with SMTP id i7-20020a0564020f0700b0042ae705b6c3mr14764565eda.310.1653118055562; Sat, 21 May 2022 00:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653118055; cv=none; d=google.com; s=arc-20160816; b=G2jbLsV1AMpe8kMBC54K7NmsW0kfVtE1fSnxg/Fg4C54RJow/3LZMaPV6ukMAEznEg v5ckhmIDVXYPh1aa1PJ0+sn/BrYSX6EjmX3rDIVdn9dsL7TaU478BXsp/UPHDtiyGDUy UnvBYO1euKHtHLtgGSrTsavUs0cVWol3aiVuU4YLUYHAdr+gm00e21Qnbh/C+vvRmGb5 IUHAf1Lkz2WeFMX6wsV16e+Ahtj74PBFvstRuzrqUomxzwcyhfon06jOpsYSrIJPgrWf AN1nHaYzWgJuI1OS7isHeE3tnIT/Urcn82LdwEx/8wccWZqZB391CIU872JOx1fOyRO/ yl8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bSYkUjPvAsu074e/VjNGWfjNftItgD9OU7BKxmchNu0=; b=Yzd9xkCEW99BZPfprOLshZTFVWPrOhvtqKYXWMP/T0NrCEa7Dg2AxgXh07JGr5Rw4a oaXD4ztxe1W375OyBbvjeM2QBK41cr5ud5ymlR93YlkE/fu339nTFx7ul+vay5k0mPwM HsmqHQMl8NZ2cwQWCHn70UCYN+lOtHvv1+LieItAyW+t3Ap7BBTBsx5QZSo8iDbdN0Xs cULDtEor2jn8pOZR1HWmkl3Af54+e7/XDqgoW/ytzPXwFTiZTO8364lPoDqSUPjSsp6f GxKSNeKWMEud4Rf5uThXMdxzmnHPgw7jo8pSuy0hTVZkjEOWw1qkI6BkCoySVgZbzHF5 GQXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IctWEQwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kx6-20020a170907774600b006f39645649asi9603395ejc.639.2022.05.21.00.27.09; Sat, 21 May 2022 00:27:35 -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; dkim=pass header.i=@chromium.org header.s=google header.b=IctWEQwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344587AbiETBuE (ORCPT + 99 others); Thu, 19 May 2022 21:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344588AbiETBuC (ORCPT ); Thu, 19 May 2022 21:50:02 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D788BDFF5B for ; Thu, 19 May 2022 18:50:00 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id ob14-20020a17090b390e00b001dff2a43f8cso646591pjb.1 for ; Thu, 19 May 2022 18:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bSYkUjPvAsu074e/VjNGWfjNftItgD9OU7BKxmchNu0=; b=IctWEQwULe+HOgPbU7d0NJ3bNOOh3R/ed9A6ET0Gs/piG+Bes/Utvzo/JOuyGD8RRU RcDWQ8n8fK3gVNdg7zOFFUdQGbLx/Yeu4mzOrLYeaNU76aARYW0jjqtvRRXuDmBVfrna g7qU8icOdLj7kU6hSvSdtAKN4mYIBgh28Dejc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bSYkUjPvAsu074e/VjNGWfjNftItgD9OU7BKxmchNu0=; b=62vjablt/+2rQBGzmGDyEZPuCaAUP8DeNd0b2dQHzmC0Lp4i3qNmJc91IDHUdbH1B/ JxAvvC+G7uL51nvGvtxEw997bZgHR6pVXHNy6Jr0/gyLHVi5NA1gBP5a6TU51dRuk0wS hc/wM1l1mLS7qXfCB46dI2sKVLRY3RNO1WoarqAXUDLzvfxI3KcPuYLDTqHWPmu/IjgV urDQA5zUqMAWwN1FX8Ziq4myzOO86xB78FcQiVd0HYkCNyCP9/ueeGSeJScFMWVCfxpT dMI6JJqhHUMcTNhmA1X0XQEx8Q2NjO9b1gbs16p02oSeMhcfc1I1axbuMwUz9NGE6OfI AVAg== X-Gm-Message-State: AOAM532NWDGdXtBjbe1saR9Xgp403sj1JC82qD0/a1iU1oept/ruFH6H WtEmKppK1Kxhg9iejySQ1QPpxQ== X-Received: by 2002:a17:902:9887:b0:151:6e1c:7082 with SMTP id s7-20020a170902988700b001516e1c7082mr7427960plp.162.1653011400364; Thu, 19 May 2022 18:50:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a23-20020a056a001d1700b0050dc76281ddsm329776pfx.183.2022.05.19.18.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 18:50:00 -0700 (PDT) Date: Thu, 19 May 2022 18:49:59 -0700 From: Kees Cook To: Kalesh Singh Cc: ilkos@google.com, tjmercier@google.com, surenb@google.com, kernel-team@android.com, Jonathan Corbet , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Andrew Morton , Christoph Anton Mitterer , Mike Rapoport , Colin Cross , 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 Subject: Re: [RFC PATCH] procfs: Add file path and size to /proc//fdinfo Message-ID: <202205191848.DEE05F6@keescook> References: <20220519214021.3572840-1-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220519214021.3572840-1-kaleshsingh@google.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Thu, May 19, 2022 at 02:40:15PM -0700, Kalesh Singh wrote: > [...] > + 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); This comment implies "file" might be stale? Does that mean anything for the above seq_file_path()? -- Kees Cook