From nobody Wed Jul 03 16:14:58 2024 X-Original-To: dev-commits-src-all@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 4WDlH72MFMz5PfP5; Wed, 03 Jul 2024 16:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WDlH6535dz4BGS; Wed, 3 Jul 2024 16:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023298; 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; bh=EzpotoaBDaXX/NiPgngm9aaVDcRt+XOz43zLNA33uVs=; b=mfSuyvZoQ3lRXby4Z589QTj3A0i2NqzTA3LcC/CL9XdD7IRokJ3vuHXjkBmYZqFhu9qCBO 2UsajROz9/Jq3BV8btZg3Q8BW0dJtzKvZr5QW1emYrHM5yh6uAEy1ScmKU6Daym3OiDvVt rSfS0+K6r3xePK6d0qY2x0Um11iSx6DSP3g4uh3/Lt3klkn+MrJhQSUgm5ev4hqwLoxkuZ Ruio5o6efaw+o17XNky1B+eDAfPbvlQbv/0DT5TntnJJVzFFAYsH9aK/2WDv+p6/uEYTmU pOIw9W74GxJqsQqz+rJ3KX5xbU4Y3snCSy2NNqw0wKIXlQpw7GA7RsUUgkS37w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023298; a=rsa-sha256; cv=none; b=IA4tVdfA7g9i4TA4AM88FDCbJjCiRgxy9eiF27XDopuhn7zaHLmeGNrEBhOy7s7noFD7JT Rd4QVt8Q7n0eITJLELJenKl1KD/D+d9CzI2ZqE2/B9SoIKH36WtbqDgYSWMxY628yEQqGN tOTSrWSDTPrccMSwlD/SoYs909ISB6H7xWLdzKBbrmdXuINFvit0ncCTrE145TZNYNPgYA lR7VHuwe/9h/tSrEV30phORkcs6++pihxM/mjR/do5H5QAcfdAzkmNfW+D3TZtC1pl1yFh AsKB9TMO/4MRW8AMHCKz4u70DfPciNFl0CsHY3uEg7qapmxhejTc4jzj1mziCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023298; 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; bh=EzpotoaBDaXX/NiPgngm9aaVDcRt+XOz43zLNA33uVs=; b=pdlYKIF7SsYA8mB43DPhZm07s2xEBhDR5pI2MrDJi2NmvO0Mok/MMNKkYbyCrkpirlJsXM VmcREKCN6Eps6kmmHCh6ABZWGx4m2ba54oSPcVUFTAVvDgGnhuIuT0alYhncCqgRiDLI27 RUteefTYXQiSyL7i2vYyR0m+x79sqw3X0n68sfARBQ9BfxwSO1BDPWa/e3PjQE92vF7a6H TgWDKww+MXkQNnW1pk8TA/nS3IcsE9/TI65sFhHJB4WQ5ILUuj3rnMDUxDcSKty7dyaOGb UZqrYn3wDpRDOcGumACsFprbqCl4dQYsaWGSr67e4UcWS1XV90nD/jO1a9O2aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WDlH64Z6KzfCK; Wed, 3 Jul 2024 16:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 463GEwOT041622; Wed, 3 Jul 2024 16:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GEwuc041619; Wed, 3 Jul 2024 16:14:58 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:58 GMT Message-Id: <202407031614.463GEwuc041619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 657b1276ad4c - main - libthr _get_curthread amd64: quiet gcc -Warray-bounds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 commit 657b1276ad4c2d2d92ce9d13b338349c0fa40dc3 Author: Ryan Libby AuthorDate: 2024-07-03 15:37:11 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:37:11 +0000 libthr _get_curthread amd64: quiet gcc -Warray-bounds Use a constant input operand instead of a bogus memory reference to tell the compiler about offsetof(struct tcb, tcb_thread) in the fs segment. Otherwise gcc complains if we tell it we are reading memory offset 0x10. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45828 --- lib/libthr/arch/amd64/include/pthread_md.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h index f43578a8241a..995f35cb569c 100644 --- a/lib/libthr/arch/amd64/include/pthread_md.h +++ b/lib/libthr/arch/amd64/include/pthread_md.h @@ -47,8 +47,8 @@ _get_curthread(void) { struct pthread *thr; - __asm __volatile("movq %%fs:%1, %0" : "=r" (thr) - : "m" (*(volatile u_long *)offsetof(struct tcb, tcb_thread))); + __asm __volatile("movq %%fs:%c1, %0" : "=r" (thr) + : "i" (offsetof(struct tcb, tcb_thread))); return (thr); }