Commit Graph

3 Commits

Author SHA1 Message Date
Andrey Konovalov
b30052bc69 UPSTREAM: selftests, arm64: add kernel headers path for tags_test
(Upstream commit bd3841cd3bd852e7363218e71e48cb473de4fc06).

tags_test.c relies on PR_SET_TAGGED_ADDR_CTRL/PR_TAGGED_ADDR_ENABLE being
present in system headers. When this is not the case the build of this
test fails with undeclared identifier errors.

Fix by providing the path to the KSFT installed kernel headers in CFLAGS.

Reported-by: Cristian Marussi <cristian.marussi@arm.com>
Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
Change-Id: I60d1538e2fc391bcf74823ddcdce7c425d6bf707
2019-10-07 15:27:40 -04:00
Andrey Konovalov
58f10ec3d3 UPSTREAM: selftests, arm64: fix uninitialized symbol in tags_test.c
(Upstream commit 74585fcb7b3ccb35135e2418dd66251022a916e5).

Fix tagged_ptr not being initialized when TBI is not enabled.

Link: https://www.spinics.net/lists/linux-kselftest/msg09446.html
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
Change-Id: Ibfe3dfddb76ae56d51201d9e5db750c8f119323a
2019-10-07 15:27:39 -04:00
Andrey Konovalov
fc8246889d UPSTREAM: selftests, arm64: add a selftest for passing tagged pointers to kernel
(Upstream commit 9ce1263033cd2ad393e2ff0df4a1c4ab4992c9df).

This patch is a part of a series that extends kernel ABI to allow to pass
tagged user pointers (with the top byte set to something else other than
0x00) as syscall arguments.

This patch adds a simple test, that calls the uname syscall with a
tagged user pointer as an argument. Without the kernel accepting tagged
user pointers the test fails with EFAULT.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
Change-Id: I150694bf72706b5dd39939e38435c3aebf6ab2b3
2019-10-07 15:27:39 -04:00