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:	Thu, 12 Jul 2012 11:08:37 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>, yrl.pp-manager.tt@...achi.com
Subject: Re: [PATCH 5/6] ftrace/x86: Add separate function to save regs

(2012/07/12 1:28), Steven Rostedt wrote:
> On Wed, 2012-07-11 at 12:22 -0400, Steven Rostedt wrote:
>> On Tue, 2012-07-03 at 17:29 +0900, Masami Hiramatsu wrote:
>>
>>
>>>
>>>> +	/* Restore flags */
>>>> +	pushq EFLAGS(%rsp)
>>>> +	popfq
>>>> +
>>>> +	MCOUNT_RESTORE_FRAME
>>>
>>> Here, if MCOUNT_RESTORE_FRAME has skip too, I think you don't
>>> need to restore flags before restoring other registers, like
>>> below;
>>>
>>> 	MCOUNT_RESTORE_FRAME 8
>>> 	popfq
>>>
>>> And also, this will prevent to modify flags before return by
>>> addq in MCOUNT_RESTORE_FRAME.
>>
>> Ah, because the addq will modify flags :-/
>>
>> Grumble, I guess I should implement this, even though it will make it a
>> little more complex. I thought it was better to restore flags
>> explicitly, but that's not the case.
>>
> 
> I know why I did this. Do you want kprobes to be able to modify flags?
> If so, then I need to add, before the restore:
> 
> 	movq EFLAGS(%rsp), %rax
> 	movq %rax, SS(%rsp)

Yes, kprobes might be used for modifying flags, so, please :)

Thank you,

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: 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