if (!bpf_verifier_log_needed(log))
                return;
 
-       /* btf verifier prints all types it is processing via
-        * btf_verifier_log_type(..., fmt = NULL).
-        * Skip those prints for in-kernel BTF verification.
-        */
-       if (log->level == BPF_LOG_KERNEL && !fmt)
-               return;
+       if (log->level == BPF_LOG_KERNEL) {
+               /* btf verifier prints all types it is processing via
+                * btf_verifier_log_type(..., fmt = NULL).
+                * Skip those prints for in-kernel BTF verification.
+                */
+               if (!fmt)
+                       return;
+
+               /* Skip logging when loading module BTF with mismatches permitted */
+               if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH))
+                       return;
+       }
 
        __btf_verifier_log(log, "[%u] %s %s%s",
                           env->log_type_id,
        if (!bpf_verifier_log_needed(log))
                return;
 
-       if (log->level == BPF_LOG_KERNEL && !fmt)
-               return;
+       if (log->level == BPF_LOG_KERNEL) {
+               if (!fmt)
+                       return;
+
+               /* Skip logging when loading module BTF with mismatches permitted */
+               if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH))
+                       return;
+       }
+
        /* The CHECK_META phase already did a btf dump.
         *
         * If member is logged again, it must hit an error in
                }
                btf = btf_parse_module(mod->name, mod->btf_data, mod->btf_data_size);
                if (IS_ERR(btf)) {
-                       pr_warn("failed to validate module [%s] BTF: %ld\n",
-                               mod->name, PTR_ERR(btf));
                        kfree(btf_mod);
-                       if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH))
+                       if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) {
+                               pr_warn("failed to validate module [%s] BTF: %ld\n",
+                                       mod->name, PTR_ERR(btf));
                                err = PTR_ERR(btf);
+                       } else {
+                               pr_warn_once("Kernel module BTF mismatch detected, BTF debug info may be unavailable for some modules\n");
+                       }
                        goto out;
                }
                err = btf_alloc_id(btf);