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]
Message-ID: <ada8x3x7vw5.fsf@cisco.com>
Date:	Thu, 13 Dec 2007 20:17:14 -0800
From:	Roland Dreier <rdreier@...co.com>
To:	venkatesh.pallipadi@...el.com
Cc:	ak@....de, ebiederm@...ssion.com, torvalds@...ux-foundation.org,
	gregkh@...e.de, airlied@...net.ie, davej@...hat.com, mingo@...e.hu,
	tglx@...utronix.de, hpa@...or.com, akpm@...ux-foundation.org,
	arjan@...radead.org, jesse.barnes@...el.com,
	linux-kernel@...r.kernel.org,
	Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [RFC PATCH 06/12] PAT 64b: Add ioremap_wc support

 > --- linux-2.6.24-rc4.orig/include/asm-x86/io_64.h	2007-12-11 14:24:56.000000000 -0800
 > +++ linux-2.6.24-rc4/include/asm-x86/io_64.h	2007-12-11 15:49:52.000000000 -0800
 > @@ -142,7 +142,8 @@
 >   * it's useful if some control registers are in such an area and write combining
 >   * or read caching is not desirable:
 >   */
 > -extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
 > +extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size);
 > +extern void __iomem * ioremap_wc(unsigned long offset, unsigned long size);

I think ioremap_wc() needs to be available on all archs for this to be
really useful to drivers.  It can be a fallback to ioremap_nocache()
everywhere except 64-bit x86, but it's not nice for every driver that
wants to use this to need an "#ifdef X86" or whatever.

Also I didn't see anything like pgprot_wc() in the patchset (although
I just skimmed quickly for now).  The use case I actually have would
be in a a driver's .mmap method, where I want to map device registers
into userspace with write-combining turned on:

	vma->vm_page_prot = pgprot_wc(vma->vm_page_prot);
	io_remap_pfn_range(vma, vma->vm_start, pfn, PAGE_SIZE, vma->vm_page_prot);

where the pfn points into a PCI BAR (which will only be mapped once,
so no issues with conflicting PATs or anything like that).

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