[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201129015628.4jxmeesxfynowpcn@ast-mbp>
Date: Sat, 28 Nov 2020 17:56:28 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Andrii Nakryiko <andrii@...nel.org>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...com,
daniel@...earbox.net, kernel-team@...com
Subject: Re: [PATCH bpf-next 1/7] bpf: remove hard-coded btf_vmlinux
assumption from BPF verifier
On Fri, Nov 20, 2020 at 06:46:10PM -0800, Andrii Nakryiko wrote:
>
> @@ -52,12 +53,19 @@ struct bpf_reg_state {
> */
> struct bpf_map *map_ptr;
>
> - u32 btf_id; /* for PTR_TO_BTF_ID */
> + /* for PTR_TO_BTF_ID */
> + struct {
> + struct btf *btf;
> + u32 btf_id;
> + };
bpf_reg_state is the main structure contributing to the verifier memory consumption.
Is it possible to do the tracking without growing it?
>
> u32 mem_size; /* for PTR_TO_MEM | PTR_TO_MEM_OR_NULL */
>
> /* Max size from any of the above. */
> - unsigned long raw;
> + struct {
> + unsigned long raw1;
> + unsigned long raw2;
> + } raw;
Powered by blists - more mailing lists