Jan Kiszka wrote:
> This adds __xn_sys_drop_u_mode, a syscall to deregister the u_mode user
> space address passed on shadow creation for the current thread. We need
> this in order to safely shut down a thread that wants to release its
> u_mode memory (either malloc'ed or TLS-allocated). So far, the kernel
> might have touched this memory even after the release which caused
> subtle corruptions.
> After we released u_mode, we can no longer make reliable decisions based
> on it. For the fast mutex use case, we then assume the worst case, ie.
> we enforce syscall-based acquisitions unconditionally. For the
> assert_nrt case, we simply acquire the required information via
As usual, you are firing patches too fast:
- you are lacking the exit syscall trap.
- the patch is not correct and will cause kernel-space addresses to be
passed to put_user, which probably yields bugs when the kernel is
compiled with proper debug flags;
- I do not see the point where the new syscall is called with __thread,
but I am not sure it is missing, and if it is missing, you will get the
rightfull warning when hitting the exit syscall.
- the user-space users of the function to get current_mode are still
cluttered with special cases to handle the invalid state. And
illustrating nicely the deficiency of this approach, you have forgot one
I am not going to make my version before tomorrow, so you have plenty of
time to send me an at least correct version which would take into
account all of our discussions.
Please also consider that your "patch machinegun" way of working is not
really sane. When there are so many often untested patches to review
coming from you, we sometime let some errors slip through. And from a
user point of view, seeing so many buggy patches refused is not really
Xenomai-core mailing list