Vincent Whitchurch
e82dd54ec0
ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
...
[ Upstream commit 344eb5539a ]
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-17 20:37:38 +01:00
..
2017-11-02 11:10:55 +01:00
2017-06-28 15:13:55 -05:00
2017-11-02 11:10:55 +01:00
2017-08-31 15:31:38 +01:00
2017-11-02 11:10:55 +01:00
2019-02-20 10:20:46 +01:00
2019-04-05 22:31:37 +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
2018-10-18 09:16:26 +02:00
2017-11-02 11:10:55 +01:00
2017-06-30 12:00:52 -07: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:47:18 -07:00
2017-03-30 19:45:52 +01:00
2017-11-02 11:10:55 +01:00
2019-02-20 10:20:46 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-05-30 11:31:33 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:23 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-06-05 17:50:44 +02:00
2017-11-02 11:10:55 +01:00
2017-04-05 12:27:23 +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
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:51 +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
2017-11-02 11:10:55 +01:00
2017-04-24 13:53:13 -05:00
2017-11-02 11:10:55 +01:00
2019-03-23 14:35:14 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-24 10:33:23 +01:00
2017-11-02 11:10:55 +01:00
2018-07-03 11:24:51 +02:00
2017-11-02 11:10:55 +01:00
2017-02-27 18:43:45 -08:00
2017-12-14 09:53:00 +01:00
2018-10-18 09:16:27 +02:00
2017-05-15 14:29:19 +02:00
2017-09-05 17:33:37 +02:00
2018-10-18 09:16:27 +02:00
2017-07-12 16:26:04 -07:00
2018-10-18 09:16:27 +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-02-28 11:06:14 +00:00
2017-03-02 08:42:37 +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-06-27 14:58:10 +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-02-22 15:42:23 +01:00
2017-06-05 10:29:40 +01:00
2017-03-09 11:48:47 -08:00
2019-02-20 10:20:47 +01:00
2019-04-05 22:31:37 +02:00
2017-12-25 14:26:33 +01:00
2017-11-02 11:10:55 +01:00
2017-05-08 17:15:13 -07: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
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
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-10-18 09:16:26 +02:00
2017-11-02 11:10:55 +01:00
2019-02-20 10:20:45 +01:00
2017-08-10 15:54:07 -07:00
2017-03-02 08:42:37 +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
2016-10-11 15:06:33 -07:00
2019-12-17 20:37:38 +01:00
2017-11-02 11:10:55 +01:00
2017-10-24 10:33:23 +01:00
2016-10-19 10:18:47 +01:00
2017-11-02 11:10:55 +01:00
2019-04-05 22:31:37 +02:00
2018-05-30 07:52:20 +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-04-09 07:49:34 -07:00
2017-11-02 11:10:55 +01:00