blob: d061176d57ea178b8bcd91f673d86142735a7524 [file] [log] [blame]
Marco Elver16591e42021-01-22 09:18:37 +00001/* SPDX-License-Identifier: GPL-2.0 */
Marco Elverd92230e2021-01-22 09:18:37 +00002/*
3 * arm64 KFENCE support.
4 *
5 * Copyright (C) 2020, Google LLC.
6 */
Marco Elver16591e42021-01-22 09:18:37 +00007
8#ifndef __ASM_KFENCE_H
9#define __ASM_KFENCE_H
10
11#include <asm/cacheflush.h>
12
Marco Elver16591e42021-01-22 09:18:37 +000013static inline bool arch_kfence_init_pool(void) { return true; }
14
15static inline bool kfence_protect_page(unsigned long addr, bool protect)
16{
17 set_memory_valid(addr, 1, !protect);
18
19 return true;
20}
21
22#endif /* __ASM_KFENCE_H */