On Wed, Jul 20, 2022 at 11:31 AM Steven Rostedt wrote: > > Thus, is there a way to keep this file from being entered into the > return_sites section? I think the whole concept is broken. Testing known-broken code on the expectation that "this won't work anyway, so we can jump off to code that is broken" is not acceptable. *If* the test were to fail, it would start executing random code that hasn't been relocated or fixed up properly. So I think the whole concept is broken. It relies on the compiler generating code that can work in a read-only data section, and it's not clear that that is even physically possible (ie the data section might be far enough away from a code section that any relocation just fundamentally cannot happen). I think it worked purely by mistake, because the code was simple enough that it didn't need any relocation at all before. But even without RETHUNK, that was never guaranteed, because any random tracing or debug code or whatever could have made even that empty function have code in it that just fundamentally wouldn't work in a non-text section. So honestly, I think that test should be removed as a "we used this, it happened to work almost by mistake, but it doesn't work any more and it is unfixably broken". Maybe somebody can come up with an entirely different way to do that test that isn't so broken, but if so, I think it's going to be using some other machinery (eg bpf and explicitly marking it read-only and non-executable), and removing this broken model is the right thing regardless. So unless somebody has some one-liner workaround, I really suspect the fix is to remove all this. The amount of hackery to make it work in the first place is kind of disgusting anyway. Since this was a WARN_ONCE(), can you make sure that with this case removed, nothing else triggers? Linus