aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_prog_array_init.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2021-08-18 08:03:08 -0700
committerKees Cook <[email protected]>2022-02-13 16:48:04 -0800
commit73ab4a3509e6b8f93b87398db2aaabd3c9cbe487 (patch)
tree1870f8db63e9f47f2d018f25951879ca3c0ce9fc /tools/testing/selftests/bpf/progs/test_prog_array_init.c
parentdfd42facf1e4ada021b939b4e19c935dcdd55566 (diff)
KVM: x86: Replace memset() "optimization" with normal per-field writes
Explicitly zero select fields in the emulator's decode cache instead of zeroing the fields via a gross memset() that spans six fields. gcc and clang are both clever enough to batch the first five fields into a single quadword MOV, i.e. memset() and individually zeroing generate identical code. Removing the wart also prepares KVM for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(). No functional change intended. Reported-by: Kees Cook <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Link: https://lore.kernel.org/lkml/YR0jIEzEcUom/[email protected] Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_prog_array_init.c')
0 files changed, 0 insertions, 0 deletions