diff options
| author | Douglas Anderson <[email protected]> | 2024-01-23 00:49:34 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2024-02-01 17:44:07 +0000 |
| commit | 84022cff50511e28bf96a407979ff7ea809b532c (patch) | |
| tree | 264e53186192a5ac936cc3ff1b73e30d3b06e52f /lib/string.c | |
| parent | Linux 6.8-rc2 (diff) | |
| download | kernel-84022cff50511e28bf96a407979ff7ea809b532c.tar.gz kernel-84022cff50511e28bf96a407979ff7ea809b532c.zip | |
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: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/20240122164935.1.I345e485f36babad76370c59659a706723750d950@changeid
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions
