From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: IORING_REGISTER_CREDS[_UPDATE]() and credfd_create()? Date: Wed, 29 Jan 2020 10:34:51 -0700 Message-ID: <4f833fc5-b4c0-c304-c3c2-f63c050b90a2@kernel.dk> References: <688e187a-75dd-89d9-921c-67de228605ce@samba.org> <1ac31828-e915-6180-cdb4-36685442ea75@kernel.dk> <0d4f43d8-a0c4-920b-5b8f-127c1c5a3fad@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jann Horn Cc: Stefan Metzmacher , io-uring , Linux API Mailing List , Pavel Begunkov List-Id: linux-api@vger.kernel.org On 1/29/20 7:59 AM, Jann Horn wrote: > On Tue, Jan 28, 2020 at 8:42 PM Jens Axboe wrote: >> On 1/28/20 11:04 AM, Jens Axboe wrote: >>> On 1/28/20 10:19 AM, Jens Axboe wrote: > [...] >>>> #1 adds support for registering the personality of the invoking task, >>>> and #2 adds support for IORING_OP_USE_CREDS. Right now it's limited to >>>> just having one link, it doesn't support a chain of them. > [...] >> I didn't like it becoming a bit too complicated, both in terms of >> implementation and use. And the fact that we'd have to jump through >> hoops to make this work for a full chain. >> >> So I punted and just added sqe->personality and IOSQE_PERSONALITY. >> This makes it way easier to use. Same branch: >> >> https://git.kernel.dk/cgit/linux-block/log/?h=for-5.6/io_uring-vfs-creds >> >> I'd feel much better with this variant for 5.6. > > Some general feedback from an inspectability/debuggability perspective: > > At some point, it might be nice if you could add a .show_fdinfo > handler to the io_uring_fops that makes it possible to get a rough > overview over the state of the uring by reading /proc/$pid/fdinfo/$fd, > just like e.g. eventfd (see eventfd_show_fdinfo()). It might be > helpful for debugging to be able to see information about the fixed > files and buffers that have been registered. Same for the > personalities; that information might also be useful when someone is > trying to figure out what privileges a running process actually has. Agree, that would be a very useful addition. I'll take a look at it. -- Jens Axboe