]> sourceware.org Git - systemtap.git/commit
PR23860: additional ugly stack/clobber protection for strings
authorSerhei Makarov <smakarov@redhat.com>
Fri, 9 Nov 2018 19:36:19 +0000 (14:36 -0500)
committerSerhei Makarov <smakarov@redhat.com>
Fri, 9 Nov 2018 21:45:47 +0000 (16:45 -0500)
commit7a5716bb8fcc0bc50f3bdd65e43457d07278210a
tree19b1a1de7abb94b9139dd979c11914d60877431d
parent021f906e5e2d307a04719b921717084f795c21ca
PR23860: additional ugly stack/clobber protection for strings

In addition to prior commit, emit_string_copy() does not work for
overlapping source/destination. So, make sure strings are not
allocated in a way which overlaps map key/value arguments.

This increases space pressure, inducing a couple of bpf-asm.exp
testcase failures.

* bpf-internal.h (value::format_str): New flag.
(value::value): Take format_str flag.
(value::mk_str): Take format_str flag.
(program::format_map): New field, caches format_str separately.
(program::new_str): Take format_str flag.
* bpf-base.cxx (program::new_str): Cache format_str separately.
* bpf-opt.cxx (alloc_literal_str): Store non-format str in lower half.
* bpf-translate.cxx (emit_string_copy): Comment -- doesn't support overlap.
(emit_string_copy): DEBUG_CODEGEN -- identify if zero-padding was done.
(emit_print_format): Set format_str flag.
bpf-base.cxx
bpf-internal.h
bpf-opt.cxx
bpf-translate.cxx
This page took 0.026457 seconds and 5 git commands to generate.