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: <20080531185424.1cd18220@infradead.org>
Date:	Sat, 31 May 2008 18:54:24 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Brice Goglin <brice@...i.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
	"venkatesh.pallipadi@...el.com" <venkatesh.pallipadi@...el.com>
Subject: Re: howto use ioremap_wc?

On Sat, 31 May 2008 11:02:54 +0200
Brice Goglin <brice@...i.com> wrote:

> Hello,
> 
> We're looking at using ioremap_wc() in myri10ge. No drivers seem to be
> using it yet, so I'd like to get some clarification regarding
> ioremap_wc failures, MTRR and so on.
> 
> What we currently do is mtrr_add() and then ioremap. Depending on the
> mtrr_add() success, we use the "wc_fifo" or regular PIO with fences to
> submit requests to the NIC. 

Ok this leads to a question: since write combining is effectively an
extension (eg relaxation) to uncached, how much do you care if you
actually get uncached? Eg can you just use the "WC" function even for
the case where you get an uncached mapping ?

> How are we supposed to switch this to
> ioremap_wc?
> 
> Are we sure that if the arch supports _wc, it does not return success
> when the underlying plain ioremap worked but setting up _wc() failed?

why would it not return success? You asked for a mapping with a set of
guarantees, and you got something that adheres to those guarantees (and
then some ;(...

Would you expect ioremap_cache() to fail if you couldn't get a cachable
mapping? That would suck (hint: on PC's it will then fail 99.9% of the
time)....

> If so, why does it revert to ioremap_nocache when PAT isn't enabled?

Actually it would make sense for the ioremap_wc() implementation to try
to add an mtrr I suppose... it's better to be done there than trying to
do it in some driver....

-- 
If you want to reach me at my work email, use arjan@...ux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ