Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6757488rwb; Wed, 10 Aug 2022 00:03:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR49e3C8Tsebsb3TTONbiLwJmHYiydjeiehowvEUdlXRmQA+iOBSdTNbk0RCItk76ZdlR8mC X-Received: by 2002:a05:6402:f0e:b0:43d:61d6:bff9 with SMTP id i14-20020a0564020f0e00b0043d61d6bff9mr24599229eda.78.1660114987453; Wed, 10 Aug 2022 00:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660114987; cv=none; d=google.com; s=arc-20160816; b=zYV0kbvn5wdbQqA3PXnRRh4rs0o+Nx3t+rkFInGvQEpT8bpgt3AxTGFnkdicP0MOh/ AUGgyDJ8X+vdhSAr5oOqhX8YXil+IdLvuxplM/YqgnzzlA1wTi8AFYhLC96Uqfm32ZCd Y6k8fQwtbJH2lhrt/EjBfroEkr8yawJmUWXr/APrBkDkNxoRy8Q4t1+Kc7VVe0zZziSj LVjooh8FYTi2O+dsXzCArK6n675gRjLV7cxOqys+ArhY3g/mDo5s+iGC0BNCVJTCmmJt j4J2KVY5tKXosvfUZjjrUOr+5H2MfTC4MfHGMpJY+eWRN+e9iNEPcIjmaGgpDY9IMVIP MK2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=8IIzlB4jensj1oGktEeyGAu5ttHJ4e1db9NKIaRaDkY=; b=puZM8IEDuWmkO/Ts/nuhv0w4x7W+Anj3UBEccHa0afgPWUgzhrs6S6yQ7POe4/mZO8 wtXCq4oM/plD05a+XDB45frqh1+MC7a49m1eG7OBIbgvighgxcnPQJ4NKfA5iWKnyVFE fU4CQjJhR+Lm6hr+ILaT50h+Zijq71L3PyZPglqk8PlE0u+tY09ZR1hB9Pbs00T1HxT8 Y0KJlsr/eyl9UCSGNRVvRUdLkUprvE62mOun17OlZX8TLQ8buMa0hzuGAUP1mAhRFTZm FXQUuK+UsGZx4ohLXT8I2/1vCQh/ndYQ8I1K/177dj5sN/k/XqOnNq+Doa4tM7gdrjJE h+hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NVJUWg0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb6-20020a170907960600b00730cb7812besi4875302ejc.175.2022.08.10.00.02.41; Wed, 10 Aug 2022 00:03:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NVJUWg0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbiHJGeL (ORCPT + 99 others); Wed, 10 Aug 2022 02:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231378AbiHJGeJ (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 34FC46E2D2 for ; Tue, 9 Aug 2022 23:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660113248; 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=NVJUWg0KqNnI/yRxes7RWL21R7bs+tXjjUSniyzLvTT7FWMuEU2v89D5jKapWoLpxAkpaI TAqilS/hmhozXSgtptJxpIXPYGzTBazdaB0Czi0Tz01+eoD1HyH7NWpl0pBRzdH61bR4t0 sRxF7ghlznz39Z3fwDsSpp9m+PYxhs4= 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 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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