Re: [PATCH 0/1] (Was: Linux 3.11-rc4)

From: Grazvydas Ignotas
Date: Wed Aug 07 2013 - 08:06:02 EST

On Tue, Aug 6, 2013 at 6:43 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> Felipe, thanks a lot. Yes fab840f is wrong, this "bug" is already
> used as a feature.
> Grazvydas, I cc'ed you because I do not really understand
> set_thread_context(). It does a couple of extra PTRACE_POKEUSER's
> with the "Linux 2.6.33+ needs ..." comment. It would be nice if you
> can check if 3.11 still needs this, in this case we probably need
> some more minor fixes in this area.
> In fact the first comment doesn't look right, when I look at 2.6.33
> it seems that POKEUSER(DR0-DR6) should be fine without POKEUSER(DR7),
> but this doesn't really matter and I can be easily wrong. Anyway
> this looks like a workaround to hide kernel bugs, I will appreciate
> it if you can tell if wine still needs it or not.

It's not that wine needs all this, it's the Windows games that use
debug registers to store random values to them for their copy
protection stuff. Older Linux kernels used to not care, but newer ones
started validating what's written to debug registers, and those games
started to break under wine. My wine commits try to sidestep these
kernel restrictions/sanity checking.

Personally I'd say the kernel should not limit what's written to debug
registers. Why can't I write insane values to registers in _my_
hardware? It's not like it's going to break the hardware or anything.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at