On 30/11/2022 21:38, Beata Michalska wrote:
+#define clone_args_size_ver(ver) \
- (in_compat_syscall() ? __clone_args_size_ver(ver, COMPAT_) \
We are ending up with really a lot of calls to in_compat_syscall() in copy_clone_args_from_user(). It looks like in_compat_syscall() is completely implemented inline, so maybe the compiler can decide that it can just call it once and cache the result, but that's definitely worth checking.
I was concerned a bit about that, which is why I did mention performance impact in the commit message. I'll have another thought on how to optimize that one out.
It's really down to what the compiler outputs, if everything gets optimised out I have no problem keeping it this way.
Kevin