Message ID | 20230404043659.2282536-3-andrii@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | BPF verifier rotating log | expand |
diff --git a/kernel/bpf/log.c b/kernel/bpf/log.c index 920061e38d2e..1974891fc324 100644 --- a/kernel/bpf/log.c +++ b/kernel/bpf/log.c @@ -11,7 +11,7 @@ bool bpf_verifier_log_attr_valid(const struct bpf_verifier_log *log) { - return log->len_total >= 128 && log->len_total <= UINT_MAX >> 2 && + return log->len_total > 0 && log->len_total <= UINT_MAX >> 2 && log->level && log->ubuf && !(log->level & ~BPF_LOG_MASK); }