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:	Fri, 17 Oct 2008 16:00:27 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	David Miller <davem@...emloft.net>, rdreier@...co.com,
	Geert.Uytterhoeven@...ycom.com, hpa@...or.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu, yhlu.kernel@...il.com,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] Fix broken debug output reserve_region_with_split()

On Thu, 2008-10-16 at 21:18 -0700, Linus Torvalds wrote:
> 
> Sure, but I don't think we agree on what it would be. And quite frankly, 
> it might depend on the resource.
> 
> For example, in traditional PCI, PIO resources would easily want to use 
> %04x, which MMIO would use %08x. Sure, Linux _allows_ for bigger resources 
> (ie you can have even PIO resources with the full 64-bit data), but it's 
> not what you'd expect for any traditional stuff, and so it makes sense to 
> make PIO resources show as %04x to get the old-fashioned resources shown 
> in an expected manner.

Well, I was proposing that in the patch comments I think :-) We can do
some more specific formatting details in there based on the resource
flags, though we might also need some arch ifdef's in there.

It's better I think than having callers get it wrong in hundreds of
different ways.

> We can do it inside the %pR code itself (just look at IORESOURCE_IO vs 
> IORESOURCE_MEM), and maybe that's even the right approach. Maybe we want 
> to even add flag bits, and show things like "IORESOURCE_PREFETCH" as a 
> small marking automatically. But maybe people want to make it explicit.

I've been going on/off about the flags and decided to leave them alone
for now unless somebody comes up with a nice way to handle them. But
that doesn't mean we can't -use- the flags as you suggested to adjust
the format of the output.

The only little nit here is that the amount of digits needed for PIO is
fairly arch specific. So I might just stick an few ifdef's for the 4
possible cases (4, 8 and 16 digits) and let arch maintainers fix them up
(I'll default to 16 for everybody except x86 -> 4 and ppc -> 8).

As for the 36 bits trick of sparc32, I'll let DaveM do another arch hack
in there for now until he sorts it out.

I'll do a patch in a minute...

Cheers,
Ben.


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