From nobody Thu Dec 9 21:49:05 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97ACB18D7EEB; Thu, 9 Dec 2021 21:49:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J97372Sn9z3h45; Thu, 9 Dec 2021 21:49:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id CC5ADBD14; Thu, 9 Dec 2021 21:49:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <9f3177fd-0270-9021-906d-44954558e23b@FreeBSD.org> Date: Thu, 9 Dec 2021 13:49:05 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: git: 8bcdb144ebe3 - main - TLS: Use for libc and rtld. Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202112092123.1B9LNkK8047121@gitrepo.freebsd.org> In-Reply-To: <202112092123.1B9LNkK8047121@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639086547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t8rYjK0ShiE6dTl7PT2a1LZ2ePbeLJGXa8qyvW9BuZI=; b=wvTDlskablXtZVbGQ9wpFZ6z4589yv1SV5yaENnIjaStJ386LiIdKATeQfuw1PFb1E57Jg BWEFObuGa0zW2hcypgMSdMurdWZwVIZOhr+b6KJAPcbzzlWqIH+FhRKSVTNVZbNQGBr79u iEDEXux5l2LFBpDhE6mNh/pE4yAt/gZr5meSqtzHY2H5ysBSz/maqNA6yLZ1MxCuQRNBZ6 1zXXpuBAAkafJhGIX5dSFqXTt5ZqqacAe0wqLAosPIdCX2r6seXE2KclKJVGa7Yf69FgRD hdXlRNNNkQc+T/bQtxXC7HCDq6mdpx/jzK+U+qYnXshSkue3/2xr8+xG8a5XXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639086547; a=rsa-sha256; cv=none; b=QGD2ALxVdj1QRnJXioukr43wELPNWzd3+bDh/6vI0D+dGIjgYQfQucy1cWgoVMFCG8RLKa mcyGUwkx6rubizf7ruOTPl+QgB8Jne+hqLi3ai5dvHPRO/t0XCpydMFSth1aSDu80GbJ53 bFh6GoVxUrzW/M0USrl3oNXeIBKyq2Ez2KEkgWMeMJ7yu/fUl2ORFCLRCc2B8TihmaJVdJ 5W7naT3dP7+kpQWXtW2eXX04lvDBidHWUGoaSeDkCaORwwDWuL2pA2+qaLvIQ44k1dTxKs oOsldWBa1iaET1mwXgrdlSI4msSK7ceYzQ30S4+BuNbeHCP74JYzPTLP3DIw5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 12/9/21 1:23 PM, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8bcdb144ebe391ce243c71caf06cf417d96ce335 > > commit 8bcdb144ebe391ce243c71caf06cf417d96ce335 > Author: John Baldwin > AuthorDate: 2021-12-09 21:17:54 +0000 > Commit: John Baldwin > CommitDate: 2021-12-09 21:23:05 +0000 > > TLS: Use for libc and rtld. > > - Include in MD rtld_machdep.h headers. > > - Remove local definitions of TLS_* constants from rtld_machdep.h > headers and libc using the values from instead. > > - Use _tcb_set() instead of inlined versions in MD > allocate_initial_tls() routines in rtld. The one exception is amd64 > whose _tcb_set() invokes the amd64_set_fsbase ifunc. rtld cannot > use ifuncs, so amd64 inlines the logic to optionally write to fsbase > directly. > > - Use _tcb_set() instead of _set_tp() in libc. > > - Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc. > This permits removing _get_tp.c from rtld. > > - Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD > allocate_initial_tls() routines in rtld. > > Reviewed by: kib, jrtc27 (earlier version) > Differential Revision: https://reviews.freebsd.org/D33353 I should have noted that all of the changes in this series were runtime tested on amd64, armv7, aarch64, i386, and riscv. The changes were build-tested (make tinderbox) on mips and powerpc. -- John Baldwin