Message ID | 20240923141943.133551-1-vincenzo.frascino@arm.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE2A2CF9C69 for <linux-mm@archiver.kernel.org>; Mon, 23 Sep 2024 14:19:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5BCF86B007B; Mon, 23 Sep 2024 10:19:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56C6B6B0083; Mon, 23 Sep 2024 10:19:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 433BE6B0085; Mon, 23 Sep 2024 10:19:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 25C1E6B007B for <linux-mm@kvack.org>; Mon, 23 Sep 2024 10:19:54 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BEFE51212C0 for <linux-mm@kvack.org>; Mon, 23 Sep 2024 14:19:53 +0000 (UTC) X-FDA: 82596211866.06.FBFDE6B Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf04.hostedemail.com (Postfix) with ESMTP id 1968040011 for <linux-mm@kvack.org>; Mon, 23 Sep 2024 14:19:50 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727101073; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=+2op0qrYTS1Ky1wCf3z7NCxRGIDf7jWJle8wd3I6LmY=; b=faQXz074waHVvEyQW6Aa1YMP+EB9iRJlrGm8ZmbTOuN9MKjFfMu23WJnSAbR3DY8XqsJGO wBQJyuiGwgC7TTZhbVolYztxs7KyAw+jGmjafXOrA/LPTVlZacUNLmkk6Xnzgq0m1rcm3c L4UNXW4ADAjn036isOutvLputTC0IXg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727101073; a=rsa-sha256; cv=none; b=yGcFUO2VaOA5M48mhqUvxmO58FO92W8329qCMyUiE4nziWLuvp15G3gFSC6zdhhGXVvHT/ PbFa1ynA1nt4ujEtji6qzvIYQ3Fr4HGTgpWKjjzqXp/U9XBuneOG/yxGQF186ZA3GBmtdC DhkSnuox6I8i+zmES6AZiUU+gSUJ1Pw= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com; dmarc=pass (policy=none) header.from=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 78EA5FEC; Mon, 23 Sep 2024 07:20:19 -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 8CD8A3F64C; Mon, 23 Sep 2024 07:19:47 -0700 (PDT) From: Vincenzo Frascino <vincenzo.frascino@arm.com> To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>, Andy Lutomirski <luto@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, "Jason A . Donenfeld" <Jason@zx2c4.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Naveen N Rao <naveen@kernel.org>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H . Peter Anvin" <hpa@zytor.com>, Theodore Ts'o <tytso@mit.edu>, Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Subject: [PATCH v2 0/8] vdso: Use only headers from the vdso/ namespace Date: Mon, 23 Sep 2024 15:19:35 +0100 Message-Id: <20240923141943.133551-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: w17zf6d78rzmwp9wzuzhm7y5wb43h79q X-Rspamd-Queue-Id: 1968040011 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1727101190-653869 X-HE-Meta: U2FsdGVkX19h3ciN94f1QDg0Jjps9xjSpJ8xcsJm0ywaauZyOaTW1cwcVScmRX77ytJoyLXG+b55S7lwiUfdDVxEWduYfsYvR7mYFov9xREIo1gaI2Ub9MZXxlSW9K46etp8sBEDPvQQ4JeI3IEJc2xVsSTsHYAsnwOA3qvBwjWWmKnbkg84nuVEc/6X8maasNg1/TXkUl+0nQ75f5nE6tfBj/U6CzQ0UCxIOJAbWYdvOA3hH0YJXG6ZG2Hfa3jqFS0ZxYq42aXRKH9UX/ls5FGvxWC6SAb2EYUAk3A70QxiF9zlqcSDvlOtiX34xL2tmm+WXEVVoFDV5XTLYYuPH909uqch07gQXtRla+9oaD7rCpSp4yXf6gFyS4Ej4lu726+Hr1toPgTlCKP/VjK/ecsyvldF6S3+9+x8WFr39TZJZizo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lBhq5cZdLN7+/+XbX1eza13eAbD1y9rP0GhdJ+lZ2hSWbxNwKw0kYHhW6DiCuvCeU1oK78o1XPq3ui7KCYhd1QJtpoGy3z84augM X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
vdso: Use only headers from the vdso/ namespace
|
expand
|
Le 23/09/2024 à 16:19, Vincenzo Frascino a écrit : > The recent implementation of getrandom in the generic vdso library, > includes headers from outside of the vdso/ namespace. > > The purpose of this patch series is to refactor the code to make sure > that the library uses only the allowed namespace. > > The series has been rebased on [1] to simplify the testing. > > [1] git://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git master This tree includes random support for s390, x86, arm64 and loongarch but your series only handles x86 and arm64 it seems. Christophe
The recent implementation of getrandom in the generic vdso library, includes headers from outside of the vdso/ namespace. The purpose of this patch series is to refactor the code to make sure that the library uses only the allowed namespace. The series has been rebased on [1] to simplify the testing. [1] git://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git master Changes: -------- v2: - Added common PAGE_SIZE and PAGE_MASK definitions. - Added opencoded macros where not defined. - Dropped VDSO_PAGE_* redefinitions. Cc: Andy Lutomirski <luto@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Vincenzo Frascino (8): x86: vdso: Introduce asm/vdso/mman.h arm64: vdso: Introduce asm/vdso/mman.h vdso: Introduce vdso/mman.h vdso: Introduce vdso/page.h x86: vdso: Modify asm/vdso/getrandom.h to include datapage vdso: Modify vdso/getrandom.h to include the asm header vdso: Introduce uapi/vdso/random.h vdso: Modify getrandom to include the correct namespace. arch/alpha/include/asm/page.h | 6 +---- arch/arc/include/uapi/asm/page.h | 7 +++-- arch/arm/include/asm/page.h | 5 +--- arch/arm64/include/asm/page-def.h | 5 +--- arch/arm64/include/asm/vdso/mman.h | 15 +++++++++++ arch/csky/include/asm/page.h | 8 ++---- arch/hexagon/include/asm/page.h | 4 +-- arch/loongarch/include/asm/page.h | 7 +---- arch/m68k/include/asm/page.h | 6 ++--- arch/microblaze/include/asm/page.h | 5 +--- arch/mips/include/asm/page.h | 7 +---- arch/nios2/include/asm/page.h | 7 +---- arch/openrisc/include/asm/page.h | 11 +------- arch/parisc/include/asm/page.h | 4 +-- arch/powerpc/include/asm/page.h | 10 +------ arch/riscv/include/asm/page.h | 4 +-- arch/s390/include/asm/page.h | 4 +-- arch/sh/include/asm/page.h | 6 ++--- arch/sparc/include/asm/page_32.h | 4 +-- arch/sparc/include/asm/page_64.h | 4 +-- arch/um/include/asm/page.h | 5 +--- arch/x86/include/asm/page_types.h | 5 +--- arch/x86/include/asm/vdso/getrandom.h | 2 ++ arch/x86/include/asm/vdso/mman.h | 15 +++++++++++ arch/xtensa/include/asm/page.h | 8 +----- include/uapi/linux/random.h | 26 +----------------- include/uapi/vdso/random.h | 38 +++++++++++++++++++++++++++ include/vdso/datapage.h | 2 ++ include/vdso/getrandom.h | 1 + include/vdso/mman.h | 7 +++++ include/vdso/page.h | 18 +++++++++++++ lib/vdso/getrandom.c | 22 ++++++++-------- 32 files changed, 137 insertions(+), 141 deletions(-) create mode 100644 arch/arm64/include/asm/vdso/mman.h create mode 100644 arch/x86/include/asm/vdso/mman.h create mode 100644 include/uapi/vdso/random.h create mode 100644 include/vdso/mman.h create mode 100644 include/vdso/page.h