Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933408AbbKRO5b (ORCPT ); Wed, 18 Nov 2015 09:57:31 -0500 Received: from mail.efficios.com ([78.47.125.74]:60798 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933104AbbKRO51 (ORCPT ); Wed, 18 Nov 2015 09:57:27 -0500 Date: Wed, 18 Nov 2015 14:57:17 +0000 (UTC) From: Mathieu Desnoyers To: Andy Lutomirski Cc: rostedt , Andy Lutomirski , Thomas Gleixner , "H. Peter Anvin" , lttng-dev , LKML Message-ID: <1455473985.114184.1447858637821.JavaMail.zimbra@efficios.com> In-Reply-To: References: <2095400880.57684.1447011457513.JavaMail.zimbra@efficios.com> <5640F406.3020207@kernel.org> <20151109144309.361ab4e5@gandalf.local.home> <20151109161216.2af12ffd@gandalf.local.home> <20151109213109.639071d7@gandalf.local.home> Subject: Re: Compat syscall instrumentation and return from execve issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [78.47.125.74] X-Mailer: Zimbra 8.6.0_GA_1178 (ZimbraWebClient - FF42 (Linux)/8.6.0_GA_1178) Thread-Topic: Compat syscall instrumentation and return from execve issue Thread-Index: ojnQzlUjawzlABpXOVVxzfI1IQo66w== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1874 Lines: 57 ----- On Nov 11, 2015, at 8:08 PM, Andy Lutomirski luto@amacapital.net wrote: > On Mon, Nov 9, 2015 at 6:31 PM, Steven Rostedt wrote: >> On Mon, 9 Nov 2015 17:51:25 -0800 >> Andy Lutomirski wrote: >> >> >>> do_syscall_32_irqs_on would call syscall_return_slowpath(regs, >>> AUDIT_ARCH_I386). do_syscall_64 (which doesn't exist yet) would call >>> syscall_return_slowpath(regs, AUDIT_ARCH_X86_64). >>> >> >> OK, so you are saying that a execve that switches the current state >> into ia32 will return from the do_syscall_64 regardless? Then we would >> have to add tracepoints that would be for both ia32 and x86_64. But >> that would solve the current issue at hand. >> > > Indeed. Unlike fork/clone, execve is only magical insofar as it does > magical things to task_struct and it enters in the 64-bit native case > through a nasty asm path. The former has no effect on the entry code > (except most likely blocking opportunistic sysret because we're a bit > silly and it might break ABI to change that), and the latter barely > matters for this purpose. In any event, I'm planning on getting rid > of the asm stub for 4.5 if I can get the code written and tested in > time. I guess there are no plans to do this kind of change to other architectures in the near future ? If so, we might want to investigate the thread status flag approach for other architectures, and use the AUDIT_ARCH_* approach for x86. Thoughts ? Thanks, Mathieu > > --Andy > > > > > -- > Andy Lutomirski > AMA Capital Management, LLC -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/