On Thu, Aug 13, 2015 at 5:50 PM, Stas Sergeev <stsp@xxxxxxx> wrote:Stop right here, doesn't the SA_xyz allow to avoid the
14.08.2015 03:27, Linus Torvalds ÐÐÑÐÑ:I'm leaning slightly toward LAR heuristic + SA_SAVE_SS.
On Thu, Aug 13, 2015 at 5:17 PM, Stas Sergeev <stsp@xxxxxxx> wrote:Yes, I was proposing the new sigaction() flag in this thread
For example because you can as well do:I really think a prctl() is the wrong thing to do.
prctl(ARCH_SET_SIGNAL_SS, 0)
which will mean "restore ss in sighandler to its current value",
If you want a signal handler to save/restore segments, I think it
should be a SA_xyz flag to sigaction() (the way we have SA_RESTART
already too. But at the end, prctl() looks better to me because
it allows to pass the TLS value to use when restoring FS.
The thing is that I am trying to find the similar treatment for
both the SS and FS problems. If you don't think they need a
similar treatment, then perhaps the Andy's patch is enough.
etc). And off by default because of the obvious compatibility issues.Of course.
So, what we have right now (in the latest Andy's patch) is:
1. lar heuristics
2. new uc_flags flag
What it solves: dosemu's regression.
What prctl() can give:
- fix to dosemu's regression
- fix to the TLS problem in the future
- no hack and heuristics
With SA_xyz you can only solve the SS problem, so it is
probably not any better than the uc_flags things coded
up by Andy.
Unfortunately, I don't think we were clever enough to allow this to beBig deal, check the kversion. :)
probed easily -- we silently ignore unrecognized sa_flags bits.