x86/oprofile: remove compat accessors usage from backtrace
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 29 Apr 2021 14:05:00 +0000 (16:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Apr 2021 14:05:00 +0000 (16:05 +0200)
commit39e7a942738f1ef48878fff67d140bbc0c83e7ff
tree28463e06e3ffdad1fc949d6d0a12f9d5d0c6a9b1
parent9a5071e80be67e7a480ef9ba9680af6754198cdb
x86/oprofile: remove compat accessors usage from backtrace

Remove the unneeded usage of the compat layer to copy frame pointers
from guest address space. Instead just use raw_copy_from_guest.

While there change the accessibility check of one frame_head beyond to
be performed as part of the copy, like it's done in the Linux code in
5.11 and earlier versions. Note it's unclear why this is needed.

Also drop the explicit truncation of the head pointer in the 32bit
case as all callers already pass a zero extended value. The first
value being rsp from the guest registers, and further calls will use
ebp from frame_head_32bit struct.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/oprofile/backtrace.c