Files
linux/include/linux
Brian Norris 53bb724f94 mtd: provide proper 32/64-bit compat_ioctl() support for BLKPG
After a bit of poking around wondering why my 32-bit user-space can't
seem to send a proper ioctl(BLKPG) to an MTD on my 64-bit kernel
(ARM64), I noticed that struct blkpg_ioctl_arg is actually pretty
unsuitable for use in the ioctl() ABI, due to its use of raw pointers,
and its lack of alignment/packing restrictions (32-bit arch'es tend to
pack the 4 fields into 4 32-bit words, whereas 64-bit arch'es would add
padding after the third int, and make this 6 32-bit words).

Anyway, this means BLKPG deserves some special compat_ioctl handling. Do
the conversion in a small shim for MTD.

block/compat_ioctl.c already has compat support for the block subsystem,
but it does so by a re-marshalling data to/from user-space (see
compat_blkpg_ioctl()). Personally, I think this approach is cleaner.

Tested only on MTD, with an ARM32 user space on an ARM64 kernel.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2015-09-29 13:37:04 -07:00
..
2015-06-25 11:49:31 +03:00
…
…
2015-05-13 12:04:55 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
2015-08-03 12:01:54 -04:00
…
…
…
…
2015-08-06 16:17:25 -04:00
…
…
…
…
…
…
2015-06-01 14:35:56 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-09-01 15:52:41 +02:00
…
…
…
…
…
…
…
2015-09-04 16:54:41 -07:00
…
…
…
2015-09-08 15:35:28 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-08-20 10:20:11 +03:00
…
…
…
…
…
…
…
…
…
…
…
2015-06-24 17:49:45 -07:00
…
…
…
…
…
…
2015-07-17 08:41:53 -06:00
…
…
2015-05-12 10:46:53 +02:00
…
…
…
…
2015-06-01 14:33:35 +02:00
…
…
…
…
…
…
…
…
2015-06-19 15:18:28 +02:00
…
2015-09-08 15:35:28 -07:00
2015-09-08 15:35:28 -07:00
…
…
…
…
…
…
…
…
…
2015-05-05 13:40:42 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-08-27 19:40:58 -04:00
…
…
…
…
…
…
…
…
…
…
2015-08-06 00:14:59 +02:00
2015-06-25 12:06:45 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-08-18 15:49:15 -07:00
…
…
…
2015-07-28 08:50:42 +01:00
…
…
…
…
2015-09-06 16:27:10 +02:00
…
…
…
…
…
2015-04-29 17:17:17 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-06-24 17:49:41 -07:00
…
…
…
…
2015-07-21 10:39:05 -07:00
…
…
…
…
…
…
…
…
…
2015-06-25 04:20:04 -04:00
…
…
2015-08-17 13:32:56 -05:00
…
…
…
…
…
…
…
2015-08-18 11:56:13 -06:00
…
…
…
…
…
…
…
…
…
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
…
…
…
…
…
…
2015-06-19 01:18:14 +02:00
…
…
…
…
…
…
…
…
…
2015-08-17 15:40:20 +02:00
…
…
…
2015-06-10 19:14:04 +08:00
…
…
2015-05-27 12:58:04 -07:00
…
…
…
…
…
…
2015-05-26 15:23:23 +02:00
…
…
…
2015-06-25 01:13:43 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-06-25 17:00:40 -07:00
…
…
…
…
…
…
…
2015-06-25 17:00:39 -07:00
…
…
…
…
…
…
…
…
2015-08-17 11:25:28 -07:00
…
…
…
…
…
…
…
2015-07-22 15:27:29 -07:00
2015-08-28 16:27:27 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-06-12 17:26:57 -07:00
…
…
…
…
…
…
…
…
…
…
2015-09-08 15:35:28 -07:00
…
…
…
2015-09-10 13:29:01 -07:00
…