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 14:46:32 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Geert.Uytterhoeven@...ycom.com, hpa@...or.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu,
	David Miller <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Fix broken debug output reserve_region_with_split()


> >
> > +static char *resource_string(char *buf, char *end, struct resource *res, int field_width, int precision, int flags)
> > +{
> > +       /* room for the actual numbers, the two "0x", -, [, ] and the final zero */
> > +       char sym[4*sizeof(resource_size_t) + 8];
> > +       char *p = sym, *pend = sym + sizeof(sym);
> > +
> > +       *p++ = '[';
> > +       p = number(p, pend, res->start, 16, -1, -1, SPECIAL | SMALL);
> > +       *p++ = '-';
> > +       p = number(p, pend, res->end, 16, -1, -1, SPECIAL | SMALL);
> > +       *p++ = ']';
> > +       *p = 0;
> > +
> > +       return string(buf, end, sym, field_width, precision, flags);
> 
> so x64 64bit,io ports will be print out 8 digital?

With that patch, it will use just as many digits as necessary to display
a given number. The question I'm asking in the comments is whether we
want to instead use fixed digits with zero padding, and in that case,
do we want a hook or something for archs to decide how many digits
for IO vs. memory.

But at least with that in, we can start converting callers. I have a
patch converting PCI that I'll post once that goes in and I'll start
scrubbing arch/powerpc soon.

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