diff options
author | Yonghong Song <yhs@fb.com> | 2020-05-09 19:59:16 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-05-10 02:05:27 +0200 |
commit | 9c5f8a1008a121e4c6b24af211034e24b0b63081 (patch) | |
tree | 5bab59eab8c7aef4830ad807b30f617c007ec78b /tools/bpf | |
parent | bpf: Handle spilled PTR_TO_BTF_ID properly when checking stack_boundary (diff) | |
download | linux-9c5f8a1008a121e4c6b24af211034e24b0b63081.tar.xz linux-9c5f8a1008a121e4c6b24af211034e24b0b63081.zip |
bpf: Support variable length array in tracing programs
In /proc/net/ipv6_route, we have
struct fib6_info {
struct fib6_table *fib6_table;
...
struct fib6_nh fib6_nh[0];
}
struct fib6_nh {
struct fib_nh_common nh_common;
struct rt6_info **rt6i_pcpu;
struct rt6_exception_bucket *rt6i_exception_bucket;
};
struct fib_nh_common {
...
u8 nhc_gw_family;
...
}
The access:
struct fib6_nh *fib6_nh = &rt->fib6_nh;
... fib6_nh->nh_common.nhc_gw_family ...
This patch ensures such an access is handled properly.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200509175916.2476853-1-yhs@fb.com
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions