Linux kernel source tree
Go to file
Will Deacon 2cf899dc19 BACKPORT: arm64: tags: Preserve tags for addresses translated via TTBR1
(Upstream commit 597399d0cb).

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>
Change-Id: Iadecb8f15c12984d228c6d6261edac5abadc3f36
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
2019-10-23 18:45:12 +00:00
arch BACKPORT: arm64: tags: Preserve tags for addresses translated via TTBR1 2019-10-23 18:45:12 +00:00
block This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto This is the 4.19.79 stable release 2019-10-11 19:13:57 +02:00
Documentation This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
drivers This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
firmware kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
fs ANDROID: sdcardfs: evict dentries on fscrypt key removal 2019-10-23 11:12:33 -07:00
include ANDROID: fscrypt: add key removal notifier chain 2019-10-23 11:12:33 -07:00
init This is the 4.19.76 stable release 2019-10-01 08:51:37 +02:00
ipc This is the 4.19.65 stable release 2019-08-06 20:08:18 +02:00
kernel This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
lib BACKPORT: lib: untag user pointers in strn*_user 2019-10-07 15:27:40 -04:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
net This is the 4.19.79 stable release 2019-10-11 19:13:57 +02:00
samples samples, bpf: suppress compiler warning 2019-07-14 08:11:04 +02:00
scripts This is the 4.19.77 stable release 2019-10-06 11:27:45 +02:00
security This is the 4.19.79 stable release 2019-10-11 19:13:57 +02:00
sound This is the 4.19.79 stable release 2019-10-11 19:13:57 +02:00
tools This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:57:16 +02:00
virt KVM: coalesced_mmio: add bounds checking 2019-09-21 07:16:44 +02:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
abi_gki_aarch64.xml ANDROID: enable CONFIG_ION_SYSTEM_HEAP for GKI 2019-09-23 23:26:20 -07:00
build.config.aarch64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.common ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.gki ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.gki.aarch64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.gki.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
build.config.x86_64 ANDROID: refactor build.config files to remove duplication 2019-10-22 18:27:12 -07:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
Makefile This is the 4.19.80 stable release 2019-10-17 15:33:07 -07:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.