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:	Sat, 29 Dec 2007 23:04:52 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Masami Hiramatsu <mhiramat@...hat.com>
CC:	Harvey Harrison <harvey.harrison@...il.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Jim Keniston <jkenisto@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86: Introduce REX prefix helper for kprobes

Masami Hiramatsu wrote:
> Hi Harvey,
> 
> Harvey Harrison wrote:
>> Fold some small ifdefs into a helper function.
>>
>> Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
>> ---
>> Masami, Ingo, I had this left in some unsent kprobes unification
>> work.  Depends on your tastes, but does reduce ifdefs and is a bit
>> better about self-documenting the REX prefix on X86_64.
> 
> Basically, I think it is good idea.
> Could you use a macro same as the stack_addr() macro, like as below?
> 
> #defile is_REX_prefix(insn) ((insn & 0xf0) == 0x40))
> 
> This is just a bit checker, so I think a macro is better to do that.
> 

Why is a macro better than an inline, and why the odd mIXed case?

	-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

Powered by Openwall GNU/*/Linux Powered by OpenVZ