Skip to content
Commit 84022cff authored by Douglas Anderson's avatar Douglas Anderson Committed by Kees Cook
Browse files

lkdtm: Make lkdtm_do_action() return to avoid tail call optimization



The comments for lkdtm_do_action() explicitly call out that it
shouldn't be inlined because we want it to show up in stack
crawls. However, at least with some compilers / options it's still
vanishing due to tail call optimization. Let's add a return value to
the function to make it harder for the compiler to do tail call
optimization here.

Now that we have a return value, we can actually use it in the
callers, which is a minor improvement in the code.

Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240122164935.1.I345e485f36babad76370c59659a706723750d950@changeid


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 41bccc98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment