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: Thu, 17 Jan 2008 19:59:31 -0500 From: "H. Peter Anvin" <hpa@...or.com> To: Harvey Harrison <harvey.harrison@...il.com> CC: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>, Thomas Gleixner <tglx@...utronix.de> Subject: Re: [PATCH] x86: Use v8086_mode helper, trivial unification Harvey Harrison wrote: > > Sorry, missed that detail in ptrace.h, I notice now. > > Is there some better way this could be organized, would the following > be an improvement, as opposed to two long ifdef sections? > > Patch will follow if you think it's a good idea. It is actually quite a bit easier to read. > > static inline unsigned long stack_pointer(struct pt_regs *regs) > { > #ifdef CONFIG_X86_32 > return (unsigned long)regs; > #else > return regs->sp; > #endif > } This one is kind of strange. In particular, the 32-bit definition isn't exactly what one would expect. It makes me concerned that it actually refers to two different kinds of stack pointers? > /* still need a define here, as one is long and one is unsigned long. > * but this is another target for unification I guess. */ > #define regs_return_value(regs) ((regs)->ax) Indeed... -hpa -- 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