Vincent Whitchurch
b8252ec6dd
ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
...
[ Upstream commit 344eb5539abf3e0b6ce22568c03e86450073e097 ]
getuser() and putuser() (and there underscored variants) use two
strb[t]/ldrb[t] instructions when they are asked to get/put 16-bits.
This means that the read/write is not atomic even when performed to a
16-bit-aligned address.
This leads to problems with vhost: vhost uses __getuser() to read the
vring's 16-bit avail.index field, and if it happens to observe a partial
update of the index, wrong descriptors will be used which will lead to a
breakdown of the virtio communication. A similar problem exists for
__putuser() which is used to write to the vring's used.index field.
The reason these functions use strb[t]/ldrb[t] is because strht/ldrht
instructions did not exist until ARMv6T2/ARMv7. So we should be easily
able to fix this on ARMv7. Also, since all ARMv6 processors also don't
actually use the unprivileged instructions anymore for uaccess (since
CONFIG_CPU_USE_DOMAINS is not used) we can easily fix them too.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-12-13 08:51:10 +01:00
..
2018-01-21 15:38:10 +00:00
2018-08-13 18:28:19 -07:00
2017-11-02 11:10:55 +01:00
2018-03-22 13:46:18 +00:00
2017-11-15 10:56:56 -08:00
2019-02-20 10:25:37 +01:00
2018-06-21 14:25:24 +02:00
2019-04-05 22:33:12 +02:00
2018-07-30 11:45:53 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-31 10:39:29 +01:00
2017-11-02 11:10:55 +01:00
2018-06-15 18:10:01 -03:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-05-31 06:46:11 -07:00
2017-11-02 11:10:55 +01:00
2019-02-20 10:25:38 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-20 10:01:59 +01:00
2017-11-15 18:21:04 -08:00
2018-01-15 09:35:06 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-07-22 14:13:43 +02:00
2017-11-16 12:50:35 -08:00
2017-11-02 11:10:55 +01:00
2017-12-17 22:14:21 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-17 22:15:35 +00:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:00 +02:00
2017-11-16 12:50:35 -08:00
2018-06-26 09:07:58 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-03-23 20:09:48 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-19 13:28:51 +02:00
2017-11-02 11:10:55 +01:00
2018-05-19 11:53:46 +01:00
2017-11-02 11:10:55 +01:00
2018-06-21 12:33:07 +02:00
2017-11-29 16:46:18 +01:00
2018-06-05 10:03:27 +01:00
2018-08-22 14:07:56 +02:00
2019-03-23 20:09:43 +01:00
2018-03-19 10:53:21 +00:00
2019-05-04 09:20:13 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-11 10:28:38 -07:00
2017-11-16 12:50:35 -08:00
2018-07-09 20:29:49 +02:00
2018-05-19 11:53:46 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-07 07:15:41 +02:00
2017-11-15 18:21:04 -08:00
2018-12-29 13:37:57 +01:00
2018-06-07 17:34:35 -07:00
2018-01-08 15:20:45 +01:00
2018-06-21 12:33:07 +02:00
2019-02-20 10:25:38 +01:00
2019-04-05 22:33:12 +02:00
2018-01-21 15:32:20 +00:00
2017-10-24 13:17:32 +02:00
2017-12-17 22:14:21 +00:00
2018-05-08 14:50:42 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-16 14:05:12 -08:00
2017-11-02 11:10:55 +01:00
2017-10-23 16:58:59 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-21 15:37:56 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-31 10:40:32 +01:00
2017-11-02 11:10:55 +01:00
2019-02-20 10:25:36 +01:00
2018-07-25 12:09:09 +02:00
2017-11-02 11:10:55 +01:00
2017-11-13 01:34:49 +01:00
2017-12-17 22:14:21 +00:00
2019-12-13 08:51:10 +01:00
2017-11-16 12:50:35 -08:00
2017-10-24 10:33:23 +01:00
2017-12-17 22:14:21 +00:00
2017-11-02 11:10:55 +01:00
2019-04-05 22:33:12 +02:00
2018-03-24 14:27:49 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00