Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754571AbdFWREh (ORCPT ); Fri, 23 Jun 2017 13:04:37 -0400 Received: from foss.arm.com ([217.140.101.70]:54692 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212AbdFWREf (ORCPT ); Fri, 23 Jun 2017 13:04:35 -0400 Message-ID: <594D49E9.7090900@arm.com> Date: Fri, 23 Jun 2017 18:03:37 +0100 From: James Morse User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Yury Norov CC: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Andrew Pinski , Andrew Pinski , Adam Borowski , Chris Metcalf , Steve Ellcey , Maxim Kuvyrkov , Ramana Radhakrishnan , Florian Weimer , Bamvor Zhangjian , Andreas Schwab , Chris Metcalf , Heiko Carstens , schwidefsky@de.ibm.com, broonie@kernel.org, Joseph Myers , christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, manuel.montezelo@gmail.com, linyongting@huawei.com, davem@davemloft.net, zhouchengming1@huawei.com, Bamvor Jian Zhang Subject: Re: [PATCH 18/20] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 References: <20170604120009.342-1-ynorov@caviumnetworks.com> <20170604120009.342-19-ynorov@caviumnetworks.com> In-Reply-To: <20170604120009.342-19-ynorov@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 936 Lines: 29 Hi Yury, On 04/06/17 13:00, Yury Norov wrote: > ILP32 has context-related structures different from both aarch32 and > aarch64/lp64. In this patch compat_arch_ptrace() renamed to > compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between > compat_a32_ptrace() and new compat_ilp32_ptrace() handler. > > compat_ilp32_ptrace() calls generic compat_ptrace_request() for all > requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need > special handling. Can you elaborate on this special handling? How come we don't need to wrap PTRACE_{G,S}ETSIGMASK for aarch32 compat? >From kernel/signal32.c that uses compat_sigset_t too. It looks like aarch64, ilp32 and aarch32 all use the same size sigset_t, so doesn't compat_ptrace_request() already do everything we need? ... Is this fixing an endian problem? If so, can we document it as such. Do we already have the same bug for aarch32 compat? Thanks, James