From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753152AbdCPTZ5 (ORCPT ); Thu, 16 Mar 2017 15:25:57 -0400 Received: from mail.kernel.org ([198.145.29.136]:41642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156AbdCPTZz (ORCPT ); Thu, 16 Mar 2017 15:25:55 -0400 Date: Thu, 16 Mar 2017 15:24:31 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Linux Kernel Mailing List , Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Masami Hiramatsu , "H. Peter Anvin" , Andy Lutomirski , Josh Poimboeuf Subject: Re: [PATCH 4/5 v3] ftrace/x86_32: Clean up ftrace_regs_caller Message-ID: <20170316152431.05316146@gandalf.local.home> In-Reply-To: <20170316151932.5b9167b5@gandalf.local.home> References: <20170316172008.086705006@goodmis.org> <20170316172056.576095199@goodmis.org> <20170316140913.653af64d@gandalf.local.home> <20170316151932.5b9167b5@gandalf.local.home> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Mar 2017 15:19:32 -0400 Steven Rostedt wrote: > > > The thing is we don't return, we jump to the location that may be > modified to run the function graph tracer. That said, maybe the below is better? /* restore flags */ pushl 14*4(%esp) popf /* Move return ip back to its original location */ movl 12*4(%esp), %eax movl %eax, 14*4(%esp) popl %ebx popl %ecx popl %edx popl %esi popl %edi popl %ebp popl %eax popl %ds popl %es popl %fs popl %gs /* use lea to not affect flags */ lea (3*4)%esp, %esp /* Skip orig_ax, ip and flags */ jmp .Lftrace_ret -- Steve