From nobody Sun Dec 24 13:20:02 2023 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 4SyhTt2fqFz54cCw; Sun, 24 Dec 2023 13:20:02 +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 4SyhTt295hz3cFR; Sun, 24 Dec 2023 13:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703424002; 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=fIYfL2C4nnjYh2teOgFmrqjOOWRnViaBZbZa8G6L4dw=; b=rUeovFKRHc/xHV2xxaCojCHjf8WkYn6GBsvPrCHAIPMQ8fwJq2vvikz5NsViaouGnjdi4/ 7ocK+R3P3TgfWEZ0NjP5Jx49ZvJtFxF8FsQLuBtoI3lwwobrKqiCQZV5mrRdE+birqg57E Y15e5mIno3qcbxjb2JxI45Y3mq6K0/TC7RR/v58zp5MEaYLGFELTem2c9+U0VEEs4PgNwr IEsTlo9eWJ5ewEXikZowfhXcw+TyAwhCOGN4NCb6B6/tg7dbEBisKn2ff1W0RdzmCvq8+5 hdyvA1k4+fKc5ZN8oHPrsJA9RRpBwVMtYq53WRT2rCqTJc/AzMFwanmwQrI2/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703424002; a=rsa-sha256; cv=none; b=wHQhvyEMtQ7CKbxhHZcwnalnnAXqOd8BKBbFZ6wNMh1hdB1RD9EdB7c3nlscreHrcjUcOO HbhQetx1ATmI0gxLl7smBZK4Nu6QviCuRk3xDk1YyDln+MaxlUyEvp5ArCHZC8VxqN7WaV F2JSh27Y+LPo/Nsve2K1URmyq72DXhQtwSiuvVx5gj6TSCU0VAQAIKhYAemApND+7AR87W rnBunXTRYDKwGXr09qjYEy0YZsei5udKG79Ak3XDuNlacjIaFoJNTmSaRjOzrM9DI5USFd bQIJWfU4L3ErC/BJ2gsUGMruWgAI7syrVIJWKavpaBhSv4Tike/e4b0sU+K8Qg== 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=1703424002; 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=fIYfL2C4nnjYh2teOgFmrqjOOWRnViaBZbZa8G6L4dw=; b=k8DmrhKsC4NmmVlPzJawhuGNozsyTdJpNiZIdinBeZhe51cOHlRCj4GFIyAU9sTygNjiv0 ZuIEKEdA9OWFcVN8JQ8eQRG2CLOgaFHEdqs55fpVXA6+oVX56vGiNg7u2cKuJYnnFHEWPh uPNAfilpjdQl4EOM+UoIKYhEMHM+HCecP0BTJgU7BHZRE4F11RNFlt/1k9o0LLKRtQd4h0 iCJ7Cu/iJPPkWXWpbvu88g8mMjBLTHrD+JeJcUE24K5e9ySOMnZULOgm9jBGQpWfJvntVc 3O5wvxqzjDdZd3OH4R+lnEl7ZC1ZreDkeS1fo/peKOE01MLd34v/XTjq8RRj8w== 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 4SyhTt0ycTzVC0; Sun, 24 Dec 2023 13:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BODK2CO076073; Sun, 24 Dec 2023 13:20:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BODK2DA076069; Sun, 24 Dec 2023 13:20:02 GMT (envelope-from git) Date: Sun, 24 Dec 2023 13:20:02 GMT Message-Id: <202312241320.3BODK2DA076069@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: b4efc6277634 - main - LinuxKPI: Do not use explicit context in FPU sections on powerpc64 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4efc62776344a9aaada5a0866e453e528a0e977 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b4efc62776344a9aaada5a0866e453e528a0e977 commit b4efc62776344a9aaada5a0866e453e528a0e977 Author: Vladimir Kondratyev AuthorDate: 2023-12-24 12:48:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-12-24 12:48:06 +0000 LinuxKPI: Do not use explicit context in FPU sections on powerpc64 It is not supported yet. Sponsored by: Serenity Cyber Security, LLC Fixes: 5a3bd281672b ("LinuxKPI: Add explicit software context to FPU sections") MFC after: 1 week --- sys/compat/linuxkpi/common/include/linux/compat.h | 5 ----- sys/compat/linuxkpi/common/src/linux_current.c | 9 ++++++--- sys/compat/linuxkpi/common/src/linux_fpu.c | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index 7922e884beb1..d357abce732b 100644 --- a/sys/compat/linuxkpi/common/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h @@ -33,11 +33,6 @@ #include #include -#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ - defined(__i386__) || defined(__powerpc64__) -#define LKPI_HAVE_FPU_CTX -#endif - struct domainset; struct thread; struct task_struct; diff --git a/sys/compat/linuxkpi/common/src/linux_current.c b/sys/compat/linuxkpi/common/src/linux_current.c index 668185094cbe..04ad4e30aa54 100644 --- a/sys/compat/linuxkpi/common/src/linux_current.c +++ b/sys/compat/linuxkpi/common/src/linux_current.c @@ -43,7 +43,8 @@ #include #include -#ifdef LKPI_HAVE_FPU_CTX +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) #include #endif @@ -160,7 +161,8 @@ linux_alloc_current(struct thread *td, int flags) int linux_set_fpu_ctx(struct task_struct *task) { -#ifdef LKPI_HAVE_FPU_CTX +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) if (task->fpu_ctx == NULL && curthread->td_critnest == 0) task->fpu_ctx = fpu_kern_alloc_ctx(FPU_KERN_NOWAIT); #endif @@ -190,7 +192,8 @@ void linux_free_current(struct task_struct *ts) { mmput(ts->mm); -#ifdef LKPI_HAVE_FPU_CTX +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) if (ts->fpu_ctx != NULL) fpu_kern_free_ctx(ts->fpu_ctx); #endif diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c index d510bc208b88..ef7f252cdd9e 100644 --- a/sys/compat/linuxkpi/common/src/linux_fpu.c +++ b/sys/compat/linuxkpi/common/src/linux_fpu.c @@ -35,7 +35,8 @@ #include -#ifdef LKPI_HAVE_FPU_CTX +#if defined(__aarch64__) || defined(__arm__) || defined(__amd64__) || \ + defined(__i386__) || defined(__powerpc64__) #include