Re: [PATCH v3 04/10] x86/insn: Read and decode insn without crossing the page boundary
From: Kirill A. Shutemov
Date: Mon Aug 19 2024 - 06:48:29 EST
On Fri, Aug 16, 2024 at 03:43:54PM +0200, Alexey Gladkov wrote:
> From: "Alexey Gladkov (Intel)" <legion@xxxxxxxxxx>
>
> In case the instruction is close to the page boundary, reading
> MAX_INSN_SIZE may cross the page boundary. The second page might be
> from a different VMA and reading can have side effects.
>
> The problem is that the actual size of the instruction is not known.
>
> The solution might be to try read the data to the end of the page and
> try parse it in the hope that the instruction is smaller than the
> maximum buffer size.
>
> Co-developed-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Signed-off-by: Alexey Gladkov (Intel) <legion@xxxxxxxxxx>
I think this and 3 next patches do not belong to this patchset. They
address separate issue that is orthogonal to the patchset goal.
--
Kiryl Shutsemau / Kirill A. Shutemov