Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp443351ybh; Wed, 15 Jul 2020 06:16:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtd7P7amQyPXtuTBWT3B8nCWZVGvVx6JImaWb56eKV2s4fudeDzXc6uLNlz+s/1hZdUAJf X-Received: by 2002:a17:907:41dc:: with SMTP id og20mr9511039ejb.183.1594818973227; Wed, 15 Jul 2020 06:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594818973; cv=none; d=google.com; s=arc-20160816; b=of45PV5kMNTEfPFe1ud0JsimQPuHYZZuWLZG9mN2Pys+5M7j4GRQaasltjS41usFQV KWDasjnC22S/Riw6Q192ncfByYgEc0k6LMAnT8LhhnvniQMFwYP4+taTYoys/8Biad43 2HDfBnIP8RZNgSPOY0u6Q6TEMTrzJbDKudN88GeFGcPoBrc0es13P9mxAjSxp+sw5tzo 1xGLv/nxCwFrJdkT6v8RiysxdAqg+lQYw8TMIDgYz1g2rourQ5sWw/qNV+TxpOaOMhoJ oMPNLZBqvOilJ9ppQhyN+2UkKBqpX/7f6LVtJPxqFuipbvAiLkbhzUpJYbAtQA33kxEb QtVw== 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=LnCa9Kr94GXO3BET3VyB1xLtyWYGkc9KxiXdaJE05S8=; b=VayynH9vIovyZtQuWND/SWVZq5tH420ERTBwLYO6hgRv4aKZONlLsATIV4UFcIOCiL bvBxHHTG7PT4KC2LKhZ82JZ6tK8H1YPByeg4R06DDqHtinKhFPYTHngm/TzBByEu4CNQ jwVpc5MG14IZkB79GskmUdg1GoFNdKOd8iUTG/z/w/f2GCiqKWdMxJx9O4wtYr200p/X eBYoyJ0M6GeAUfelN97+gTzJh/TITEAXSu+/3PcKcctqqXGZ7pli9Lz+gyz66N2cr18N vhE4Fd3QvT6f4MIZMZHjC4YH1hMJNKmZApqn9g5PRPHAWqNgebDg0uzJAi5MlkXpYspd f3gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b="NgBZLj/6"; 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 r24si1152599edx.94.2020.07.15.06.15.49; Wed, 15 Jul 2020 06:16:13 -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="NgBZLj/6"; 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 S1731423AbgGONNA (ORCPT + 99 others); Wed, 15 Jul 2020 09:13:00 -0400 Received: from mail.efficios.com ([167.114.26.124]:49496 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729900AbgGONM7 (ORCPT ); Wed, 15 Jul 2020 09:12:59 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 1A2F7281847; Wed, 15 Jul 2020 09:12:58 -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 napCJTeg1Q0z; Wed, 15 Jul 2020 09:12:57 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id BF7F2281846; Wed, 15 Jul 2020 09:12:57 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com BF7F2281846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1594818777; bh=LnCa9Kr94GXO3BET3VyB1xLtyWYGkc9KxiXdaJE05S8=; h=Date:From:To:Message-ID:MIME-Version; b=NgBZLj/63aQIAwjTDb+VnNQiIIxdZ0tvxQ1V+FQPvTiuJN887zN8gLsrCxOJaCN3K MZSlB+MiHiGRpLj4qNJhA6GrPpqqWVvsfz1pjxOkzlDP8GOBlorOB85cKVg7tQwV0j /BcFJQROTOndn36iSyfDM7kzLICqitQoa3PJntsLOyOgoF7D+rVJ0GwLCKqL+JKN9j gWj4CqeiXF9R7xqarNOJRwBNB0eI28vl6dWYjBmvYycfipMb8eI4zM7MEmN3WHBntf wu1c8YMAInZGg0CaihtAxDPdM95cRXe26X7Ayv2siPKZSQQJpblgrxYSyx1z72bCYj qvT4pIhqI6FcQ== 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 JF1Uh8Y6dtqf; Wed, 15 Jul 2020 09:12:57 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id AED50281B17; Wed, 15 Jul 2020 09:12:57 -0400 (EDT) Date: Wed, 15 Jul 2020 09:12:57 -0400 (EDT) From: Mathieu Desnoyers To: carlos Cc: Florian Weimer , Peter Zijlstra , linux-kernel , Thomas Gleixner , paulmck , Boqun Feng , "H. Peter Anvin" , Paul Turner , linux-api , Christian Brauner Message-ID: <2053637148.14136.1594818777608.JavaMail.zimbra@efficios.com> In-Reply-To: <71f08b3a-56f5-0e0f-53b0-cc680f7e8181@redhat.com> References: <20200714030348.6214-1-mathieu.desnoyers@efficios.com> <20200714030348.6214-3-mathieu.desnoyers@efficios.com> <87mu42bepq.fsf@oldenburg2.str.redhat.com> <131549905.11442.1594731035989.JavaMail.zimbra@efficios.com> <87a7028d5u.fsf@oldenburg2.str.redhat.com> <2452161.11491.1594732791558.JavaMail.zimbra@efficios.com> <71f08b3a-56f5-0e0f-53b0-cc680f7e8181@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: 1MYp5kfIfB2JXymSbY4v1NcGryrEAQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jul 14, 2020, at 5:30 PM, carlos carlos@redhat.com wrote: > On 7/14/20 9:19 AM, Mathieu Desnoyers wrote: >> Is there an arch-agnostic way to get the thread pointer from user-space code ? >> That >> would be needed by all rseq critical section implementations. > > Yes, and no. We have void *__builtin_thread_pointer (void), but > few architectures implement the builtin so we'd have to go through > a round of compiler updates and backports. All targets know how to > access the thread pointer because the compiler has to generate > IE-mode accesses to the TLS variables. Practically speaking, I suspect this would mean postponing availability of rseq for widely deployed applications for a few more years ? I can very well see end users upgrading their kernel and using an early-adoption library to use rseq today, but requiring to upgrade the entire toolchain will likely postpone adoption to many years from now. It would be good to start getting feedback from rseq users so we can progress on the system call feature development. Unfortunately everything has been in a stand-still for the past years due to lack of rseq registration coordination in user-space. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com