lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150119140400.GN6343@8bytes.org>
Date:	Mon, 19 Jan 2015 15:04:01 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	Shuah Khan <shuahkh@....samsung.com>
Cc:	alex.williamson@...hat.com, iommu@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu: fix trace_unmap() to report original iova

On Fri, Jan 16, 2015 at 04:47:19PM -0700, Shuah Khan wrote:
> iommu_unmap() calls trace_unmap() with changed iova and original
> size. trace_unmap() should report original iova instead. Change
> iommu_unmap() to call trace_unmap() with original iova.
> 
> Signed-off-by: Shuah Khan <shuahkh@....samsung.com>
> Reported-by: Alex Williamson <alex.williamson@...hat.com>
> ---
>  drivers/iommu/iommu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index fbf8827..2eb7554 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -1094,6 +1094,7 @@ size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size)
>  {
>  	size_t unmapped_page, unmapped = 0;
>  	unsigned int min_pagesz;
> +	unsigned long orig_iova = iova;

Instead of adding another variable I think it is better to just move the
trace_unmap call before the unmap loop. It can actually replace the
pr_debug there.


	Joerg

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ