From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BE74169397; Mon, 19 Aug 2024 11:56:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724068573; cv=none; b=S2UTLngYRR00208W/rzBV/t8aKqbDl9mnV/+BvxVwuGPJ5JJL3TxzDXXYLZiSs1nPzzYIFW75D6qiuVmB4podHGIMFuWFjBMT688jd1D0bm5MiZi7sOivLhjTyAESpTj68eSFPLxqpZEaAtfWp4GhRPV0Yn7UaxFmP6zfPFGYBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724068573; c=relaxed/simple; bh=0+bJyI2if9hUxromHqaWXaxVsRw9UqVdM4W1z9O0p2U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JwyqMPB+QQmpw5j4ytiG6IQCTlVswwAPgekHEOcinu15IhYHhJeYW37nW49+rP1lMNvZB9RKU/3O5vvmS/ffE8DEtA+K4PYBTUIgxguU1C7vXZv25nh+LCoBInFQHD7roCXgmhwIRkawqC7NDvNbCmg/rnK5/oGhx32us3DuMwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W5Ka342Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W5Ka342Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79678C4AF12; Mon, 19 Aug 2024 11:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724068572; bh=0+bJyI2if9hUxromHqaWXaxVsRw9UqVdM4W1z9O0p2U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W5Ka342QT7MMFT4VHoBHGw2KWzngs3FNWUZk+HXO0tvSAyzJMFFTLpuoZPutMbJbY c08jHOTRsHoplL7lFrEGYK4qsdkYQdHtjg5ELr5mQ9CSkn9BY8Xm+z1svEsInJSQtj wIb3U0nNO6zIpX0r7A7VW9Zrwrf2esv4cij/x1OMLDffNEEi8re1eWVZlJHgs6pez/ sejV8VTMMX0jILhtodz5igEst7P3uFDixIt96KzbMzE3xurBohAOuf2D4TywF09R7k HBayOgYH7rqj4nM1hh+ixqEmJ3ferxFzh4h7MuptqQVUN3QvP8tiHuNYwRRFvAlaAK kl35CkvuYpVww== Date: Mon, 19 Aug 2024 13:56:05 +0200 From: Alexey Gladkov To: "Kirill A. Shutemov" Cc: linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Morton , Yuan Yao , Geert Uytterhoeven , Yuntao Wang , Kai Huang , Baoquan He , Oleg Nesterov , Tom Lendacky , Kevin Loughlin , Nikunj A Dadhania , cho@microsoft.com, decui@microsoft.com, John.Starks@microsoft.com Subject: Re: [PATCH v3 04/10] x86/insn: Read and decode insn without crossing the page boundary Message-ID: References: <9704da6a35d62932d464d33b39953fc5b2fd74ea.1723807851.git.legion@kernel.org> <3xcmaxmpoemmotdqhtr5fu52wyssixyvnmirqbbnvhwpcuss5z@sayg725h5wcz> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3xcmaxmpoemmotdqhtr5fu52wyssixyvnmirqbbnvhwpcuss5z@sayg725h5wcz> 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)" > > > > 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 > > Signed-off-by: Kirill A. Shutemov > > Signed-off-by: Alexey Gladkov (Intel) > > 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 ? -- Rgrds, legion