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-next>] [day] [month] [year] [list]
Message-Id: <1214242487.11887.35.camel@koto.keithp.com>
Date:	Mon, 23 Jun 2008 10:34:47 -0700
From:	Keith Packard <keithp@...thp.com>
To:	Dave Airlie <airlied@...ux.ie>,
	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	keithp@...thp.com
Subject: kmap_atomic_pfn for PCI BAR access?

The graphics memory BAR is generally fairly good sized; on Intel chips,
it's between 256M and 1G (and growing). I want to write data into this
region from kernel space, but it's really too big to map the whole thing
into kernel address space, especially on 32-bit systems. ioremap is not
a good option here -- it's way too slow.

With CONFIG_HIGHMEM enabled, I can use kmap_atomic_pfn (well, actually
the kmap_atomic_proc_pfn included in the DRM tree) and things work quite
well -- performance is good, with barely any measurable time spent in
the PTE whacking (~1%).

However, with CONFIG_HIGHMEM disabled, there aren't any PTEs reserved
for this kind of mapping fun. This makes me suspect that abusing
kmap_atomic for this operation would not be appreciated. 

Should I use kmap_atomic_pfn to reach my PCI BAR like this?

Would it be reasonable to supply a patch that made this work even
without CONFIG_HIGHMEM?

-- 
keith.packard@...el.com

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ