From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B6F6C433E0 for ; Thu, 4 Feb 2021 14:54:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADB9C64DBA for ; Thu, 4 Feb 2021 14:54:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADB9C64DBA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7bSKPTaTXFfXEKNuXD9zfNaNFbV67Q/zcwE0Y0yJh74=; b=J6XgVYnbIAi5re8T6yvnVSr1h jwox12s4O01oYTs6HTaFkUI+yJ4yU1tbJeY5fD4a61l2NL/Mu0aTIm8L7etTcqvm5JyHcK4Jg4Ya7 cSlY93KKM+6FU/AHEH00sUzf8LH+NLKkpyTEuMw0byyIOmwTtl5GOMh0lGg7JblniPrbacVxJW2zW ijQ6TydQ8ZRvqHLyp/KJ166urYBHAwMJ6jk8LUrBq6q8FWjNYrvu6E1P6XXSQSRM7wWC4zPWfxcrF WIxRq4ewM7xckkhbDNnF2Fh+GWAm5YwDza1dhGOsRIKkDPQmgG46gfHE9+FOeAuptHI4aTMrd7kek u6FoTJlzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7g14-0005Ms-2B; Thu, 04 Feb 2021 14:53:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7g11-0005MC-Mo for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 14:53:52 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4BCBD64E42; Thu, 4 Feb 2021 14:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612450430; bh=scY1EUctLlHyJdhffM1YO119Qq4RStdexWZRn3yOoC8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cl6/II/pP7hXlx/qGhE2nU/ur3bHmP4FoN8FWznMJEbivL2vDzrR/1+dJbe9yPtjy JoaJKEVaeldLKq340MjgGU1Qn7wkPMsCEgSy+zTTfF+xuiU3VqOUZlJtxWTZhjoll9 s4A6p807Ze/iZ/SyyXwJatQaokMvwhZFyYEOqO420FWUqI8jr+AZIwIvy2hShuSXjk e5FgjFedltdirbM4T0Y5ZChNuKMCijX/zdks/7zHls3ALivZV8t1EVU2cvfDY1co38 ygLm14xZi/neW7Wd++s/HJPWuXtPWYgMqbBc7cGKpELEPHp5GrILOk5YOmssdEdYYn JH1+37gXVp/1Q== Date: Thu, 4 Feb 2021 14:53:46 +0000 From: Will Deacon To: Andrei Vagin Subject: Re: [PATCH 0/3 v2] arm64/ptrace: allow to get all registers on syscall traps Message-ID: <20210204145345.GC20815@willie-the-truck> References: <20210201194012.524831-1-avagin@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210201194012.524831-1-avagin@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_095351_827523_EC30F547 X-CRM114-Status: GOOD ( 16.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anthony Steinhauser , Catalin Marinas , Oleg Nesterov , linux-kernel@vger.kernel.org, Keno Fischer , linux-api@vger.kernel.org, Dave Martin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrei, On Mon, Feb 01, 2021 at 11:40:09AM -0800, Andrei Vagin wrote: > Right now, ip/r12 for AArch32 and x7 for AArch64 is used to indicate > whether or not the stop has been signalled from syscall entry or syscall > exit. This means that: > > - Any writes by the tracer to this register during the stop are > ignored/discarded. > > - The actual value of the register is not available during the stop, > so the tracer cannot save it and restore it later. > > For applications like the user-mode Linux or gVisor, it is critical to > have access to the full set of registers in any moment. For example, > they need to change values of all registers to emulate rt_sigreturn or > execve and they need to have the full set of registers to build a signal > frame. > > This series introduces the PTRACE_O_ARM64_RAW_REGS option. If it is set, > PTRACE_GETREGSET returns values of all registers, and PTRACE_SETREGSET > allows to change any of them. I haven't had a chance to go through this properly yet, but I spotted a couple of things worth mentioning off the bat: - Please drop all of the compat changes here. The compat layer is intended to be compatible with arch/arm/, so if you want to introduce new ptrace behaviours for 32-bit applications, you need to make the changes there and then update our compat layer accordingly. - When Keno mentioned this before [1,2], he also talked about making orig_x0 available. Since extending the ABI is a giant pain, I think this should be seriously considered. [1] https://lore.kernel.org/r/CABV8kRzkLiVuqxT3+8c1o8m_OuROtXgfowQcrMVnrxu=CiGB=w@mail.gmail.com [2] https://lore.kernel.org/r/CABV8kRzg1BaKdAhqXU3hONhfPAHj6Nbw0wLBC1Lo7PN1UA0CoA@mail.gmail.com Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel