[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E76F5188-CED8-4472-9136-BDCDFDAF57F0@brauner.io>
Date: Fri, 21 Jun 2019 15:16:04 +0200
From: Christian Brauner <christian@...uner.io>
To: David Howells <dhowells@...hat.com>
CC: dhowells@...hat.com, viro@...iv.linux.org.uk, raven@...maw.net,
linux-api@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, mszeredi@...hat.com
Subject: Re: [PATCH 02/25] vfs: Allow fsinfo() to query what's in an fs_context [ver #13]
On June 21, 2019 3:12:43 PM GMT+02:00, David Howells <dhowells@...hat.com> wrote:
>Christian Brauner <christian@...uner.io> wrote:
>
>> > static int vfs_fsinfo_fd(unsigned int fd, struct fsinfo_kparams
>*params)
>> > {
>> > struct fd f = fdget_raw(fd);
>>
>> You're using fdget_raw() which means you want to allow O_PATH fds but
>> below you're checking whether the f_ops correspond to
>> fscontext_fops. If it's an O_PATH
>
>It can't be. The only way to get an fs_context fd is from fsopen() or
>fspick() - neither of which allow O_PATH to be specified.
>
>If you tried to go through /proc/pid/fd with open(O_PATH), I think
>you'd get
>the symlink, not the target.
Then you should use fdget(), no? :)
Christian
Powered by blists - more mailing lists