Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp534441ybh; Wed, 15 Jul 2020 08:28:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw96hJ3Yv87XhEruRD7sX2XHdGZUPazeVR1kuJJKRAUcN6Ksn5uRVZcp2MMqeJ25Hg0Aq7d X-Received: by 2002:a17:906:a0c8:: with SMTP id bh8mr10441939ejb.190.1594826881895; Wed, 15 Jul 2020 08:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594826881; cv=none; d=google.com; s=arc-20160816; b=Q6qZ/n8EfM6uPt2QrDIullk5aZ9BPoRHXnK9iDhdmD0AbhGCBedTzxvOHRB6wGm3j1 hmcRLeQeDSVUeZhg9vKHZCFOR+t6Uxc50RvMO1QUjmou6ptYV+BdfRT8k7F1CwISIoH3 wnsOvoZTdvJIcuH80ICyyYMVHThwUpnHN0nROFvwwc3t+fZHw4xikdQXb3XcJmHi3pEk EVgbFfuQ1GY2VTEaV1xQgeAfV0ARjJtr5++9Ioep6bTyCHal2k0G9eQQpk28QO4OJXy/ zwUzQ5F05rN5J55+MRSpANadyNM2Gs27acDFPAU73mnLSgxv8xRaffwQkulwv48dWUc7 PG7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=ixzZEBN0XBAyYhSOviuo0tkp9cwyUFPD/5SBxNhupsc=; b=Uuowzu50Wg1VDqOVztlwH/J9yeMOR8H6mbCKJ6qlxKjF7NxZ2gnuLD+4kh1l3JPH2K lxdiuxnTwKtie4Lgr+V16npG9zM4OEhnE1Xl08BBaTZzKITK1VhGGlao+/mHBT6auf+z SFZwM/nlFmbOfh99NKr8aPwptH356Kl85WCi9sROdx9e6T+Y3PiuRyMfFmIH3WH+IEKK NIUSK/6Z1tozkwVYC7A04rtTNZb7RWX8OINa9NLy5U0dQDKK52ivNh+nhzyQkULB3DoV hNmuWCN7MgqMZg8QiWC6jU39kApYMnwPRNObccNMKr5RmPRkpww6Gpm/Pj6BACyS97Wq YtNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=BNbb8FUQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl25si1275751ejb.731.2020.07.15.08.27.37; Wed, 15 Jul 2020 08: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=@efficios.com header.s=default header.b=BNbb8FUQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbgGOP0h (ORCPT + 99 others); Wed, 15 Jul 2020 11:26:37 -0400 Received: from mail.efficios.com ([167.114.26.124]:41338 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgGOP0g (ORCPT ); Wed, 15 Jul 2020 11:26:36 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 29CAE28294D; Wed, 15 Jul 2020 11:26:35 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id grExVuNJRgRK; Wed, 15 Jul 2020 11:26:34 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id C097328294C; Wed, 15 Jul 2020 11:26:34 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com C097328294C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1594826794; bh=ixzZEBN0XBAyYhSOviuo0tkp9cwyUFPD/5SBxNhupsc=; h=Date:From:To:Message-ID:MIME-Version; b=BNbb8FUQ2MgZ6UOsSMy5Au51v/ciP5PXPhZskRzaG86CQlYP+Nbj3InoGpKW3KaqG xCx7zPb4KWo5axCYCPZLGbAUv++GdwJ0YbYTKjM4CmCuIFJOJAwWBfGcPC1cQS2JRU Ynu+TB9zyoujWk/yliuZUUal4XrbPIMTrx99hmCL18LtZBMobp08xEEQJFWvI+zTo1 leIVGf4h5emkgm3oOqL/9Pw3Wke6QTfF5Xpu+PTZUaM/XP93QdZuMzSQrBp1jCg2Hj Wzqp6QuURNu7YjFoTyaYwwwE+92mEH5r0uyV0TZet/sWgPJIHC2KyIlmMzYaT/5Fxz a0RyecZNnhtjA== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dZoND3EixLPp; Wed, 15 Jul 2020 11:26:34 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id AF5BD28294B; Wed, 15 Jul 2020 11:26:34 -0400 (EDT) Date: Wed, 15 Jul 2020 11:26:34 -0400 (EDT) From: Mathieu Desnoyers To: Florian Weimer Cc: carlos , Peter Zijlstra , linux-kernel , Thomas Gleixner , paulmck , Boqun Feng , "H. Peter Anvin" , Paul Turner , linux-api , Christian Brauner Message-ID: <1506932521.14341.1594826794611.JavaMail.zimbra@efficios.com> In-Reply-To: <87k0z4zuxq.fsf@oldenburg2.str.redhat.com> References: <20200714030348.6214-1-mathieu.desnoyers@efficios.com> <71f08b3a-56f5-0e0f-53b0-cc680f7e8181@redhat.com> <2053637148.14136.1594818777608.JavaMail.zimbra@efficios.com> <87y2nk29rp.fsf@oldenburg2.str.redhat.com> <882700738.14181.1594819884049.JavaMail.zimbra@efficios.com> <87mu4028uk.fsf@oldenburg2.str.redhat.com> <1481331967.14276.1594824846736.JavaMail.zimbra@efficios.com> <87k0z4zuxq.fsf@oldenburg2.str.redhat.com> Subject: Re: [RFC PATCH 2/4] rseq: Allow extending struct rseq MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3955 (ZimbraWebClient - FF78 (Linux)/8.8.15_GA_3953) Thread-Topic: rseq: Allow extending struct rseq Thread-Index: KF0DmHs4TFAoijps0DhfMC1cmdpo+Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jul 15, 2020, at 10:58 AM, Florian Weimer fweimer@redhat.com wrote: > * Mathieu Desnoyers: > >> ----- On Jul 15, 2020, at 9:42 AM, Florian Weimer fweimer@redhat.com wrote: >>> * Mathieu Desnoyers: >>> >> [...] >>>> How would this allow early-rseq-adopter libraries to interact with >>>> glibc ? >>> >>> Under all extension proposals I've seen so far, early adopters are >>> essentially incompatible with glibc rseq registration. I don't think >>> you can have it both ways. >> >> The basic question I'm not sure about is whether we are allowed to increase >> the size and alignement of __rseq_abi from e.g. glibc 2.32 to glibc 2.33. > > With the current mechanism (global TLS data symbol), we can do that > using symbol versioning. That means that we can only do this on a > release boundary, That should not be a problem. > and that it's incompatible with other libraries which > use an interposing unversioned symbol. We have the freedom to define the ABI of this shared __rseq_abi symbol right now. Maybe it's not such a good thing to let early adopters use unversioned __rseq_abi symbols. Let me wrap my head around this scenario then, please let me know if I'm misunderstanding something: 1) glibc 2.32 exposes: __rseq_abi (GLIBC_2.32) with size == 32. __rseq_abi with size == 32 is available as a private symbol within glibc - both symbols alias the same contents. 2) glibc 2.33 exposes: __rseq_abi (GLIBC_2.32) with size == 32. __rseq_abi (GLIBC_2.33) with size == 64. __rseq_abi with size == 64 is available as a private symbol within glibc - the three symbols alias the same contents. Then what happens if we have a program or preloaded library defining __rseq_abi (without version) with size == 32 loaded with a glibc 2.33 ? Or what happens if we have a program or preloaded libary defining __rseq_abi (GLIBC_2.32) with size == 32 loaded with a glibc 2.33 ? I wonder if "GLIBC_*" is the right version namespace for this. Considering that the layout of this structure is defined by the Linux kernel UAPI, maybe we'd want version named as "RSEQ_1.0", "RSEQ_2.0" or something similar. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com