From nobody Wed Jul 03 16:14:59 2024 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 4WDlH81KdZz5PfCd; Wed, 03 Jul 2024 16:15:00 +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 4WDlH76Z7jz4Bfm; Wed, 3 Jul 2024 16:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023299; 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=/ac5Npg96yq5Ga+Qutirabfb1fgs6NuxSGSaSkYazl0=; b=Ryf5XnmwfswmHzN4GPUWDQ2ZmejuhfbF+BkVz9PX0X2pfdlnq1ZgReJOiMheRP5QrtzLBm ceYcATEMiuU09Quu5WhfEHmiGTQYUQoRxxr0rytgn3O0K7ObJ7ASjbaNJiRw/KZ0LI6+pf 5XQCBntu6AN9NGvM9B5GgbGMTUe8GsGBhcFFQp7p91oD5cksYqDES/xuBo2dAeYT+Uxhs/ y0kegXdTpxKKQIsZUNHJ5vaBOwwrjb+F9dziBuwerrhI6Za5fSiVKamK/hXqU1h4V5HeZW tALL9STN4WkuZvu6wPVc4b9AkNWFwFrYBskFbdMKBAdF39Pp7ybGMQyVE16+Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023299; a=rsa-sha256; cv=none; b=RoCOLar3FGVf+gVlASfLvAiBwSTeILBQiAaNq93rLp6tV0RNZy+VozJRDGhUd2UTX8it28 UmkcjPk7ct1v/K27QWwizKfuLJBfrPKihf3oscKqBUBDITSNlWSFvnkJRcoDELh9mqMEd4 kDUJPp+Nqj2yymkrdyTCgijtKmVvohmY0QY5QJpwR56+wsajMdbk0gtxZDtDTP4YUiD9d0 OOmwCF87NSYFWwmef7N0Ns/uxw2aQ5iUFdH+Ycs9ArlkYhWlOVr5M6rUCJY3flZBOKvlZR xQ/D9xVbqQnz5TYDWtuHnvyeOX4eJ1cyZHhyqZS1uSbBH9CSnvoaSNvImLZ7vQ== 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=1720023299; 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=/ac5Npg96yq5Ga+Qutirabfb1fgs6NuxSGSaSkYazl0=; b=sEBALle8pqXPwKDh4UxErrPK2un2srq0xxWhQEvt7FBVuw5dZLpNCJNlAAdDlGSbsPGCY0 OeAqbXeehS3NfxX2V64qFi1lfPwwwYSwOeVSfJcc/ijHuYDKJcZyGgfg9mW0VHStJD9bt4 XmnA1owQ0OOVwy6OL13cRcngo45tLkOIgdyRy4fpDI8ou6uB1ZnwuZDtaF4ffJYnoaUt/m D81MZzIjXlbbb34nhTFzvsy6n5lJmuvoQQAkQeEsl8Xramk3jym38xmh5KzmJbsWWhlJZL kqHPXE0nkWQ3Nw3WgORmO+vIgz1w34/ouX5VQ+v9Q8vKgTZqHL0fBCYdbq/KtQ== 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 4WDlH76BFMzf2v; Wed, 3 Jul 2024 16:14:59 +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 463GExWd041669; Wed, 3 Jul 2024 16:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GExw5041666; Wed, 3 Jul 2024 16:14:59 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:14:59 GMT Message-Id: <202407031614.463GExw5041666@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: 7b1c770341fe - main - libthr _get_curthread i386: quiet gcc -Warray-bounds 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 7b1c770341fe96236772ce3d475e14988833a988 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=7b1c770341fe96236772ce3d475e14988833a988 commit 7b1c770341fe96236772ce3d475e14988833a988 Author: Ryan Libby AuthorDate: 2024-07-03 15:37:44 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:37:44 +0000 libthr _get_curthread i386: 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 gs segment. Otherwise gcc complains if we tell it we are reading memory offset 0x8. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45829 --- lib/libthr/arch/i386/include/pthread_md.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h index 021ce8126909..9008a4f11bdb 100644 --- a/lib/libthr/arch/i386/include/pthread_md.h +++ b/lib/libthr/arch/i386/include/pthread_md.h @@ -47,8 +47,8 @@ _get_curthread(void) { struct pthread *thr; - __asm __volatile("movl %%gs:%1, %0" : "=r" (thr) - : "m" (*(volatile u_int *)offsetof(struct tcb, tcb_thread))); + __asm __volatile("movl %%gs:%c1, %0" : "=r" (thr) + : "i" (offsetof(struct tcb, tcb_thread))); return (thr); }