mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 07:14:10 +08:00
4773a37f0a
Pointer Authentication works by adding a signature to the top bits of an instruction or data pointer (only instruction pointers on the stack are currently signed in Chromium). This can confuse range checks, because they need to strip the top bits. Masking these bits during sanitization range checks prevents confusion. Test: Testing was done manually on a device with pointer authentication enabled. Bug: crashpad:364 Bug: 919548 Change-Id: I2e739cadb2844cfaf73a75596d664135aeb5faac Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4387271 Commit-Queue: Adam Walls <avvall@google.com> Reviewed-by: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Ben Hamilton <benhamilton@google.com>
30 lines
903 B
C++
30 lines
903 B
C++
// Copyright 2023 The Crashpad Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#ifndef CRASHPAD_UTIL_LINUX_PAC_HELPER_H_
|
|
#define CRASHPAD_UTIL_LINUX_PAC_HELPER_H_
|
|
|
|
#include "util/misc/address_types.h"
|
|
|
|
namespace crashpad {
|
|
|
|
//! \brief Strips PAC bits from an address
|
|
VMAddress StripPACBits(VMAddress address);
|
|
|
|
} // namespace crashpad
|
|
|
|
|
|
#endif // CRASHPAD_UTIL_LINUX_PAC_HELPER_H_
|
|
|