From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 488E01885A2; Tue, 3 Sep 2024 15:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376499; cv=none; b=SEGtMBrBGHve2oQIZdpDpG3rY2osx0cu/QmwDQg9DSY+LVI1+RJelOC9SDqnhG+GFIrBB6SsI/iRnDkXYSJYRYmlUOfnX78LAWSWy06y47uDayB56AL5ouwXcuitXnIcHX6VIbh3aYYYOpj1EhJSX75V2IkVcWRq3uqx1sBc3EM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376499; c=relaxed/simple; bh=Q+uEKjljLMMbWJRJJ0llywrdLPKoWQ9iKTwHByqxue8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YubepL5W7UQGgh8Hvg/xL7eYQdNJ2aQb1cVEstHKmJtdxw4/Lv58g2ztc/hq+NnKBHOMlLWFES1UZkJ+ItJLpsd3dkvM8Hgo7Cz/8EMi6XRzVtHfvjkAvTEyCoNb5V2InM/cQwT8JE61Gst1XjORxbwG3GlbS3DvlDBqKrqcnwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1C42A1063; Tue, 3 Sep 2024 08:15:24 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BAAB13F66E; Tue, 3 Sep 2024 08:14:54 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 1/9] x86: vdso: Introduce asm/vdso/mman.h Date: Tue, 3 Sep 2024 16:14:29 +0100 Message-Id: <20240903151437.1002990-2-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Introduce asm/vdso/mman.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- arch/x86/include/asm/vdso/mman.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/x86/include/asm/vdso/mman.h diff --git a/arch/x86/include/asm/vdso/mman.h b/arch/x86/include/asm/vdso/m= man.h new file mode 100644 index 000000000000..4c936c9d11ab --- /dev/null +++ b/arch/x86/include/asm/vdso/mman.h @@ -0,0 +1,15 @@ + +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_VDSO_MMAN_H +#define __ASM_VDSO_MMAN_H + +#ifndef __ASSEMBLY__ + +#include + +#define VDSO_MMAP_PROT PROT_READ | PROT_WRITE +#define VDSO_MMAP_FLAGS MAP_DROPPABLE | MAP_ANONYMOUS + +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_VDSO_MMAN_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82CA7188938; Tue, 3 Sep 2024 15:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376502; cv=none; b=MQtMdxeTq6SyLnT7Kc0d61/Y7N/l8QR/aDCJDrz9LBheKehHVn90NVb9IFHsV0vvMy9X+0AUWDxCKfPDUwPqSBsNHlIGDMw5IZAVVlO9O/Gtgo2C5ocEXEN9QMtCT65V3vtGmNjaqZUbivUyrVIP1gD5osGOzMjBUc0tZHDLh4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376502; c=relaxed/simple; bh=bBzISRReGVBxfhmbyVzs2I5ENYJmBXaF4IKTHC+ss/o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=utR4zNTWwr+ZQv5NeWvkhQjhZ12NrXVLrAj4XELJYXcKMFf2XXLy8pfawdgNMmqzqHa0+2+qKJSRLdoH0L7FvY5Nmgd7qd5Unydj48rHQtHpBA3M5piLOcBvgQKHV+sGApteCber2rElzGzHqe+6jm5aWLlRD5ZB035WRLPkGBM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 496971424; Tue, 3 Sep 2024 08:15:27 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8CFF3F66E; Tue, 3 Sep 2024 08:14:57 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 2/9] vdso: Introduce vdso/mman.h Date: Tue, 3 Sep 2024 16:14:30 +0100 Message-Id: <20240903151437.1002990-3-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Introduce vdso/mman.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- include/vdso/mman.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 include/vdso/mman.h diff --git a/include/vdso/mman.h b/include/vdso/mman.h new file mode 100644 index 000000000000..95e3da714c64 --- /dev/null +++ b/include/vdso/mman.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __VDSO_MMAN_H +#define __VDSO_MMAN_H + +#include + +#endif /* __VDSO_MMAN_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7A2022301; Tue, 3 Sep 2024 15:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376506; cv=none; b=qbAYftUqg6740cp/3YlFPvI6JM5mgGJY4ZqDYJzcSzRAZjylL2XQXFbQ5Tt0Jb21wHA2i1/IC7gQVxFkob31+ETgNnZTXH6Du/uz9SNuC4ikfjBE88dXJFcQwIvrMeaOxH8KG5reJzxloMYng1nMOnwygf9+3UYG68PNYXCV1iA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376506; c=relaxed/simple; bh=nsmh4geF98am874ryh9Py797zRx/es9hw+xk/gW4siM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=blP/9U9vahpQpFznYvjljPucMApSazsxXkkgHEqw5ktQU/Tf8IR/ovNIWPgHn5iIzBTs23AZDp8rZXgLx3nJ6UnwaSV4l55ePaKA1Ncis81PWDxymKMIyj6Xmr6mfiOaOzju7znx2TW4jVClNUon0DIugM1nAaYlmJpL5HnBuSI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 805B91474; Tue, 3 Sep 2024 08:15:30 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2218F3F66E; Tue, 3 Sep 2024 08:15:01 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 3/9] x86: vdso: Introduce asm/vdso/page.h Date: Tue, 3 Sep 2024 16:14:31 +0100 Message-Id: <20240903151437.1002990-4-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Introduce asm/vdso/page.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- arch/x86/include/asm/vdso/page.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/x86/include/asm/vdso/page.h diff --git a/arch/x86/include/asm/vdso/page.h b/arch/x86/include/asm/vdso/p= age.h new file mode 100644 index 000000000000..b0af8fbef27c --- /dev/null +++ b/arch/x86/include/asm/vdso/page.h @@ -0,0 +1,15 @@ + +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_VDSO_PAGE_H +#define __ASM_VDSO_PAGE_H + +#ifndef __ASSEMBLY__ + +#include + +#define VDSO_PAGE_MASK PAGE_MASK +#define VDSO_PAGE_SIZE PAGE_SIZE + +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_VDSO_PAGE_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6B261898E6; Tue, 3 Sep 2024 15:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376509; cv=none; b=pL5bHjfVT0UB5A+019KZNF2L7C8WH55MQbEiKttN6JOmvzbXItbWVh0uxM0JSiqEL40QpbLqwi0oS35l7jZfrF7xutbE2hxqxFwTUBjE/E8PZq9Ptaa+2iJ+9E8C4AdnvHZnULjDeBKsmp+7DYzzI+nW8w0Dj995rDGA0pqYuM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376509; c=relaxed/simple; bh=k7lpsuqWWibXoV3RJuYS86+W8S6wzKWBURChHvIVijU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rw2f0q+2Jim95pK1TqvGl4FIV8c03z7HpayKYAlyPvOgOyR2Yv+w2tkF3u8U8baKpNeRm7PChOwRmxKuce0xuz9KntyaMjBY+cBN3fyCW6z/feYPa0xYBIjE4qIuStrl4m9AbMoErUEEUeIUvxvdZ8RUFaY9sVzWNDfxDUUUBAI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A63EEFEC; Tue, 3 Sep 2024 08:15:33 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 504DF3F66E; Tue, 3 Sep 2024 08:15:04 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 4/9] vdso: Introduce vdso/page.h Date: Tue, 3 Sep 2024 16:14:32 +0100 Message-Id: <20240903151437.1002990-5-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Introduce vdso/page.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- include/vdso/page.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 include/vdso/page.h diff --git a/include/vdso/page.h b/include/vdso/page.h new file mode 100644 index 000000000000..f18e304941cb --- /dev/null +++ b/include/vdso/page.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __VDSO_PAGE_H +#define __VDSO_PAGE_H + +#include + +#endif /* __VDSO_PAGE_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1298E188592; Tue, 3 Sep 2024 15:15:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376512; cv=none; b=jBQjw61dNDWfn/7mdQ/pawgVy032R4wUMX+eU6mpwg9Ssm9h0PcbV5VYj4usgVP60PAUsj3Tb6tdEsqOYCNR+yoxnjrYbEb2ku9M+ZhGkfEPRl7Mo2A8YEHt+gSYh6uQgw/xcJOwLJl9inPY5Lq07TQyQDNXSSsL9dg4Cd9rado= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376512; c=relaxed/simple; bh=Xxvmw4fx2BextUfcqa7AgtyaDEXu6xgVDZiwpuwkJBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MgPwl7GhHO1jBmNnxiP/wHj8+ra9/Srh85Nxuc1Jo72CoeDF/VfRijsQ9xN8MyYkFz38Lxv7R0q3IAadKKBe2GhTz4EMKqo8ftA02TvI8oe39lSjv2m1wBV9/iCeds+H73SN0By7FcBYPDnz9QbfJMuTt8lU3GtZWJcEJQeebU0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D484B1063; Tue, 3 Sep 2024 08:15:36 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E6113F66E; Tue, 3 Sep 2024 08:15:07 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 5/9] vdso: Split linux/minmax.h Date: Tue, 3 Sep 2024 16:14:33 +0100 Message-Id: <20240903151437.1002990-6-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Split linux/minmax.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- include/linux/minmax.h | 28 +--------------------------- include/vdso/minmax.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 include/vdso/minmax.h diff --git a/include/linux/minmax.h b/include/linux/minmax.h index 98008dd92153..846e3fa65c96 100644 --- a/include/linux/minmax.h +++ b/include/linux/minmax.h @@ -6,6 +6,7 @@ #include #include #include +#include =20 /* * min()/max()/clamp() macros must accomplish three things: @@ -84,17 +85,6 @@ #define __types_ok3(x,y,z,ux,uy,uz) \ (__sign_use(x,ux) & __sign_use(y,uy) & __sign_use(z,uz)) =20 -#define __cmp_op_min < -#define __cmp_op_max > - -#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) - -#define __cmp_once_unique(op, type, x, y, ux, uy) \ - ({ type ux =3D (x); type uy =3D (y); __cmp(op, ux, uy); }) - -#define __cmp_once(op, type, x, y) \ - __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_)) - #define __careful_cmp_once(op, x, y, ux, uy) ({ \ __auto_type ux =3D (x); __auto_type uy =3D (y); \ BUILD_BUG_ON_MSG(!__types_ok(x,y,ux,uy), \ @@ -204,22 +194,6 @@ * Or not use min/max/clamp at all, of course. */ =20 -/** - * min_t - return minimum of two values, using the specified type - * @type: data type to use - * @x: first value - * @y: second value - */ -#define min_t(type, x, y) __cmp_once(min, type, x, y) - -/** - * max_t - return maximum of two values, using the specified type - * @type: data type to use - * @x: first value - * @y: second value - */ -#define max_t(type, x, y) __cmp_once(max, type, x, y) - /* * Do not check the array parameter using __must_be_array(). * In the following legit use-case where the "array" passed is a simple po= inter, diff --git a/include/vdso/minmax.h b/include/vdso/minmax.h new file mode 100644 index 000000000000..26724f34c513 --- /dev/null +++ b/include/vdso/minmax.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __VDSO_MINMAX_H +#define __VDSO_MINMAX_H + +#ifndef __ASSEMBLY__ + +#include + +#define __cmp_op_min < +#define __cmp_op_max > + +#define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) + +#define __cmp_once_unique(op, type, x, y, ux, uy) \ + ({ type ux =3D (x); type uy =3D (y); __cmp(op, ux, uy); }) + +#define __cmp_once(op, type, x, y) \ + __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_)) + +/** + * min_t - return minimum of two values, using the specified type + * @type: data type to use + * @x: first value + * @y: second value + */ +#define min_t(type, x, y) __cmp_once(min, type, x, y) + +/** + * max_t - return maximum of two values, using the specified type + * @type: data type to use + * @x: first value + * @y: second value + */ +#define max_t(type, x, y) __cmp_once(max, type, x, y) + +#endif /* !__ASSEMBLY__ */ + +#endif /* __VDSO_MINMAX_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF92D18732D; Tue, 3 Sep 2024 15:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376515; cv=none; b=W1CoP2L6K7cErU8jpg6HgeGo+kuWuqkyyghlKM0urXyFYrc8Apm9joiuhD6bfmR4pbj3/k/rxZ5hILZgYIlLEmhCtwt3EOx5pb8Pq6sSJILxtqTkkieortYJOyaGqPMrik6/8GUfy4JN+J0bzJPWYJkUNkjn1yrHP402G2wsI7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376515; c=relaxed/simple; bh=fxatXbimRwhegXeLQFCycbGwkziUK7b6e3mc0zIAjlI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gNUBI5x6EeVWXag1eGmWjfcPCHdkgdcI82Tc1No/7DCPPyobJEQ455G8jKf3cKzZdkL5eV2fjm80XSUHuZ3IKuEI5MPt7BR8wQ4TJ7MLUutHTaflfGkMAYJfGuPK+2e12Zlatadqbjqy4kbDPlVhETqgY7E0AtcLxZ1Ck2AHin0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0F1961424; Tue, 3 Sep 2024 08:15:40 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AD1443F66E; Tue, 3 Sep 2024 08:15:10 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 6/9] vdso: Split linux/array_size.h Date: Tue, 3 Sep 2024 16:14:34 +0100 Message-Id: <20240903151437.1002990-7-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Split linux/array_size.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- include/linux/array_size.h | 8 +------- include/vdso/array_size.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 include/vdso/array_size.h diff --git a/include/linux/array_size.h b/include/linux/array_size.h index 06d7d83196ca..ca9e63b419c4 100644 --- a/include/linux/array_size.h +++ b/include/linux/array_size.h @@ -2,12 +2,6 @@ #ifndef _LINUX_ARRAY_SIZE_H #define _LINUX_ARRAY_SIZE_H =20 -#include - -/** - * ARRAY_SIZE - get the number of elements in array @arr - * @arr: array to be sized - */ -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(= arr)) +#include =20 #endif /* _LINUX_ARRAY_SIZE_H */ diff --git a/include/vdso/array_size.h b/include/vdso/array_size.h new file mode 100644 index 000000000000..4079f7a5f86e --- /dev/null +++ b/include/vdso/array_size.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _VDSO_ARRAY_SIZE_H +#define _VDSO_ARRAY_SIZE_H + +#include + +/** + * ARRAY_SIZE - get the number of elements in array @arr + * @arr: array to be sized + */ +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(= arr)) + +#endif /* _VDSO_ARRAY_SIZE_H */ --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4299818732D; Tue, 3 Sep 2024 15:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376518; cv=none; b=bxLidcnzMZR5GJs2ohLSckWgyUlDF35B4BOgNEppg848YiWXYyMYywCa+FUzLo8ZpqJKv8RovLXhtGk98bVoQpMdLBhT4RAoZU1JQnbqRQi+seUIA7zPavFq/AjBsbJh4kY8CWIB0MPr0ddei3fXunulh9PrHkTXDTdpKvN32eE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376518; c=relaxed/simple; bh=LtJZgC1Q5rRYzbtACB0LDjsbjwXWFZt+O6+hA8TaX6g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TzouvCVGXFcOYyH9MvjPaUCChKXITvvEoa1ESMkteDlLYxlOlefagTGN7a76C1t9hzA5Ty2n/FtjjS8J7nA++Fvylcolw8rkRJiNEi2hSer4a4itMGiuu+mtk82HBz973yPB/iWzut6fkI3HV9aDE94V49hJryu8GSJeFikP0OU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3CE85FEC; Tue, 3 Sep 2024 08:15:43 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DB2E13F66E; Tue, 3 Sep 2024 08:15:13 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 7/9] x86: vdso: Modify asm/vdso/getrandom.h to include datapage Date: Tue, 3 Sep 2024 16:14:35 +0100 Message-Id: <20240903151437.1002990-8-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Modify asm/vdso/getrandom.h to include datapage. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- arch/x86/include/asm/vdso/getrandom.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/vdso/getrandom.h b/arch/x86/include/asm/v= dso/getrandom.h index ff5334ad32a0..4597d5a6f094 100644 --- a/arch/x86/include/asm/vdso/getrandom.h +++ b/arch/x86/include/asm/vdso/getrandom.h @@ -7,6 +7,8 @@ =20 #ifndef __ASSEMBLY__ =20 +#include + #include #include =20 --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 901A2187571; Tue, 3 Sep 2024 15:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376521; cv=none; b=gl5DdQkDmZJ7Si9hutTwk5xR8JcuJ8xPR9jv8+BMu89ED+8CecERNF0Vn/KQHuox8qT6Q+onU21dJyupVm2wn0WNOGbRCMlvCkLFI8BxZ3UBwoB88BTFB3zbLgU6HdhcYN+a1AxLNGRuBCpdBl5w8SveLuszqOWWwzIoXsdos5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376521; c=relaxed/simple; bh=AQxwLnCeXR4Tt2nNEssfZPp+mkppPyi+qa+VwXA7ggc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=myz9wIg6UiIBBeXY1eNYfWUI5u0l/Ggs2Cr8WY6Mjxvu/xf7ZVA2U57bdBJGo/x6UIppp515YmopA5hBrOrC3wM9BfG8aF1tujlZURMqgVg1dz588yDWPiiGkXzwTQqK8grKMOfUnzm5iUTKf6WHuUcNXwNxmxENwohsecthgZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6AF7E1063; Tue, 3 Sep 2024 08:15:46 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 150153F66E; Tue, 3 Sep 2024 08:15:16 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 8/9] vdso: Modify vdso/getrandom.h to include the asm header Date: Tue, 3 Sep 2024 16:14:36 +0100 Message-Id: <20240903151437.1002990-9-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Modify vdso/getrandom.h to include the getrandom asm header. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- include/vdso/getrandom.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/vdso/getrandom.h b/include/vdso/getrandom.h index 6ca4d6de9e46..5cf3f75d6fb6 100644 --- a/include/vdso/getrandom.h +++ b/include/vdso/getrandom.h @@ -7,6 +7,7 @@ #define _VDSO_GETRANDOM_H =20 #include +#include =20 #define CHACHA_KEY_SIZE 32 #define CHACHA_BLOCK_SIZE 64 --=20 2.34.1 From nobody Mon Feb 9 04:08:55 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB77018BC14; Tue, 3 Sep 2024 15:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376525; cv=none; b=lbParbbY2vsSnNq7XcomT6mRTazsdc1GJyEpWMPamV4Y/uGCky/RwmZjyU/YtWIZAXt62TzsaVQGB4iRVxP+fEJp+ahbU/8g/fgj793DfGf+Iau3TmkdMCXDwCd7PAiNM8wDxvcOls4K+ANjKVlNp+25Z4kc2qC1+ZmAefjeSwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725376525; c=relaxed/simple; bh=Z2SjnnuFLUbGFrOkJX97jNx8oE+Q+KPvIs2ohp5FEVs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=akbjU31edikXsSNphynn4MieieXT7b703xKYjNoQkzXDBXEir599gmq9kj2DhJuPWm2bi9EawiSdJ8Bp/soxJuAB+E6XVIwYvJ0tA6MmTXRrIGRcE6Gtj271cw9oewYnxC1Q63735L7c7DXypKsCmws5CRnWtQMNfMyb7hVS7Is= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 99AED1424; Tue, 3 Sep 2024 08:15:49 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 439333F66E; Tue, 3 Sep 2024 08:15:20 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 9/9] vdso: Modify getrandom to include the correct namespace Date: Tue, 3 Sep 2024 16:14:37 +0100 Message-Id: <20240903151437.1002990-10-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO implementation includes headers from outside of the vdso/ namespace. Modify getrandom to take advantage of the refactoring done in the previous patches and to include only the vdso/ namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- lib/vdso/getrandom.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/vdso/getrandom.c b/lib/vdso/getrandom.c index 938ca539aaa6..9c26b738e4a1 100644 --- a/lib/vdso/getrandom.c +++ b/lib/vdso/getrandom.c @@ -3,19 +3,13 @@ * Copyright (C) 2022-2024 Jason A. Donenfeld . All Right= s Reserved. */ =20 -#include -#include #include #include #include -#include -#include -#include - -#undef PAGE_SIZE -#undef PAGE_MASK -#define PAGE_SIZE (1UL << CONFIG_PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE - 1)) +#include +#include +#include +#include =20 #define MEMCPY_AND_ZERO_SRC(type, dst, src, len) do { \ while (len >=3D sizeof(type)) { \ @@ -68,7 +62,7 @@ static __always_inline ssize_t __cvdso_getrandom_data(const struct vdso_rng_data *rng_info, void *buffer,= size_t len, unsigned int flags, void *opaque_state, size_t opaque_len) { - ssize_t ret =3D min_t(size_t, INT_MAX & PAGE_MASK /* =3D MAX_RW_COUNT */,= len); + ssize_t ret =3D min_t(size_t, INT_MAX & VDSO_PAGE_MASK /* =3D MAX_RW_COUN= T */, len); struct vgetrandom_state *state =3D opaque_state; size_t batch_len, nblocks, orig_len =3D len; bool in_use, have_retried =3D false; @@ -79,15 +73,15 @@ __cvdso_getrandom_data(const struct vdso_rng_data *rng_= info, void *buffer, size_ if (unlikely(opaque_len =3D=3D ~0UL && !buffer && !len && !flags)) { struct vgetrandom_opaque_params *params =3D opaque_state; params->size_of_opaque_state =3D sizeof(*state); - params->mmap_prot =3D PROT_READ | PROT_WRITE; - params->mmap_flags =3D MAP_DROPPABLE | MAP_ANONYMOUS; + params->mmap_prot =3D VDSO_MMAP_PROT; + params->mmap_flags =3D VDSO_MMAP_FLAGS; for (size_t i =3D 0; i < ARRAY_SIZE(params->reserved); ++i) params->reserved[i] =3D 0; return 0; } =20 /* The state must not straddle a page, since pages can be zeroed at any t= ime. */ - if (unlikely(((unsigned long)opaque_state & ~PAGE_MASK) + sizeof(*state) = > PAGE_SIZE)) + if (unlikely(((unsigned long)opaque_state & ~VDSO_PAGE_MASK) + sizeof(*st= ate) > VDSO_PAGE_SIZE)) return -EFAULT; =20 /* Handle unexpected flags by falling back to the kernel. */ --=20 2.34.1