From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/2] iommu/dma: Restore scatterlist offsets correctly Date: Tue, 5 Apr 2016 14:59:26 +0200 Message-ID: <20160405125926.GI17838@8bytes.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Robin Murphy Cc: djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, damm+renesas-yzvPICuk2ACczHhG9Qg4qA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Thu, Mar 10, 2016 at 07:28:12PM +0000, Robin Murphy wrote: > With the change to stashing just the IOVA-page-aligned remainder of the > CPU-page offset rather than the whole thing, the failure path in > __invalidate_sg() also needs tweaking to account for that in the case of > differing page sizes where the two offsets may not be equivalent. > Similarly in __finalise_sg(), lest the architecture-specific wrappers > later get the wrong address for cache maintenance on sync or unmap. > > Fixes: 164afb1d85b8 ("iommu/dma: Use correct offset in map_sg") > Reported-by: Magnus Damm > Signed-off-by: Robin Murphy Cc: stable-gepDB1WL6pn9qxiX1TGQuw@public.gmane.org # v4.4+ ? Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 From: joro@8bytes.org (Joerg Roedel) Date: Tue, 5 Apr 2016 14:59:26 +0200 Subject: [PATCH 1/2] iommu/dma: Restore scatterlist offsets correctly In-Reply-To: References: Message-ID: <20160405125926.GI17838@8bytes.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Mar 10, 2016 at 07:28:12PM +0000, Robin Murphy wrote: > With the change to stashing just the IOVA-page-aligned remainder of the > CPU-page offset rather than the whole thing, the failure path in > __invalidate_sg() also needs tweaking to account for that in the case of > differing page sizes where the two offsets may not be equivalent. > Similarly in __finalise_sg(), lest the architecture-specific wrappers > later get the wrong address for cache maintenance on sync or unmap. > > Fixes: 164afb1d85b8 ("iommu/dma: Use correct offset in map_sg") > Reported-by: Magnus Damm > Signed-off-by: Robin Murphy Cc: stable at ver.kernel.org # v4.4+ ? Joerg