Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28100C433F5 for ; Fri, 7 Jan 2022 19:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232866AbiAGTiR (ORCPT ); Fri, 7 Jan 2022 14:38:17 -0500 Received: from albireo.enyo.de ([37.24.231.21]:42532 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbiAGTiP (ORCPT ); Fri, 7 Jan 2022 14:38:15 -0500 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Fri, 07 Jan 2022 14:38:14 EST Received: from [172.17.203.2] (port=45459 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1n5uxR-000s6r-7X; Fri, 07 Jan 2022 19:31:25 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.94.2) (envelope-from ) id 1n5uxQ-001JbN-SR; Fri, 07 Jan 2022 20:31:24 +0100 From: Florian Weimer To: Mathieu Desnoyers Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Thomas Gleixner , "Paul E . McKenney" , Boqun Feng , "H . Peter Anvin" , Paul Turner , linux-api@vger.kernel.org, Christian Brauner , carlos@redhat.com Subject: Re: [RFC PATCH] rseq: x86: implement abort-at-ip extension References: <20220107170302.8325-1-mathieu.desnoyers@efficios.com> Date: Fri, 07 Jan 2022 20:31:24 +0100 In-Reply-To: <20220107170302.8325-1-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers's message of "Fri, 7 Jan 2022 12:03:02 -0500") Message-ID: <87a6g7ny0j.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mathieu Desnoyers: > Allow rseq critical section abort handlers to optionally figure out at > which instruction pointer the rseq critical section was aborted. > > This allows implementing rseq critical sections containing loops, in > which case the commit side-effect cannot be the last instruction. This > is useful to implement adaptative mutexes aware of preemption in > user-space. (see [1]) Could you write the program counter to the rseq area instead? This would avoid discussing which register to clobber. Thanks, Florian