Re: [PATCH 18/46] entry, lto: Mark raw_irqentry_exit_cond_resched() as __visible

Andi Kleen
2022-11-19T01:43:44Z

> Sure, they can play around with it but that does not require to merge
> all this nonsensical ballast for a half thought out compiler.

You are referring to __visible?

TBH I don't understand the problem. In general __visible is useful
documentation,

so you know something is used from assembler or other strange contexts.
Doing such things

explicitly marked instead of implicitly hidden and they just happen to
work by accident

seems cleaner to me.

I can also see the __visible markings being useful for other purposes,
e.g. static analysis tools or

dynamic instrumentation like the various sanitizers. Everything that is
referenced outside

the normal code that the compiler sees may need some special handling.

That said I don't see the point of __visible_in_lto either, it should be
just all __visible.

Similar argument applies to __noreorder, it's also useful documentation.

There are a few real workarounds in the patchkit that are a bit ugly,
but __visible isn't it.

>
> If they want to do that they can apply the pile of patches as provided
> and play around.

It's very difficult to maintain out of tree, while in tree it's much
simpler.

I think Linux should support its primary compiler well and not give up
due to relatively small obstacles.

-Andi