v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
pointer-authentication-dummy.h
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_EXECUTION_POINTER_AUTHENTICATION_DUMMY_H_
6#define V8_EXECUTION_POINTER_AUTHENTICATION_DUMMY_H_
7
9#include "src/base/logging.h"
10#include "src/base/macros.h"
12#include "src/flags/flags.h"
13
14namespace v8 {
15namespace internal {
16
17// Dummy implementation of the PointerAuthentication class methods, to be used
18// when CFI is not enabled.
19
20// Load return address from {pc_address} and return it.
22 unsigned) {
23 return *pc_address;
24}
25
26// Return {pc} unmodified.
28
29// Store {new_pc} to {pc_address} without signing.
31 Address new_pc, int) {
32 *pc_address = new_pc;
33}
34
35// Return {pc} unmodified.
37 Address) {
38 return pc;
39}
40
43#if V8_ENABLE_WEBASSEMBLY
44 // Only used by wasm deoptimizations and growable stacks.
45 CHECK(v8_flags.wasm_deopt || v8_flags.experimental_wasm_growable_stacks);
46 return pc;
47#else
49#endif
50}
51
52} // namespace internal
53} // namespace v8
54
55#endif // V8_EXECUTION_POINTER_AUTHENTICATION_DUMMY_H_
static V8_INLINE void ReplacePC(Address *pc_address, Address new_pc, int offset_from_sp)
static V8_INLINE Address SignAndCheckPC(Isolate *isolate, Address pc, Address sp)
static V8_INLINE Address StripPAC(Address pc)
static V8_INLINE Address MoveSignedPC(Isolate *isolate, Address pc, Address new_sp, Address old_sp)
static V8_INLINE Address AuthenticatePC(Address *pc_address, unsigned offset_from_sp)
V8_EXPORT_PRIVATE FlagValues v8_flags
#define CHECK(condition)
Definition logging.h:124
#define V8_INLINE
Definition v8config.h:500