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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62BE1C00140 for ; Wed, 10 Aug 2022 06:34:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbiHJGeK (ORCPT ); Wed, 10 Aug 2022 02:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231376AbiHJGeJ (ORCPT ); Wed, 10 Aug 2022 02:34:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AED136E2D0 for ; Tue, 9 Aug 2022 23:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660113246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8IIzlB4jensj1oGktEeyGAu5ttHJ4e1db9NKIaRaDkY=; b=cUX2KHAkVxYbseUt7CWCpUWQSSvYpg6e77OOTSRA/immqAOI+JhZWV3BzWBGRskvGGAIrI smttbt7dfZ1hYi2JOTJq8BODAVxFgZa1qms8UsupmvhgidwX+4Vhspq4Zte16RUsJBTxRR 7/ykB/migBcp3BsUxQDcosww/rKvlg4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-271-ynl2zvoXMO6j_n5de7QVDA-1; Wed, 10 Aug 2022 02:34:03 -0400 X-MC-Unique: ynl2zvoXMO6j_n5de7QVDA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0BB485A597; Wed, 10 Aug 2022 06:34:02 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D120DC15BA1; Wed, 10 Aug 2022 06:33:59 +0000 (UTC) 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 , David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov Subject: Re: [PATCH v3 02/23] rseq: Introduce extensible rseq ABI References: <20220729190225.12726-1-mathieu.desnoyers@efficios.com> <20220729190225.12726-3-mathieu.desnoyers@efficios.com> Date: Wed, 10 Aug 2022 08:33:58 +0200 In-Reply-To: <20220729190225.12726-3-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers's message of "Fri, 29 Jul 2022 15:02:04 -0400") Message-ID: <8735e4hajt.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org * Mathieu Desnoyers: > Introduce the extensible rseq ABI, where the feature size supported by > the kernel and the required alignment are communicated to user-space > through ELF auxiliary vectors. > > This allows user-space to call rseq registration with a rseq_len of > either 32 bytes for the original struct rseq size (which includes > padding), or larger. > > If rseq_len is larger than 32 bytes, then it must be large enough to > contain the feature size communicated to user-space through ELF > auxiliary vectors. I don't think this works with the glibc extension mechanism because __rseq_size does not change until the padding is exhausted. I think you'll need to add the suggested flags to the auxiliary vector, and then we can use that during registration and also communicate these flags via __rseq_flags. Size and alignment can be stored in a single auxiliary vector entry. Thanks, Florian