Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2126435ybm; Sun, 31 May 2020 09:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWLS40tnW1EropDBe/P3trVELtwh+IA5nW3c8vBEosHaLlat7oqlng/W//M6m+JPsgIFxd X-Received: by 2002:aa7:dad6:: with SMTP id x22mr16274196eds.265.1590942222934; Sun, 31 May 2020 09:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590942222; cv=none; d=google.com; s=arc-20160816; b=RfF5pwFeTV8CHb6qMUlP9ZhVeCgtYisl9ExUY/oYnycIjCB3IjVZln7v9+F4zdLcrj bzTX0uO02r2dxyeeVIZPgj8jfbM6g9Rlv8woh6bglpy9oj3k/V2h7UJaRf57cS3ThpIN xFISrGVns96jbIJ0/fQxkNJ8/mNaTM9vF8A/5c5h/5K3l09KPELEzTHLTomRV5hdSAce cGC/0LV3GTZSx7dKrQ07MTGA3cUkjfDeyCspkb9caf6ywhtpFjHH172+kfdZrAlCsD/f D26QWHRhlqf/xt6c38+S/iYZztLiid3PGG8B+lAEOnTgrhb6HRhbXVJuZkgBp7M3KdCh d1dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PsvCGiYLLjaAspJB0Irl4XXJZpB4TLmB11Af7nODiZ4=; b=Y/oONW1N4Er+LhFV8N61KO97/4neqtrA/tmUP/S7LREHiALNd4rezdMtptsLMIkENR 7hMD8MADEAFfzbI3UzP7lmum6eEjU4JtDcvnnD+X1u9YqnkP4gOWunVlSJRZoZ/a7s7W pb8w/jUuSvFD4fMa5RQvgRusjXZ6dRaeH0gZHZ7YqQMAszKQdZMQMzwo9E1XJNo8pD/5 V2OibLZ08dyH3pv/cjL+5BvgeyccX0oqhPel99FeVHqornC8+N4QWc5gPxJYF9V2ft32 8YvKOpGnamvtIH3uFRpn2QBrbyKxgIciP5bYtxpjfMSbGxWF0XovpnFxaJxO9gfv10re tQJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@juliacomputing-com.20150623.gappssmtp.com header.s=20150623 header.b=DZBEz0VQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si9387053ejv.608.2020.05.31.09.23.19; Sun, 31 May 2020 09:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@juliacomputing-com.20150623.gappssmtp.com header.s=20150623 header.b=DZBEz0VQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728102AbgEaQVa (ORCPT + 99 others); Sun, 31 May 2020 12:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgEaQV3 (ORCPT ); Sun, 31 May 2020 12:21:29 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87425C061A0E for ; Sun, 31 May 2020 09:21:28 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id c8so4453120iob.6 for ; Sun, 31 May 2020 09:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PsvCGiYLLjaAspJB0Irl4XXJZpB4TLmB11Af7nODiZ4=; b=DZBEz0VQQYg8+MCuCPbFV+AxKIpnYpT7cQIziNyRP6k47qxPaYqEP/do+GxY9FzsWj OdHG9XF8XGaPSWIH3Y9TSoFK8UK9NcmP3M+138AII1HQtBcUUC80hOJgOjr/OQUle0zw 7RCP57cmKOYzvFyRCGXNQIOXoIPpO9qqn/A6hyDuvuANk+h+PV/LiLhAkvWguduTZpYN uR+LSbgHzgv6cJOVUrafqAUB5pn09n6mUt+baeAvz/NqB4oa/YkCr37AkyW8EsRvTuVZ CVXRTfTNQ1cbZdJo1UjYA+vUaBzi/mkUAHlDQJXV+1alRxAZusjouPK+n1d27N7bKNEj +tvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PsvCGiYLLjaAspJB0Irl4XXJZpB4TLmB11Af7nODiZ4=; b=C0aIiEajIJAnN1qKFz0bOU0GbP2R+eTZB4DpCzN5qfPpPfRJuSrzb0C2F8KgudZ8XS ycOzfMJC1dWVWx9w0VSkkJDB9kBBGDW/EUksNWrOUY7XgP1wctRljfPOTw+/PUkKnrjC dQpopHlpeR+zyB3ZUMKeruQBCPbA1jVEqAejxztMOv6Gw50ZFow9T/yhFarb9wIPZNat ij25c2fLpQaWTyDs1UKCIYeWpZUOS7YJEJi9w+BVHIq7wRWqbSCRTPNIkluBtN0K0ppi JOn3Iyq0Q3D0HvyEO4USO9RyTwR9AME/NchFaN1agMxOJ0HojnM7ZM7mG8dztAobLmm3 LPRg== X-Gm-Message-State: AOAM531O2BiOC2YjEu5TqU+PYiRCB4b2NVOgDDqN7rGHkGuuSWNP2NVn S/gSwBncywUldsT22UEC8zClqwDBu8u10tTAIP2b3A== X-Received: by 2002:a05:6602:1647:: with SMTP id y7mr15517153iow.75.1590942087760; Sun, 31 May 2020 09:21:27 -0700 (PDT) MIME-Version: 1.0 References: <20200519081551.GA9980@willie-the-truck> <20200520174149.GB27629@willie-the-truck> <20200527095528.GC11111@willie-the-truck> <20200527101929.GT5031@arm.com> In-Reply-To: <20200527101929.GT5031@arm.com> From: Keno Fischer Date: Sun, 31 May 2020 12:20:51 -0400 Message-ID: Subject: Re: arm64: Register modification during syscall entry/exit stop To: Dave Martin Cc: Will Deacon , Catalin Marinas , Kyle Huey , Oleg Nesterov , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. Keno