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:	Tue, 11 May 2010 11:37:22 -0400
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Chris Wilson <chris@...is-wilson.co.uk>
Cc:	intel-gfx@...ts.freedesktop.org,
	Jaswinder Singh Rajput <jaswinderlinux@...il.com>,
	dri-devel@...ts.freedesktop.org, Dave Airlie <airlied@...ux.ie>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/i915: Record error batch buffers using iomem

On Tue, 11 May 2010 19:22:14 +0100 Chris Wilson <chris@...is-wilson.co.uk> wrote:

> +	reloc_offset = src_priv->gtt_offset;
>  	for (page = 0; page < page_count; page++) {
> -		void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> +		void __iomem *s;
> +		void *d;
> +
> +		d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
>  		if (d == NULL)
>  			goto unwind;
> -		s = kmap_atomic(src_priv->pages[page], KM_USER0);
> -		memcpy(d, s, PAGE_SIZE);
> -		kunmap_atomic(s, KM_USER0);
> +
> +		s = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
> +					     reloc_offset);
> +		memcpy_fromio(d, s, PAGE_SIZE);
> +		io_mapping_unmap_atomic(s);

As mentioned in the other email, this will still corrupt the KM_USER0
slot, and will generate a debug_kmap_atomic() warning.

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