Re: [PATCH v5 1/4] x86/signal/64: Add a comment about sigcontext->fs and gs

From: Ingo Molnar
Date: Wed Feb 17 2016 - 06:05:32 EST



* Stas Sergeev <stsp@xxxxxxx> wrote:

> 17.02.2016 10:21, Ingo Molnar ÐÐÑÐÑ:
> >
> > * Andy Lutomirski <luto@xxxxxxxxxx> wrote:
> >
> >> + * If the kernel ever adds explicit fs, gs, fsbase, and gsbase
> >> + * save/restore, it will most likely need to be opt-in and use
> >> + * different context slots.
> >
> > Btw., that's not necessarily true: it could also be made opt-out, and a
> > modify_ldt() or any other cleanly identifiable legacy usage/signature that is
> > associated with DOSEMU might trigger the opt-out automatically as well.
> But there are the new versions of dosemu that still use
> "modify_ldt() or any other cleanly identifiable legacy usage/signature"
> and yet wants a new functionality.
> Please don't go for such an unreliable heuristic.

Only if implemented dumbly.

Implemented intelligently there would be 3 runtime states: enabled, disabled,
automatic. New DOSEMU would explicitly enable it, which would override any
automatic defaults.

But note that I was only pointing out that the comment is needlessly restrictive.
Anyway, I have applied Andy's patches.

Thanks,

Ingo