diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-02-15 15:41:07 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-02-16 15:25:12 +0300 |
commit | 72a86433049dcfe918886645ac3d19c1eaaa67ab (patch) | |
tree | 0f3d48d5d295ef2d4a98f86929e088e0426b6c2b /tools/testing/selftests | |
parent | b64913394f123e819bffabc79a0e48f98e78dc5d (diff) | |
download | linux-72a86433049dcfe918886645ac3d19c1eaaa67ab.tar.xz |
lkdtm: Fix execute_[user]_location()
execute_location() and execute_user_location() intent
to copy do_nothing() text and execute it at a new location.
However, at the time being it doesn't copy do_nothing() function
but do_nothing() function descriptor which still points to the
original text. So at the end it still executes do_nothing() at
its original location allthough using a copied function descriptor.
So, fix that by really copying do_nothing() text and build a new
function descriptor by copying do_nothing() function descriptor and
updating the target address with the new location.
Also fix the displayed addresses by dereferencing do_nothing()
function descriptor.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/4055839683d8d643cd99be121f4767c7c611b970.1644928018.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions