mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-25 13:13:12 +00:00
ANDROID: add kabi padding for bpf_verifier structure
Also add a few missing things. (no functional change) Change-Id: I5d29028ffdacb08afcde396543145e9cf21cb6fe
This commit is contained in:
committed by
Nolen Johnson
parent
b799a3ca22
commit
21f154d6db
@ -1,8 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the GNU General Public
|
||||
* License as published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef _LINUX_BPF_VERIFIER_H
|
||||
#define _LINUX_BPF_VERIFIER_H 1
|
||||
@ -10,6 +7,7 @@
|
||||
#include <linux/bpf.h> /* for enum bpf_reg_type */
|
||||
#include <linux/filter.h> /* for MAX_BPF_STACK */
|
||||
#include <linux/tnum.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
/* Maximum variable offset umax_value permitted when resolving memory accesses.
|
||||
* In practice this is far bigger than any realistic pointer offset; this limit
|
||||
@ -202,6 +200,11 @@ struct bpf_func_state {
|
||||
struct bpf_stack_state *stack;
|
||||
};
|
||||
|
||||
struct bpf_idx_pair {
|
||||
u32 prev_idx;
|
||||
u32 idx;
|
||||
};
|
||||
|
||||
struct bpf_id_pair {
|
||||
u32 old;
|
||||
u32 cur;
|
||||
@ -209,11 +212,6 @@ struct bpf_id_pair {
|
||||
|
||||
/* Maximum number of register states that can exist at once */
|
||||
#define BPF_ID_MAP_SIZE (MAX_BPF_REG + MAX_BPF_STACK / BPF_REG_SIZE)
|
||||
struct bpf_idx_pair {
|
||||
u32 prev_idx;
|
||||
u32 idx;
|
||||
};
|
||||
|
||||
#define MAX_CALL_FRAMES 8
|
||||
struct bpf_verifier_state {
|
||||
/* call stack tracking */
|
||||
@ -350,7 +348,7 @@ struct bpf_insn_aux_data {
|
||||
};
|
||||
u64 map_key_state; /* constant (32 bit) key tracking for maps */
|
||||
int ctx_field_size; /* the ctx field size for load insn, maybe 0 */
|
||||
u32 seen; /* this insn was processed by the verifier */
|
||||
u32 seen; /* this insn was processed by the verifier at env->pass_cnt */
|
||||
bool sanitize_stack_spill; /* subject to Spectre v4 sanitation */
|
||||
bool zext_dst; /* this insn zero extends dst reg */
|
||||
u8 alu_state; /* used in combination with alu_limit */
|
||||
@ -408,6 +406,8 @@ struct bpf_subprog_info {
|
||||
bool has_tail_call;
|
||||
bool tail_call_reachable;
|
||||
bool has_ld_abs;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
};
|
||||
|
||||
/* single container for all structs
|
||||
@ -465,6 +465,9 @@ struct bpf_verifier_env {
|
||||
u32 peak_states;
|
||||
/* longest register parentage chain walked for liveness marking */
|
||||
u32 longest_mark_read_walk;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
};
|
||||
|
||||
__printf(2, 0) void bpf_verifier_vlog(struct bpf_verifier_log *log,
|
||||
|
||||
Reference in New Issue
Block a user