All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalesh Singh <kaleshsingh@google.com>
To: Kees Cook <keescook@chromium.org>
Cc: "Ioannis Ilkos" <ilkos@google.com>,
	"T.J. Mercier" <tjmercier@google.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Cc: Android Kernel" <kernel-team@android.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Christoph Anton Mitterer" <mail@christoph.anton.mitterer.name>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Colin Cross" <ccross@google.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"DRI mailing list" <dri-devel@lists.freedesktop.org>,
	"moderated list:DMA BUFFER SHARING FRAMEWORK"
	<linaro-mm-sig@lists.linaro.org>
Subject: Re: [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo
Date: Thu, 19 May 2022 21:01:39 -0700	[thread overview]
Message-ID: <CAC_TJve0iyPU0uKoKOi_qcwgxPkgNKgirBcMJ=oYBqhRC3a_+Q@mail.gmail.com> (raw)
In-Reply-To: <202205191848.DEE05F6@keescook>

On Thu, May 19, 2022 at 6:50 PM Kees Cook <keescook@chromium.org> wrote:
>
> 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()?

Hi Kees.

Thanks for taking a look. The comment above says the "files" pointer
can be stale. It doesn't affect our use of "file" here. seq_show()
takes the reference with get_file() so "file" wouldn't be destroyed
from under us.

Thanks,
Kalesh
>
> --
> Kees Cook

WARNING: multiple messages have this Message-ID (diff)
From: Kalesh Singh <kaleshsingh@google.com>
To: Kees Cook <keescook@chromium.org>
Cc: "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Christoph Anton Mitterer" <mail@christoph.anton.mitterer.name>,
	"Cc: Android Kernel" <kernel-team@android.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Ioannis Ilkos" <ilkos@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Colin Cross" <ccross@google.com>,
	"T.J. Mercier" <tjmercier@google.com>,
	"moderated list:DMA BUFFER SHARING FRAMEWORK"
	<linaro-mm-sig@lists.linaro.org>,
	"DRI mailing list" <dri-devel@lists.freedesktop.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo
Date: Thu, 19 May 2022 21:01:39 -0700	[thread overview]
Message-ID: <CAC_TJve0iyPU0uKoKOi_qcwgxPkgNKgirBcMJ=oYBqhRC3a_+Q@mail.gmail.com> (raw)
In-Reply-To: <202205191848.DEE05F6@keescook>

On Thu, May 19, 2022 at 6:50 PM Kees Cook <keescook@chromium.org> wrote:
>
> 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()?

Hi Kees.

Thanks for taking a look. The comment above says the "files" pointer
can be stale. It doesn't affect our use of "file" here. seq_show()
takes the reference with get_file() so "file" wouldn't be destroyed
from under us.

Thanks,
Kalesh
>
> --
> Kees Cook

  reply	other threads:[~2022-05-20  4:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 21:40 [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo Kalesh Singh
2022-05-19 21:40 ` Kalesh Singh
2022-05-19 21:46 ` Randy Dunlap
2022-05-19 21:46   ` Randy Dunlap
2022-05-19 21:53   ` Kalesh Singh
2022-05-19 21:53     ` Kalesh Singh
2022-05-20  1:49 ` Kees Cook
2022-05-20  1:49   ` Kees Cook
2022-05-20  4:01   ` Kalesh Singh [this message]
2022-05-20  4:01     ` Kalesh Singh
2022-05-20  2:18 ` kernel test robot
2022-05-20  2:33 ` kernel test robot
2022-05-20  6:29 ` Christian König
2022-05-20  6:29   ` Christian König
2022-05-20 16:12   ` Kalesh Singh
2022-05-20 16:12     ` Kalesh Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC_TJve0iyPU0uKoKOi_qcwgxPkgNKgirBcMJ=oYBqhRC3a_+Q@mail.gmail.com' \
    --to=kaleshsingh@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=ccross@google.com \
    --cc=christian.koenig@amd.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ilkos@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mail@christoph.anton.mitterer.name \
    --cc=rdunlap@infradead.org \
    --cc=rppt@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=surenb@google.com \
    --cc=tjmercier@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.