[all-commits] [llvm/llvm-project] d5282d: libhwasan initialisation include kernel syscall AB...
Evgenii Stepanov via All-commits
all-commits at lists.llvm.org
Thu Oct 17 13:31:53 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d5282dfc410c6af5518b046c3ec02339aaf19950
https://github.com/llvm/llvm-project/commit/d5282dfc410c6af5518b046c3ec02339aaf19950
Author: Evgeniy Stepanov <eugeni.stepanov at gmail.com>
Date: 2019-10-17 (Thu, 17 Oct 2019)
Changed paths:
M compiler-rt/lib/hwasan/hwasan.cpp
M compiler-rt/lib/hwasan/hwasan.h
M compiler-rt/lib/hwasan/hwasan_linux.cpp
Log Message:
-----------
libhwasan initialisation include kernel syscall ABI relaxation
Summary:
Until now AArch64 development has been on patched kernels that have an always
on relaxed syscall ABI where tagged pointers are accepted.
The patches that have gone into the mainline kernel rely on each process opting
in to this relaxed ABI.
This commit adds code to choose that ABI into __hwasan_init.
The idea has already been agreed with one of the hwasan developers
(http://lists.llvm.org/pipermail/llvm-dev/2019-September/135328.html).
The patch ignores failures of `EINVAL` for Android, since there are older versions of the Android kernel that don't require this `prctl` or even have the relevant values. Avoiding EINVAL will let the library run on them.
I've tested this on an AArch64 VM running a kernel that requires this
prctl, having compiled both with clang and gcc.
Patch by Matthew Malcomson.
Reviewers: eugenis, kcc, pcc
Reviewed By: eugenis
Subscribers: srhines, kristof.beyls, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68794
llvm-svn: 375166
More information about the All-commits
mailing list