Thread (67 messages) 67 messages, 11 authors, 2020-09-23

Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2020-09-20 02:57:56
Also in: io-uring, keyrings, linux-arch, linux-arm-kernel, linux-block, linux-fsdevel, linux-mips, linux-mm, linux-s390, linux-scsi, linux-security-module, lkml, netdev, sparclinux

On Sat, Sep 19, 2020 at 05:14:41PM -0700, Andy Lutomirski wrote:
quoted
2) have you counted the syscalls that do and do not need that?
No.
Might be illuminating...
quoted
3) how many of those realistically *can* be unified with their
compat counterparts?  [hint: ioctl(2) cannot]
There would be no requirement to unify anything.  The idea is that
we'd get rid of all the global state flags.
_What_ global state flags?  When you have separate SYSCALL_DEFINE3(ioctl...)
and COMPAT_SYSCALL_DEFINE3(ioctl...), there's no flags at all, global or
local.  They only come into the play when you try to share the same function
for both, right on the top level.
For ioctl, we'd have a new file_operation:

long ioctl(struct file *, unsigned int, unsigned long, enum syscall_arch);

I'm not saying this is easy, but I think it's possible and the result
would be more obviously correct than what we have now.
No, it would not.  Seriously, from time to time a bit of RTFS before grand
proposals turns out to be useful.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help