On Wed, May 14, 2025 at 03:08:35PM -0700, Suraj Jitindar Singh wrote:
- if (x86_return_thunk != __x86_return_thunk)
- /*
* There can only be one return thunk enabled at a time, so issue a* warning when overwriting it. retbleed_return_thunk is a special case* which is safe to be overwritten with srso_return_thunk since it* provides a superset of the functionality and is handled correctly in* entry_untrain_ret().*/- if ((x86_return_thunk != __x86_return_thunk) &&
(thunk != srso_return_thunk ||x86_return_thunk != retbleed_return_thunk))
Instead of making this an unreadable conditional, why don't we ...
pr_warn("x86/bugs: return thunk changed\n");
... turn this into a
pr_info("set return thunk to: %ps\n", ...)
and simply say which thunk was set?