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:	Sun, 30 Dec 2007 09:52:26 -0500
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>
CC:	Harvey Harrison <harvey.harrison@...il.com>,
	Jim Keniston <jkenisto@...ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86: kprobes remove fix_riprel #ifdef

Hello Ingo,

Ingo Molnar wrote:
> * Masami Hiramatsu <mhiramat@...hat.com> wrote:
> 
>> Hello Harvey,
>>
>> A similar idea was already nack-ed by Ananth.
>> http://sources.redhat.com/ml/systemtap/2007-q4/msg00468.html
>> And I agree his thought.
>>
>> Especially, "riprel" does not exist on x86_32, so fix_riprel()
>> is meaningless on it.
>> Thus, I think it would better be ifdef'd in call-site.
> 
> but we regularly do this in generic code: we add calls that are NOPs on 
> some architectures. For example flush_cache_page() makes no sense on the 
> x86 architecture.

Indeed.
By the way, flush_cache_page() is defined as a do-while(0) on x86.
Would it better to define fix_riprel() as a do-while(0) on x86-32?
I think this obviously indicates that function has no effect.

> So i'm inclined to apply Harvey's cleanup - less
> #ifdef complexity in higher-level code is very much favored, even
> if "riprel" is a NOP concept on 32-bit.

OK, I agree about that fix_riprel() which is ifdef'd twice is too much ifdef'd.
Reducing ifdef is good to me.

Thanks,
> 
> 	Ingo

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@...hat.com, masami.hiramatsu.pt@...achi.com

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