I have just realised that this is raising warnings for an implicit cast from void __user * to user_uintptr_t. Will fix it in the next patch series. Apologies!
Luca
On 07/02/2023 14:22, Luca Vizzarro wrote:
The compat_sock_ioctl_trans handler currently passes the argument from a compat syscall directly to the generic ioctl handler without changing it. With PCuABI the ioctl handler can either take a capability or a real number value. Given that the compat handler takes a pointer or a number, this needs to be converted correctly when passed along.
This commits introduces changes that pass the argument as a capability where required.
Signed-off-by: Luca Vizzarro Luca.Vizzarro@arm.com
net/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/socket.c b/net/socket.c index 1238bd1560ce..2bc683259a49 100644 --- a/net/socket.c +++ b/net/socket.c @@ -3363,7 +3363,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock, case SIOCGIFCONF: case SIOCSIFBR: case SIOCGIFBR:
return sock_ioctl(file, cmd, arg);
return sock_ioctl(file, cmd, argp);
case SIOCGIFFLAGS: case SIOCSIFFLAGS: @@ -3411,7 +3411,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock, case SIOCOUTQ: case SIOCOUTQNSD: case SIOCATMARK:
return sock_do_ioctl(net, sock, cmd, arg);
}return sock_do_ioctl(net, sock, cmd, argp);
return -ENOIOCTLCMD;