-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTRACE_OLDSETOPTIONS incompatible behaviour #1692
Comments
Looks like we do not have this ptrace implemented. Could you please provide a little bit more detail on the application that is using this option so we can prioritize the implementation? |
@benhillis the application is the User-Mode Linux kernel itself :) |
@benhillis - PTRACE_OLDSETOPTIONS (value 21 decimal) behaves the same as PTRACE_SETOPTIONS (value 0x4200). They changed the value of the constant (for reasons) over a decade ago, but the semantics did not change. That is, the other three
Also, for a little context, the only software I can find on the planet that cares is User Mode Linux. Unless someone tries to run some statically linked UML won't run on WSL right now anyway, because it will brick wall on #688, and who knows what else. But the issue as presented can be addressed. Repro steps for the pedantry of it.
|
I've fixed this but the change is unlikely to make the Creators Update release because User-Mode Linux is blocked by other things and as @therealkenc noticed the usage of this is exceedingly rare. |
@benhillis thanks anyway ;) |
This is apparently also needed to run the Swift REPL under WSL: #688 |
@benhillis I see "Add support for PTRACE_OLDSETOPTIONS. [GH 1692]" in build 16170. I'm in 16179. I don't think it's fixed yet. When I follow @therealkenc 's reproduction steps and run
When I try to strace that behavior, I get a different error:
The strace file contains this:
|
|
"Invalid argument" and "operation not permitted" are different errors though? I get the PTRACE_TRACEME when strace'ing, but I'm not sure what's happening when I don't strace, and whether that's still the "invalid argument" that @woachk got originally. How do I figure out what's going on, and why I get different errors with and without strace? |
Based on the error to stdout you reported, it looks like UML is also hitting
So: "Yeah, that too" |
UML maintainer here. That's the ptrace() side, what worries me more is that a quick test on WSL showed that SIGSEGV has no valid machine specific signal context. At least the CR2 register is 0x0 and does not expose the faulting address. This makes it impossible for UML to handle page faults in userspace. i.e.
The expected output is:
Please let me know if there is something I can do or explain. UML is rather old and uses not so well known Linux features. :-) |
The (very narrow) request for |
On real Linux, ptrace(PTRACE_OLDSETOPTIONS, 2831, NULL, 0x1) works properly, but it returns EINVAL (Invalid argument) on WSL. This syscall is called in the "Checking that ptrace can change system call numbers..." routine of UML.
The text was updated successfully, but these errors were encountered: