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 - 08:09:49 EST
On Mon, Aug 19, 2024 at 01:56:05PM +0200, Alexey Gladkov wrote:
> On Mon, Aug 19, 2024 at 01:48:11PM +0300, Kirill A. Shutemov wrote:
> > 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.
>
> Should I drop them from this patchset and send them after this patchset as
> a separate change ?
Yeah. I think so.
--
Kiryl Shutsemau / Kirill A. Shutemov