Re: [patch] x86: ptrace and core-dump extensions for xstate

From: Roland McGrath
Date: Fri Feb 05 2010 - 16:16:20 EST


> #define PTRACE_GETREGS(r) (((r) << 16) | PTRACE_GETREGS_CMD)
>
> ... or something like that?

(You can't use that exact name, it's taken.) IMHO this is some spurious
obfuscation that is not warranted by saving the two get_user calls in the
kernel. (OTOH, my suggestion requires a whole extra 5 lines of code or so
in compat_sys_ptrace because the indirection in the ABI is sensitive to
userland word size.) But I don't feel strongly about the particulars of
the ptrace API addition, just that it be generic to cover any regset and
not be prone to implicit buffer-size miscommunications. I'll leave it to
whatever Oleg wants to implement.


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/