Skip to content

Commit af65320

Browse files
alan-maguireAlexei Starovoitov
authored andcommitted
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: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/1601292670-1616-6-git-send-email-alan.maguire@oracle.com
1 parent 076a95f commit af65320

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/bpf/bpf_iter.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size,
8888
mutex_lock(&seq->lock);
8989

9090
if (!seq->buf) {
91-
seq->size = PAGE_SIZE;
92-
seq->buf = kmalloc(seq->size, GFP_KERNEL);
91+
seq->size = PAGE_SIZE << 3;
92+
seq->buf = kvmalloc(seq->size, GFP_KERNEL);
9393
if (!seq->buf) {
9494
err = -ENOMEM;
9595
goto done;

0 commit comments

Comments
 (0)