Re: [PATCH v9 00/17] Enable FSGSBASE instructions

From: Bae, Chang Seok
Date: Tue Apr 21 2020 - 13:15:40 EST



> On Apr 21, 2020, at 09:06, Sasha Levin <sashal@xxxxxxxxxx> wrote:
>
> Andi's point is that there is no known user it breaks, and the Intel
> folks did some digging into potential users who might be affected by
> this, including 'rr' brought up by Andy, and concluded that there won't
> be breakage as a result of this patchset:

FWIW, we surveyed tools like rr and CRIU before. Their comments are [*,**]:

"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.â

"Internally in criu we fetch the regset via ptrace and keep them in
images as they were at moment of dump (if ldt is being used we don't
support such tasks) so I think the changes should not break criu."

What we took away was that those tools reactively follow the underlying
kernel's behavior; so, they should be fine with the FSGSBASE-brought new
behaviors.

[*] https://mail.mozilla.org/pipermail/rr-dev/2018-March/000615.html
[**] https://lists.openvz.org/pipermail/criu/2018-March/040654.html

Thanks,
Chang