bpf: Fix typo in function save_aux_ptr_type
authorRafael Passos <rafael@rcpassos.me>
Wed, 17 Apr 2024 17:52:26 +0000 (14:52 -0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 22 Apr 2024 15:12:05 +0000 (17:12 +0200)
I found this typo in the save_aux_ptr_type function.
s/allow_trust_missmatch/allow_trust_mismatch/
I did not find this anywhere else in the codebase.

Signed-off-by: Rafael Passos <rafael@rcpassos.me>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/fbe1d636-8172-4698-9a5a-5a3444b55322@smtp-relay.sendinblue.com
kernel/bpf/verifier.c

index 68cfd6fc6ad4d389c2ad7103b99e983945325574..7b2aa065e5524216207a717aa92f6b29f8b30d64 100644 (file)
@@ -6971,7 +6971,7 @@ static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regn
 }
 
 static int save_aux_ptr_type(struct bpf_verifier_env *env, enum bpf_reg_type type,
-                            bool allow_trust_missmatch);
+                            bool allow_trust_mismatch);
 
 static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn)
 {
@@ -17530,7 +17530,7 @@ static bool reg_type_mismatch(enum bpf_reg_type src, enum bpf_reg_type prev)
 }
 
 static int save_aux_ptr_type(struct bpf_verifier_env *env, enum bpf_reg_type type,
-                            bool allow_trust_missmatch)
+                            bool allow_trust_mismatch)
 {
        enum bpf_reg_type *prev_type = &env->insn_aux_data[env->insn_idx].ptr_type;
 
@@ -17548,7 +17548,7 @@ static int save_aux_ptr_type(struct bpf_verifier_env *env, enum bpf_reg_type typ
                 * src_reg == stack|map in some other branch.
                 * Reject it.
                 */
-               if (allow_trust_missmatch &&
+               if (allow_trust_mismatch &&
                    base_type(type) == PTR_TO_BTF_ID &&
                    base_type(*prev_type) == PTR_TO_BTF_ID) {
                        /*