From: David Laight <David.Laight@ACULAB.COM>
To: 'Christian Brauner' <brauner@kernel.org>,
"luca.boccassi@gmail.com" <luca.boccassi@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>,
Josef Bacik <josef@toxicpanda.com>,
"Oleg Nesterov" <oleg@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"paul@paul-moore.com" <paul@paul-moore.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: RE: [PATCH] pidfd: add ioctl to retrieve pid info
Date: Sun, 6 Oct 2024 19:18:43 +0000 [thread overview]
Message-ID: <02b8bcbc23b94b249855a24059fc965f@AcuMS.aculab.com> (raw)
In-Reply-To: <20241004-signal-erfolg-c76d6fdeee1c@brauner>
...
> It would make sense for security information to get a separate ioctl so
> that struct pidfd_info just return simple and fast information and the
> security stuff can include things such as seccomp, caps etc pp.
Which also means it is pointless having the two bitmasks.
They just complicate things unnecessarily.
What you might want to do is have the kernel return the size
of the structure it would fill in (probably as the first field).
Also have the kernel fill (probably with zeros) the end of the
user buffer it didn't write to.
The ioctl is then an IOR() one.
Mind you, if you dig into the history (possibly of SYSV and/or BSD)
you'll find a structure the kernel filled with the info 'ps' needs.
The text based code that Linux uses is probably more extensible.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2024-10-06 19:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241002142516.110567-1-luca.boccassi@gmail.com>
2024-10-04 9:29 ` [PATCH] pidfd: add ioctl to retrieve pid info Christian Brauner
2024-10-04 14:05 ` Paul Moore
2024-10-04 18:50 ` Luca Boccassi
2024-10-04 19:29 ` Oleg Nesterov
2024-10-04 19:40 ` Luca Boccassi
2024-10-05 11:29 ` Oleg Nesterov
2024-10-06 14:59 ` Luca Boccassi
2024-10-06 19:18 ` David Laight [this message]
2024-10-07 14:54 ` Josh Triplett
[not found] ` <CAHC9VhRV3KcNGRw6_c-97G6w=HKNuEQoUGrfKhsQdWywzDDnBQ@mail.gmail.com>
[not found] ` <CAMw=ZnSkm1U-gBEy9MBbjo2gP2+WHV2LyCsKmwYu2cUJqSUeXg@mail.gmail.com>
[not found] ` <CAHC9VhRY81Wp-=jC6-G=6y4e=TSe-dznO=j87i-i+t6GVq4m3w@mail.gmail.com>
2024-10-22 23:45 ` luca.boccassi
2024-10-22 23:56 ` Luca Boccassi
2024-10-24 23:14 ` Paul Moore
2024-10-24 23:31 ` Luca Boccassi
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=02b8bcbc23b94b249855a24059fc965f@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=brauner@kernel.org \
--cc=jlayton@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=oleg@redhat.com \
--cc=paul@paul-moore.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).