From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 1263E39C09A1 for ; Fri, 20 Aug 2021 16:25:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1263E39C09A1 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-400-92jOOUx3N7Gym4LL2tmtTA-1; Fri, 20 Aug 2021 12:25:43 -0400 X-MC-Unique: 92jOOUx3N7Gym4LL2tmtTA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 394B0100CF6E; Fri, 20 Aug 2021 16:25:42 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.194.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB1D0369A; Fri, 20 Aug 2021 16:25:39 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: Szabolcs Nagy , GNU C Library , Joseph Myers , "Kirill A . Shutemov" , Adhemerval Zanella , Sunil K Pandey Subject: Re: [PATCH v5 1/1] : An API for tagged address References: <20210805131358.300475-1-hjl.tools@gmail.com> <20210805131358.300475-2-hjl.tools@gmail.com> <87bl63giup.fsf@oldenburg.str.redhat.com> <20210812120115.GN20410@arm.com> Date: Fri, 20 Aug 2021 18:25:37 +0200 In-Reply-To: (H. J. Lu's message of "Fri, 20 Aug 2021 09:14:02 -0700") Message-ID: <87r1eoulq6.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 16:25:48 -0000 * H. J. Lu: > On Thu, Aug 12, 2021 at 5:01 AM Szabolcs Nagy wro= te: >> >> The 08/12/2021 10:36, Florian Weimer wrote: >> > * H. J. Lu: >> > > +@deftypefun int set_tagged_address_mask (uintptr_t @var{mask}) >> > > +@standards{GNU, sys/tagged-address.h} >> > > +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} >> > > +Set the mask for address bits used in address translation to @var{m= ask}. >> > > +Only bits set in @var{mask} will be used in address translation. T= he >> > > +return value is @code{0} on success and @code{-1} on failure. This >> > > +function can be called only once before @code{main}. >> > >> > Again the restriction around @code{main} is unclear. If it's =E2=80= =9Cbefore >> > allocating memory=E2=80=9D or =E2=80=9Cbefore starting threads=E2=80= =9D, than we should say >> > that. >> >> it should be at least before thread creation on aarch64. > > Before main is before thread creation and before main is safer > than before thread creation. You can create threads from ELF constructors, and those run before main. (Although this tends to run into deadlocks in our implementation.) Thanks, Florian