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
| ||
|
Date: Wed, 16 Jan 2008 19:22:21 -0800 From: Harvey Harrison <harvey.harrison@...il.com> To: "H. Peter Anvin" <hpa@...or.com> Cc: Andi Kleen <ak@...e.de>, mingo@...e.hu, tglx@...utronix.de, linux-kernel@...r.kernel.org Subject: Re: [PATCH] [3/7] Use shorter addresses in i386 segfault printks On Wed, 2008-01-16 at 22:11 -0500, H. Peter Anvin wrote: > Harvey Harrison wrote: > > On Wed, 2008-01-16 at 23:27 +0100, Andi Kleen wrote: > >> Signed-off-by: Andi Kleen <ak@...e.de> > >> > >> --- > >> arch/x86/mm/fault_32.c | 2 +- > > > > Could use exactly the same in fault_64.c > > > >> #ifdef CONFIG_X86_32 > >> - "%s%s[%d]: segfault at %08lx ip %08lx sp %08lx error %lx\n", > >> + "%s%s[%d]: segfault at %lx ip %08lx sp %08lx error %lx\n", > >> #else > >> "%s%s[%d]: segfault at %lx ip %lx sp %lx error %lx\n", > >> #endif > > > > With the ongoing unification work, it would be nice if we could come > > up with a way to unify printks like this. Anyone have any bright ideas > > on a format that will keep the current alignment on 32 and 64 bit with > > the same syntax, or will these tiny ifdefs keep sprouting? > > > > Casting to (void *) and using %p is probably your best bet. That's what > it really is anyway. > > Note: in the kernel right now, %p doesn't have the leading 0x prefix, > which it probably should... Well, that won't exactly be the nicest looking solution in places, maybe a shorthand could be developed for this, or could another format specifier be added that implicitly does the (void *) cast? (%P perhaps) Harvey -- 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