Revision 597399d0cb91d049fcb78fb45c7694771b583bb7 authored by Will Deacon on 16 October 2019, 04:04:18 UTC, committed by Will Deacon on 16 October 2019, 17:11:38 UTC
Sign-extending TTBR1 addresses when converting to an untagged address breaks the documented POSIX semantics for mlock() in some obscure error cases where we end up returning -EINVAL instead of -ENOMEM as a direct result of rewriting the upper address bits. Rework the untagged_addr() macro to preserve the upper address bits for TTBR1 addresses and only clear the tag bits for user addresses. This matches the behaviour of the 'clear_address_tag' assembly macro, so rename that and align the implementations at the same time so that they use the same instruction sequences for the tag manipulation. Link: https://lore.kernel.org/stable/20191014162651.GF19200@arrakis.emea.arm.com/ Reported-by: Jan Stancek <jstancek@redhat.com> Tested-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 3813733
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.1 KB |
Makefile | -rw-r--r-- | 691 bytes |
af_vsock.c | -rw-r--r-- | 47.6 KB |
af_vsock_tap.c | -rw-r--r-- | 2.0 KB |
diag.c | -rw-r--r-- | 4.0 KB |
hyperv_transport.c | -rw-r--r-- | 24.8 KB |
virtio_transport.c | -rw-r--r-- | 19.6 KB |
virtio_transport_common.c | -rw-r--r-- | 27.4 KB |
vmci_transport.c | -rw-r--r-- | 58.8 KB |
vmci_transport.h | -rw-r--r-- | 3.7 KB |
vmci_transport_notify.c | -rw-r--r-- | 17.8 KB |
vmci_transport_notify.h | -rw-r--r-- | 2.5 KB |
vmci_transport_notify_qstate.c | -rw-r--r-- | 11.1 KB |
vsock_addr.c | -rw-r--r-- | 1.5 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...