[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1601292670-1616-6-git-send-email-alan.maguire@oracle.com>
Date: Mon, 28 Sep 2020 12:31:07 +0100
From: Alan Maguire <alan.maguire@...cle.com>
To: ast@...nel.org, daniel@...earbox.net, andriin@...com, yhs@...com
Cc: linux@...musvillemoes.dk, andriy.shevchenko@...ux.intel.com,
pmladek@...e.com, kafai@...com, songliubraving@...com,
john.fastabend@...il.com, kpsingh@...omium.org, shuah@...nel.org,
rdna@...com, scott.branden@...adcom.com, quentin@...valent.com,
cneirabustos@...il.com, jakub@...udflare.com, mingo@...hat.com,
rostedt@...dmis.org, acme@...nel.org, bpf@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Alan Maguire <alan.maguire@...cle.com>
Subject: [PATCH v7 bpf-next 5/8] 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@...il.com>
Signed-off-by: Alan Maguire <alan.maguire@...cle.com>
---
kernel/bpf/bpf_iter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index 30833bb..8f10e30 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -88,8 +88,8 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size,
mutex_lock(&seq->lock);
if (!seq->buf) {
- seq->size = PAGE_SIZE;
- seq->buf = kmalloc(seq->size, GFP_KERNEL);
+ seq->size = PAGE_SIZE << 3;
+ seq->buf = kvmalloc(seq->size, GFP_KERNEL);
if (!seq->buf) {
err = -ENOMEM;
goto done;
--
1.8.3.1
Powered by blists - more mailing lists