diff options
author | Daniel Borkmann <[email protected]> | 2016-12-18 01:52:57 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2016-12-17 21:27:44 -0500 |
commit | aafe6ae9cee32df85eb5e8bb6dd1d918e6807b09 (patch) | |
tree | 4aa9958d1ddf599f4ed32d491f8ab217c9747056 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 40e972ab652f3e9b84a8f24f517345b460962c29 (diff) |
bpf: dynamically allocate digest scratch buffer
Geert rightfully complained that 7bd509e311f4 ("bpf: add prog_digest
and expose it via fdinfo/netlink") added a too large allocation of
variable 'raw' from bss section, and should instead be done dynamically:
# ./scripts/bloat-o-meter kernel/bpf/core.o.1 kernel/bpf/core.o.2
add/remove: 3/0 grow/shrink: 0/0 up/down: 33291/0 (33291)
function old new delta
raw - 32832 +32832
[...]
Since this is only relevant during program creation path, which can be
considered slow-path anyway, lets allocate that dynamically and be not
implicitly dependent on verifier mutex. Move bpf_prog_calc_digest() at
the beginning of replace_map_fd_with_map_ptr() and also error handling
stays straight forward.
Reported-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions