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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 DD427C433DF for ; Mon, 1 Jun 2020 09:23:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B358A206A4 for ; Mon, 1 Jun 2020 09:23:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726038AbgFAJXe (ORCPT ); Mon, 1 Jun 2020 05:23:34 -0400 Received: from foss.arm.com ([217.140.110.172]:35422 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgFAJXd (ORCPT ); Mon, 1 Jun 2020 05:23:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 095D01FB; Mon, 1 Jun 2020 02:23:33 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E18B23F305; Mon, 1 Jun 2020 02:23:31 -0700 (PDT) Date: Mon, 1 Jun 2020 10:23:29 +0100 From: Dave Martin To: Keno Fischer Cc: Kyle Huey , Catalin Marinas , Oleg Nesterov , Linux Kernel Mailing List , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: arm64: Register modification during syscall entry/exit stop Message-ID: <20200601092329.GX5031@arm.com> References: <20200519081551.GA9980@willie-the-truck> <20200520174149.GB27629@willie-the-truck> <20200527095528.GC11111@willie-the-truck> <20200527101929.GT5031@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 31, 2020 at 12:20:51PM -0400, Keno Fischer wrote: > > Can't PTRACE_SYSEMU be emulated by using PTRACE_SYSCALL, cancelling the > > syscall at the syscall enter stop, then modifying the regs at the > > syscall exit stop? > > Yes, it can. The idea behind SYSEMU is to be able to save half the > ptrace traps that would require, in theory making the ptracer > a decent amount faster. That said, the x7 issue is orthogonal to > SYSEMU, you'd have the same issues if you used PTRACE_SYSCALL. Right, I just wondered whether there was some deeper difference between the two approaches. Cheers ---Dave