From owner-dev-commits-src-main@freebsd.org Wed Sep 22 20:19:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CF91671506; Wed, 22 Sep 2021 20:19:34 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HF8lp2Wrfz3HGj; Wed, 22 Sep 2021 20:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 369C31DFFB; Wed, 22 Sep 2021 20:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18MKJYhT085756; Wed, 22 Sep 2021 20:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18MKJYCu085755; Wed, 22 Sep 2021 20:19:34 GMT (envelope-from git) Date: Wed, 22 Sep 2021 20:19:34 GMT Message-Id: <202109222019.18MKJYCu085755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e36d0e86e328 - main - Revert "linux32: add a hack to avoid redefining the type of the savefpu tag" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e36d0e86e3282cde5a12b6a623e6deefaabfd0c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 20:19:34 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e36d0e86e3282cde5a12b6a623e6deefaabfd0c4 commit e36d0e86e3282cde5a12b6a623e6deefaabfd0c4 Author: Konstantin Belousov AuthorDate: 2021-09-22 18:54:39 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-22 20:17:47 +0000 Revert "linux32: add a hack to avoid redefining the type of the savefpu tag" This reverts commit 0f6829488ef32142b9ea1c0806fb5ecfe0872c02. Also it changes the type of md_usr_fpu_save struct mdthread member to void *, which is what uncovered this trouble. Now the save area is untyped, but since it is hidden behind accessors, it is not too significant. Since apparently there are consumers affected outside the tree, this hack is better than one from the reverted revision. PR: 258678 Reported by: cy Reviewed by: cy, kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32060 --- sys/amd64/include/proc.h | 2 +- sys/modules/linux/Makefile | 2 +- sys/x86/include/fpu.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h index 94ac69d31e65..6b0d0e66d0ee 100644 --- a/sys/amd64/include/proc.h +++ b/sys/amd64/include/proc.h @@ -75,7 +75,7 @@ struct mdthread { int md_efirt_dis_pf; /* (k) */ struct pcb md_pcb; vm_offset_t md_stack_base; - struct savefpu *md_usr_fpu_save; + void *md_usr_fpu_save; }; struct mdproc { diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 6c95a548bffb..373ec3dcae91 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -60,7 +60,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" -VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -D__M32_BROKEN_MODULE_HACK__ -m32 +VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -m32 .else VDSOFLAGS=-mregparm=0 .endif diff --git a/sys/x86/include/fpu.h b/sys/x86/include/fpu.h index bb8533d599dd..313a03ea55c9 100644 --- a/sys/x86/include/fpu.h +++ b/sys/x86/include/fpu.h @@ -123,12 +123,10 @@ struct savexmm { } __aligned(16); #ifdef __i386__ -#ifndef __M32_BROKEN_MODULE_HACK__ union savefpu { struct save87 sv_87; struct savexmm sv_xmm; }; -#endif /* __M32_BROKEN_MODULE_HACK__ */ #else /* Floating point context. (amd64 fxsave/fxrstor) */ struct savefpu {