Merge tag 'modules-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu...
[linux-2.6-microblaze.git] / include / linux / bpf_verifier.h
index 0684151..e774ecc 100644 (file)
@@ -215,6 +215,13 @@ struct bpf_idx_pair {
        u32 idx;
 };
 
+struct bpf_id_pair {
+       u32 old;
+       u32 cur;
+};
+
+/* Maximum number of register states that can exist at once */
+#define BPF_ID_MAP_SIZE (MAX_BPF_REG + MAX_BPF_STACK / BPF_REG_SIZE)
 #define MAX_CALL_FRAMES 8
 struct bpf_verifier_state {
        /* call stack tracking */
@@ -418,6 +425,7 @@ struct bpf_verifier_env {
        const struct bpf_line_info *prev_linfo;
        struct bpf_verifier_log log;
        struct bpf_subprog_info subprog_info[BPF_MAX_SUBPROGS + 1];
+       struct bpf_id_pair idmap_scratch[BPF_ID_MAP_SIZE];
        struct {
                int *insn_state;
                int *insn_stack;
@@ -442,6 +450,7 @@ struct bpf_verifier_env {
        u32 peak_states;
        /* longest register parentage chain walked for liveness marking */
        u32 longest_mark_read_walk;
+       bpfptr_t fd_array;
 };
 
 __printf(2, 0) void bpf_verifier_vlog(struct bpf_verifier_log *log,