Commit af653209 authored by Alan Maguire's avatar Alan Maguire Committed by Alexei Starovoitov

bpf: Bump iter seq size to support BTF representation of large data structures

BPF iter size is limited to PAGE_SIZE; if we wish to display BTF-based
representations of larger kernel data structures such as task_struct,
this will be insufficient.
Suggested-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: default avatarAlan Maguire <alan.maguire@oracle.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1601292670-1616-6-git-send-email-alan.maguire@oracle.com
parent 076a95f5
...@@ -88,8 +88,8 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, ...@@ -88,8 +88,8 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size,
mutex_lock(&seq->lock); mutex_lock(&seq->lock);
if (!seq->buf) { if (!seq->buf) {
seq->size = PAGE_SIZE; seq->size = PAGE_SIZE << 3;
seq->buf = kmalloc(seq->size, GFP_KERNEL); seq->buf = kvmalloc(seq->size, GFP_KERNEL);
if (!seq->buf) { if (!seq->buf) {
err = -ENOMEM; err = -ENOMEM;
goto done; goto done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment