[parisc-linux] Re: [PATCH] PCMCIA: Disable probing on parisc

Dominik Brodowski linux at dominikbrodowski.net
Wed Dec 7 07:21:29 EST 2005


Hi,

On Tue, Dec 06, 2005 at 08:36:48AM -0500, James Bottomley wrote:
> On Tue, 2005-12-06 at 09:36 +0000, Russell King wrote:
> > I don't think you've fully understood what I've been saying.
> > When we try to do memory probing, we setup a mapping in the same
> > way that we setup a mapping to read the CIS from the card.
> 
> Yes, I do.  On PARISC, memory I/O ranges are directed.  If you program
> the CIS to respond outside the directed range of its parent,

Which we do not -- at least what I can see from the code.
drivers/pcmcia/rsrc_nonstatic.c:
	-> pcmcia_nonstatic_validate_mem()
	-> validate_mem()
	-> do_mem_probe()
	-> cis_readable()
	-> claim_region()
		if (s && s->cb_dev)
			parent = pci_find_parent_resource(s->cb_dev, res);
		if (!parent || request_resource(parent, res))
			=> break out
As we should.

And only if it succeeds, we read (or write) to such addresses. At least in
theory. There seems to be a bug -- either in the PARISC setup, or in the
PCMCIA code -- which triggers this HMAC. Let's find it, as _not_ doing these
checks seems to be the wrong thing to do. James, could you find out what
call exactly does this HMAC? Which kernel are you referring to? Also, maybe
a pcibios_resource_to_bus or pcibios_bus_to_resource translation is missing
somewhere?

Thanks,
	Dominik



More information about the linux-pcmcia mailing list