162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * arch/arm/probes/kprobes/checkers.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2014 Huawei Inc. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci#ifndef _ARM_KERNEL_PROBES_CHECKERS_H 862306a36Sopenharmony_ci#define _ARM_KERNEL_PROBES_CHECKERS_H 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include <linux/kernel.h> 1162306a36Sopenharmony_ci#include <linux/types.h> 1262306a36Sopenharmony_ci#include "../decode.h" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciextern probes_check_t checker_stack_use_none; 1562306a36Sopenharmony_ciextern probes_check_t checker_stack_use_unknown; 1662306a36Sopenharmony_ci#ifdef CONFIG_THUMB2_KERNEL 1762306a36Sopenharmony_ciextern probes_check_t checker_stack_use_imm_0xx; 1862306a36Sopenharmony_ci#else 1962306a36Sopenharmony_ciextern probes_check_t checker_stack_use_imm_x0x; 2062306a36Sopenharmony_ci#endif 2162306a36Sopenharmony_ciextern probes_check_t checker_stack_use_imm_xxx; 2262306a36Sopenharmony_ciextern probes_check_t checker_stack_use_stmdx; 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_cienum { 2562306a36Sopenharmony_ci STACK_USE_NONE, 2662306a36Sopenharmony_ci STACK_USE_UNKNOWN, 2762306a36Sopenharmony_ci#ifdef CONFIG_THUMB2_KERNEL 2862306a36Sopenharmony_ci STACK_USE_FIXED_0XX, 2962306a36Sopenharmony_ci STACK_USE_T32STRD, 3062306a36Sopenharmony_ci#else 3162306a36Sopenharmony_ci STACK_USE_FIXED_X0X, 3262306a36Sopenharmony_ci#endif 3362306a36Sopenharmony_ci STACK_USE_FIXED_XXX, 3462306a36Sopenharmony_ci STACK_USE_STMDX, 3562306a36Sopenharmony_ci NUM_STACK_USE_TYPES 3662306a36Sopenharmony_ci}; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciextern const union decode_action stack_check_actions[]; 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#ifndef CONFIG_THUMB2_KERNEL 4162306a36Sopenharmony_ciextern const struct decode_checker arm_stack_checker[]; 4262306a36Sopenharmony_ciextern const struct decode_checker arm_regs_checker[]; 4362306a36Sopenharmony_ci#else 4462306a36Sopenharmony_ci#endif 4562306a36Sopenharmony_ciextern const struct decode_checker t32_stack_checker[]; 4662306a36Sopenharmony_ciextern const struct decode_checker t16_stack_checker[]; 4762306a36Sopenharmony_ci#endif 48