Ptrace with FSGSBASE
Bae, Chang Seok
chang.seok.bae at intel.com
Thu Mar 8 22:11:30 UTC 2018
> Every call to PTRACE_SET_REGS sets all of fs, gs, fs_base and gs_base.
> So what does it mean to set fs/gs and not fs_base/gs_base?
> Are you comparing the old and new values of these registers and saying that we "set fs" if and only if the value of fs changes?
Yes, that's what I meant from ptrace perspective.
> Anyway I think rr will be fine with the new behavior. Our modifications to fs/gs/fs_base/gs_base are always either
> a) setting values that the kernel set during recording to make them happen during replay or b) emulating PTRACE_SET_REGS
> that a tracee ptracer tried to set on another tracee. Either way I think the effects are going to be the same as what would happen if the
> program were run without rr.
Thanks for check this out.
More information about the rr-dev