Thread (28 messages) 28 messages, 7 authors, 2019-04-25

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

From: Arnd Bergmann <arnd@arndb.de>
Date: 2019-04-25 15:34:39
Also in: amd-gfx, ceph-devel, dri-devel, linux-btrfs, linux-crypto, linux-fsdevel, linux-iio, linux-input, linux-media, linux-pci, linux-rdma, linux-remoteproc, linux-scsi, linux-usb, linux-wireless, lkml, nvdimm, platform-driver-x86, sparclinux

On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab
[off-list ref] wrote:
Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann [off-list ref] escreveu:

If I understand your patch description well, using compat_ptr_ioctl
only works if the driver is not for s390, right?
No, the purpose of compat_ptr_ioctl() is to make sure it works
everywhere including s390.

Even on s390 it tends to work most of the time, but for correctness
the upper bit of a 32-bit pointer needs to be cleared, as
compat_ptr_ioctl does, in case some application passes a pointer
with that bit set. [IIRC, in the instruction pointer, the high bit is set, in
data references it is ignored but usually cleared, but it may be left
on for IP-relative address generation]

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help