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: <1406675255.12100.22.camel@joe-AO725>
Date:	Tue, 29 Jul 2014 16:07:35 -0700
From:	Joe Perches <joe@...ches.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Borislav Petkov <bp@...en8.de>,
	Prarit Bhargava <prarit@...hat.com>,
	linux-kernel@...r.kernel.org, lszubowi@...hat.com,
	Matt Fleming <matt.fleming@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-efi@...r.kernel.org
Subject: Re: [PATCH] x86, efi: print debug values in Kib not MB

On Tue, 2014-07-29 at 15:42 -0700, David Rientjes wrote:
> On Wed, 30 Jul 2014, Borislav Petkov wrote:
> 
> > On Tue, Jul 29, 2014 at 06:32:56PM -0400, Prarit Bhargava wrote:
> > > and it was best to keep the code simple with a KiB.
> > 
> > You're missing the point - the output doesn't get simple with KiB. Read
> > the example I just gave you!
> > 
> > (13893632kiB) is actively *not* helping when one looks at it!
> > 
> 
> /proc/meminfo must be frustrating then, too.
> 
> If Prarit is going to implement this suggested reverse memparse() then it 
> would be nice to also have it as a generic function that others can use.

Maybe yet another vsprintf extension?

Maybe %pH<vartype> where vartype is one of [hh, h, u, ul, ull]
with something like
	u64 t1 = (u64)*(appropriate cast)vartype;
	u64 t2 = t1;
	int index = 0;
	while ((t1 >>= 10)) {
		index++;
		t2 >>= 10;
	}
	
to output the equivalent of
	%llu%s, t2, "bkmgtpezy"[index]
ala dump_pagetables


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