From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbbBXTZ6 (ORCPT ); Tue, 24 Feb 2015 14:25:58 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:52752 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753590AbbBXTZz (ORCPT ); Tue, 24 Feb 2015 14:25:55 -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: Tue, 24 Feb 2015 20:25:39 +0100 Message-ID: <10088870.tldQegtTla@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <54EC98A9.9080203@vanguardiasur.com.ar> References: <5636312.0WGrbVlVgB@wuerfel> <54EC98A9.9080203@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:qAeYDek+wUe3qn6PHXhGYHiPRe6/19HNOJNcUsG1HtOpdLhsedt dNzb0YnhzSeeE/M3AHvAnJ4LdmJ1TIRbJnqL5TOot/vHY1p1Flzp8YW9qZ1qgSL6oeez9Jh WExhocxnfUH+7Oyds9E2ZK8NgS+sS0ramkExJJuhV2gBtbR9V5kla/od/yBa59MBPjHfTBC FQGg/lawMJ1Sytvw6On0A== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 24 February 2015 12:28:41 Ezequiel Garcia wrote: > > Gah, no, you are right. I got confused. > > So it would be OK to avoid remove pt_regs from the uapi headers? > How does this affect the signal handling nios2 implementation? > We have a number of architectures that don't provide this structure: $ git grep -L pt_regs arch/*/include/uapi/asm/ptrace.h arch/frv/include/uapi/asm/ptrace.h arch/metag/include/uapi/asm/ptrace.h arch/openrisc/include/uapi/asm/ptrace.h arch/s390/include/uapi/asm/ptrace.h so I'd assume it's ok in general not to have it. However, on nios2, struct pt_regs is embedded inside of struct sigcontext. If I read the code in arch/nios2/kernel/signal.c correctly, this is actually a bug and you should use a different structure there too, because pt_regs does not match the layout of the stack either. This means that the (rare) user programs that would know about the architecture to modify signal stacks are currently broken. Arnd