|
@@ -12,6 +12,15 @@ extern "C" {
|
|
|
|
|
|
long ptrace(int request, pid_t tid, void* addr, void* data)
|
|
long ptrace(int request, pid_t tid, void* addr, void* data)
|
|
{
|
|
{
|
|
|
|
+ if (request == PT_PEEKBUF) {
|
|
|
|
+ // PT_PEEKBUF cannot easily be correctly used through this function signature:
|
|
|
|
+ // The amount of data to be copied is not available.
|
|
|
|
+ // We could VERIFY() here, but to safeguard against ports that attempt to use
|
|
|
|
+ // the same number, let's claim that the Kernel just doesn't know the command.
|
|
|
|
+ // Use Core::System::ptrace_peekbuf instead.
|
|
|
|
+ return EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
// PT_PEEK needs special handling since the syscall wrapper
|
|
// PT_PEEK needs special handling since the syscall wrapper
|
|
// returns the peeked value as an int, which can be negative because of the cast.
|
|
// returns the peeked value as an int, which can be negative because of the cast.
|
|
// When using PT_PEEK, the user can check if an error occurred
|
|
// When using PT_PEEK, the user can check if an error occurred
|