Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp329613ybg; Mon, 1 Jun 2020 02:28:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4mrg1T3tK6/GnjT55V5TFkTGDF3CqEunSyxxXvRullPjF/TPJZX+ytrKeajvBPgCZ0B5D X-Received: by 2002:a05:6402:31bb:: with SMTP id dj27mr9371985edb.156.1591003681228; Mon, 01 Jun 2020 02:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591003681; cv=none; d=google.com; s=arc-20160816; b=qEZCPThwkl41ppAb+0GxN5QIMx+33of73NjnIS1/cJsphCduzKAXmKBB6XMLsSEasn rHe1EMpJwCyQElBchZ7TW+c5Rbk8zLUioV1W3ZxD7Y/9l1OzW7Kf+7xlbSlaGkCI4CqX bgDRlYSYUVEoMfhsWThsfvT5/wE9Jw5lhA7cMYWAxgJs1R9lxjwfe3RXM4+5oq+bdo/M Owz8TAIg5GdrVW8zbJ6ywpeRkFVww4r0a6RAEq91IJHv9gQCCfaCzOns0D5bYu+iRHp8 +qL6/K3CPCc8LjIUcEqwAKF4kTxHZo5lNLuRQ/upykkQUhG6UhqmNF3StcqnqRE7n7zV sjaw== 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=zqbM69/6RW5Btr+W+KHpVhDzS+R37L39EP+X3OHdumA=; b=GmvvNjDcn9h9j1LLrmQlAKZOBwdRXAA/DtZkjqAAR8fcsXggVI/5STnk//W8Cjb5tO M0BCvpPGPsLrL4vAJyUcojaOR/Tge1e3e2TSxW2VWmD2GUIrj6jaoMH3kObdzYAfcMvG Sbi9h3wq2mdwlL05UI93YY+AWDHakSs6ZKuXW08ohj2Za+TLu0DUYxEV/RgeXAYTNbYQ 7P0Eglse4lLax7t8kceAKS+TJRiFEU+E0mE46eaTldbt1LpDeFZidweQ0QM6iyj0hZoK EToMjKrAE8Warv8oujOA4l7YFlOhu7fE+w0LgtXBdfMWQxb/xClzSBx97Nbr1SXxN+kq mwUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@juliacomputing-com.20150623.gappssmtp.com header.s=20150623 header.b=WiZjnsTn; 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 lh18si5690260ejb.487.2020.06.01.02.27.38; Mon, 01 Jun 2020 02:28:01 -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=WiZjnsTn; 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 S1726151AbgFAJXk (ORCPT + 99 others); Mon, 1 Jun 2020 05:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgFAJXi (ORCPT ); Mon, 1 Jun 2020 05:23:38 -0400 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F96C061A0E for ; Mon, 1 Jun 2020 02:23:37 -0700 (PDT) Received: by mail-il1-x12e.google.com with SMTP id a14so8749622ilk.2 for ; Mon, 01 Jun 2020 02:23:37 -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=zqbM69/6RW5Btr+W+KHpVhDzS+R37L39EP+X3OHdumA=; b=WiZjnsTn7t6HATVqWNwzrCyf5T8xkwd5HR2j4Vvo5xu7w7JgxRYRSp3N+/3ZQSnoOb G9J2tzfRzki+NXd/XEXaSwFPmIQjAQJJwCaCdEfYlyM2w9N2XBtKo8Rk93FyrWCtAyw5 v5q8CNwHVBzDU33yYausjqJpHWIr64asf8+CGUYhILKyPE+W6rW44HXy1MYFVCUpCicA fi7D19giO5H/WMBwqp57oXR0Wgm3MeQuFbuORUi97EMIZ7sIMgf+iiKMfSScH+rSiCI0 mX2x6df2Ucdyv6UajdPE0/ybpMpfkTVgloVKE1pe9dVQeVSWYsyIi+PlHsLyckT41XYy fIUA== 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=zqbM69/6RW5Btr+W+KHpVhDzS+R37L39EP+X3OHdumA=; b=cQ9NK9tmnByZsktNOHFQ5xnWzzHKTSWT9BTmMM+G2c0tU1VjqZHQIsDh+SSgkZvuDK urQBtmUDEwsbqFv4GmnKGr5O+Z3hMY68Lll/ItsEmltp2TrBNYRcj07uNtwe+AD7hZoz FNK1Dy8MRkOfKRPMuCTPibGXaRTp/sCQ4t35IB7srH+6xrbKgqEUN1Xp9Nit9Rdf46No 9uMljJQziBU7Uk4EWkUB0u9VLJKMzlDFZP+5ArlFZ2VFKLExfC57J43dcx4NR/EwmoWg huAtd6SrMiNlsPJeFpkmV5LIDEYhwQIh98ygbLatFuoWY2gAcBOx3K5p+FZqAK4abCMh 89pg== X-Gm-Message-State: AOAM531uTsOEtF/Ph2CQsSAd/veX0/yu4b2vSR5ULy6Hjr5jp4msR5KO +xwsn2XxcvzLVKpBinmtOa9vWh73qlBog6DD2mYdIA== X-Received: by 2002:a92:d3c2:: with SMTP id c2mr5456378ilh.181.1591003416905; Mon, 01 Jun 2020 02:23:36 -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> <20200531093320.GA30204@willie-the-truck> <20200601091441.GW5031@arm.com> In-Reply-To: <20200601091441.GW5031@arm.com> From: Keno Fischer Date: Mon, 1 Jun 2020 05:23:01 -0400 Message-ID: Subject: Re: arm64: Register modification during syscall entry/exit stop To: Dave Martin Cc: Will Deacon , Kyle Huey , Catalin Marinas , Linux Kernel Mailing List , Oleg Nesterov , linux-arm-kernel@lists.infradead.org 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 On Mon, Jun 1, 2020 at 5:14 AM Dave Martin wrote: > Can you explain why userspace would write a changed value for x7 > but at the same time need that new to be thrown away? The discarding behavior is the primary reason things aren't completely broken at the moment. If it read the wrong x7 value and didn't know about the Aarch64 quirk, it's often just trying to write that same wrong value back during the next stop, so if that's just ignored, that's probably fine in 99% of cases, since the value in the tracee will be undisturbed. I don't think there's a sane way to change the aarch64 NT_PRSTATUS semantics without just completely removing the x7 behavior, but of course people may be relying on that (I think somebody said upthread that strace does?) Keno