Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13696060rwl; Wed, 4 Jan 2023 11:40:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXv1CPZtar86RBo3vEdtXXFCGpXNakOuVwExcGu5XHelzpWRAawkMMd05O3LwB4PINQ2UHmq X-Received: by 2002:a17:907:93c5:b0:7c0:f118:624b with SMTP id cp5-20020a17090793c500b007c0f118624bmr38891530ejc.44.1672861238645; Wed, 04 Jan 2023 11:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672861238; cv=none; d=google.com; s=arc-20160816; b=ZbhSHRgKpKPjQTpQBCo/sWVCrssYnMzdMsEG/OGto9L+Y0LsiWiy7mj1yjjzK6nLBz K4odu1N5f0IR6upkJ1+yS+YPJs2jdynE8+RBt1ApeNH1+olovmeNc7QjsFHuhJ1bqX9y 4vtKME9oGlxhyo/E2O31+WpgGDkF9hUbTn+fmHT/qQ6kuN/sejexLTK+iK/TtQ8E7Eip iw+peyXLd5PukFhFCenn6uVE06r0X0FWpLi/kGtkMLx8aAS5JIO+srhy7lAKXLCf95CT PQ6973EXU89GhFZl8ml2/NznE2qiylHtbndzdNNjwKRpavvea9GIystFV9psTPUw3HZE mJIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=ClqlXsnR07a5/q5B6k7JcPBwgOk23Tr0+xLWB8TwUf4=; b=zbHaPt1gX/L1M7xJHW0esJBLeLAt6gAGx5bFi0zIMSlB2PqzWuIRznuWHPUXNOj9IB nIwYLjLr66napcw6Pld7oOhVRWxSp0NGJQnqgkE9RF7jr0Xr7g2KMwGyeRHCf9OoWpU9 Ju9iMrgmvtqRYkQBcH3S0h/6hnyrLhMOrzLQoRAAwPuz+5qOfxTFuBMRd13FF9vvvpGP arWlA+niHRDXKwi/7/F3KISZm+IHXgBT9LqnfSOm4exvve6A+3NaUbjuAANTN+909L35 p09W8gBNPVwD5KzqH5CikHTvsB1MtAGuOLiTusWAkPwvZUtPXLeeDscF27+T6I6e5t7M fobA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di10-20020a170906730a00b007ae1874c142si31294271ejc.446.2023.01.04.11.40.25; Wed, 04 Jan 2023 11:40:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239830AbjADTUd (ORCPT + 56 others); Wed, 4 Jan 2023 14:20:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239824AbjADTUa (ORCPT ); Wed, 4 Jan 2023 14:20:30 -0500 X-Greylist: delayed 336 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 04 Jan 2023 11:20:28 PST Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD9301C41E; Wed, 4 Jan 2023 11:20:28 -0800 (PST) Received: from [172.17.203.2] (port=49315 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 1pD9Dn-007RCJ-8t; Wed, 04 Jan 2023 19:14:43 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.94.2) (envelope-from ) id 1pD9Dm-000OQS-RT; Wed, 04 Jan 2023 20:14:42 +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 , David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov , Alexander Mikhalitsyn , Chris Kennelly Subject: Re: [PATCH 05/30] selftests/rseq: Use ELF auxiliary vector for extensible rseq References: <20221122203932.231377-1-mathieu.desnoyers@efficios.com> <20221122203932.231377-6-mathieu.desnoyers@efficios.com> Date: Wed, 04 Jan 2023 20:14:42 +0100 In-Reply-To: <20221122203932.231377-6-mathieu.desnoyers@efficios.com> (Mathieu Desnoyers's message of "Tue, 22 Nov 2022 15:39:07 -0500") Message-ID: <87a62yun6l.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: > +static > +unsigned int get_rseq_feature_size(void) > +{ > + unsigned long auxv_rseq_feature_size, auxv_rseq_align; > + > + auxv_rseq_align = getauxval(AT_RSEQ_ALIGN); > + assert(!auxv_rseq_align || auxv_rseq_align <= RSEQ_THREAD_AREA_ALLOC_SIZE); > + > + auxv_rseq_feature_size = getauxval(AT_RSEQ_FEATURE_SIZE); > + assert(!auxv_rseq_feature_size || auxv_rseq_feature_size <= RSEQ_THREAD_AREA_ALLOC_SIZE); > + if (auxv_rseq_feature_size) > + return auxv_rseq_feature_size; > + else > + return ORIG_RSEQ_FEATURE_SIZE; > +} Do you intend to use the auxiliary vector as the userspace handshake for glibc-managed rseq, too? I don't think it works if the kernel overtakes glibc. Or is there some other approach shown in the series that I missed? Maybe we should just skip the existing padding and use it only for some vaguely kernel-internal purpose (say through a vDSO helper), so that it is less of an issue how to communicate the presence of these fields to userspace.