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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Aug 2015 17:26:44 +0100
From:	Catalin Marinas <catalin.marinas@...il.com>
To:	Christoph Hellwig <hch@....de>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>, axboe@...nel.dk,
	Dan Williams <dan.j.williams@...el.com>, vgupta@...opsys.com,
	hskinnemoen@...il.com, egtvedt@...fundet.no, realmz6@...il.com,
	David Howells <dhowells@...hat.com>,
	Michal Simek <monstr@...str.eu>,
	"x86@...nel.org" <x86@...nel.org>,
	David Woodhouse <dwmw2@...radead.org>,
	alex.williamson@...hat.com, grundler@...isc-linux.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	linux-alpha@...r.kernel.org, linux-ia64@...r.kernel.org,
	linux-metag@...r.kernel.org, linux-mips@...ux-mips.org,
	linux-parisc@...r.kernel.org,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
	sparclinux@...r.kernel.org, linux-xtensa@...ux-xtensa.org,
	linux-nvdimm@...1.01.org,
	Linux Media Mailing List <linux-media@...r.kernel.org>
Subject: Re: [PATCH 31/31] dma-mapping-common: skip kmemleak checks for
 page-less SG entries

Christoph,

On 12 August 2015 at 08:05, Christoph Hellwig <hch@....de> wrote:
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  include/asm-generic/dma-mapping-common.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
> index 940d5ec..afc3eaf 100644
> --- a/include/asm-generic/dma-mapping-common.h
> +++ b/include/asm-generic/dma-mapping-common.h
> @@ -51,8 +51,10 @@ static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
>         int i, ents;
>         struct scatterlist *s;
>
> -       for_each_sg(sg, s, nents, i)
> -               kmemcheck_mark_initialized(sg_virt(s), s->length);
> +       for_each_sg(sg, s, nents, i) {
> +               if (sg_has_page(s))
> +                       kmemcheck_mark_initialized(sg_virt(s), s->length);
> +       }

Just a nitpick for the subject, it should say "kmemcheck" rather than
"kmemleak" (different features ;)).

-- 
Catalin
--
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