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:   Wed, 15 Mar 2017 19:13:58 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...capital.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC][PATCH 5/5] ftrace/x86-32: Add -mfentry support to x86_32
 with DYNAMIC_FTRACE set

On Wed, 15 Mar 2017 16:55:45 -0500
Josh Poimboeuf <jpoimboe@...hat.com> wrote:

> On Wed, Mar 15, 2017 at 03:55:32PM -0400, Steven Rostedt wrote:
> > +#ifdef USING_FRAME_POINTER
> > +# ifdef CC_USING_FENTRY
> > +	/*
> > +	 * Frame pointers are of ip followed by bp.
> > +	 * Since fentry is an immediate jump, we are left with
> > +	 * parent-ip, function-ip. We need to add a frame with
> > +	 * parent-ip followed by ebp.
> > +	 */
> > +	pushl 4(%esp)				/* parent ip */
> >  	pushl %ebp
> >  	movl %esp, %ebp
> > -
> > +	pushl 2*4(%esp)				/* function ip */
> > +# endif
> > +	/* For mcount, the function ip is directly above */
> > +	pushl %ebp
> > +	movl %esp, %ebp
> > +#endif  
> 
> More vertical operand alignment issues.
> 
> > @@ -85,6 +140,10 @@ ENTRY(ftrace_regs_caller)
> >  	pushl	%edx
> >  	pushl	%ecx
> >  	pushl	%ebx
> > +#ifndef USING_FRAME_POINTER
> > +	/* Load 4 off of the parent ip addr into ebp */
> > +	lea	14*4(%esp), %ebp
> > +#endif  
> 
> Instead of:
> 
> 	#ifndef USING_FRAME_POINTER
> 	
> Shouldn't it be:
> 
> 	#ifdef CC_USING_FENTRY
> 
> ?
> 
> Otherwise, if I'm reading it right, with fentry and
> CONFIG_FRAME_POINTER=y, ebp will lead to the grandparent's ip instead of
> the parent's ip.

Yep I think you're right. I original added frame pointer setup for the
parent on CC_USING_FENTRY and FRAME_POINTER but that got ugly, this may
be leftover from that.

Thanks, will update.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ