From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbbBYOH4 (ORCPT ); Wed, 25 Feb 2015 09:07:56 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:62624 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbbBYOHy (ORCPT ); Wed, 25 Feb 2015 09:07:54 -0500 From: Arnd Bergmann To: Ezequiel Garcia Cc: Tobias Klauser , Chung-Ling Tang , Walter Goossens , Ley Foon Tan , linux-arch@vger.kernel.org, "nios2-dev@lists.rocketboards.org" , "linux-kernel@vger.kernel.org" Subject: Re: nios2: is the ptrace ABI correct? Date: Wed, 25 Feb 2015 15:07:39 +0100 Message-ID: <10841724.NbdcAaCe1a@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <54EDB2FC.4050901@vanguardiasur.com.ar> References: <10088870.tldQegtTla@wuerfel> <54EDB2FC.4050901@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:1bxHetKinZqh7A9W/cRfr9emOXa1WWaCSdGD3oskJKgK6DQIGkH JW2yjj4UB1ECCll3LtqzFwleiVpQvTKiDDlufUWXzivnCbTnbYpDllLQKgJpaXi5xq9R+4Y L85mmq2fslVVUOhX9aQduufwGjTp6+4TCZ4aHClHxG6kfwIzDaeX0cj3bQKKiodogDzhfTr vKDPtrWVmJ4YZKvmR5XBg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 25 February 2015 08:33:16 Ezequiel Garcia wrote: > > /me is more confused now > > In arch/nios2/include/asm/ucontext.h > > struct ucontext { > unsigned long uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > struct mcontext uc_mcontext; > sigset_t uc_sigmask; > }; > > And in include/uapi/asm-generic/ucontext.h: > > struct ucontext { > unsigned long uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > struct sigcontext uc_mcontext; > sigset_t uc_sigmask; > }; > > Which one is the one that userspace sees? And why does the kernel has > two different structures? Userspace sees the asm-generic header, which I assume is a bug in this case. > Given this oddities, I'm wondering how troublesome would be to just > re-do this and break the ptrace and signal ABI. For instance, just > pushing pt_regs in PTRACE_GETREGSET would make things much clearer. Could you change pt_regs to match the layout you have for PTRACE_GETREGSET instead? It seems much more intuitive. > I guess Linus would burn me for even suggesting to breaking users... but > do we have any users at all? This arch has just been mainlined. Altera's > out-of-tree is already ABI-incompatible with mainline so that's not an > issue. > > The only one using this ABI is gdb, which is easily fixed. You can change anything you like as long as nobody complains about regressions. Arnd