diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-04-01 21:27:46 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-04 01:27:38 +0200 |
commit | 7a9f5c65abcc9644b11738ca0815510cb5510eaf (patch) | |
tree | a6f9460e4dbd029f130ac317ae83526536614b5e /kernel | |
parent | c04c0d2b968ac45d6ef020316808ef6c82325a82 (diff) | |
download | linux-7a9f5c65abcc9644b11738ca0815510cb5510eaf.tar.gz linux-7a9f5c65abcc9644b11738ca0815510cb5510eaf.tar.bz2 linux-7a9f5c65abcc9644b11738ca0815510cb5510eaf.zip |
bpf: increase verifier log limit
The existing 16Mbyte verifier log limit is not enough for log_level=2
even for small programs. Increase it to 1Gbyte.
Note it's not a kernel memory limit.
It's an amount of memory user space provides to store
the verifier log. The kernel populates it 1k at a time.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/verifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index b631e89e7a51..bb27b675923c 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -7974,7 +7974,7 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, ret = -EINVAL; /* log attributes have to be sane */ - if (log->len_total < 128 || log->len_total > UINT_MAX >> 8 || + if (log->len_total < 128 || log->len_total > UINT_MAX >> 2 || !log->level || !log->ubuf || log->level & ~BPF_LOG_MASK) goto err_unlock; } |