From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 AFE1DCD4853 for ; Wed, 4 Sep 2024 17:15:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4166B6B03AC; Wed, 4 Sep 2024 13:15:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39B6E6B03AD; Wed, 4 Sep 2024 13:15:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 214EA6B03AE; Wed, 4 Sep 2024 13:15:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 028706B03AC for ; Wed, 4 Sep 2024 13:15:04 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7BBF08150B for ; Wed, 4 Sep 2024 17:15:04 +0000 (UTC) X-FDA: 82527706128.10.AAEE770 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf08.hostedemail.com (Postfix) with ESMTP id 42DDA160023 for ; Wed, 4 Sep 2024 17:15:01 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; spf=pass (imf08.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725470026; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s+xHdJrGzXDFirK+lmOrlnVPC05+mB0nDxL8k7HwmNI=; b=3xrQjME+X4RPL0+2xpfT9mbv9dDrqUWVV9hMGDsmWwNB8FOEu97g7iDQlbVnkVU1CKCVrX C/F+NLDp8ZxrXGBqqIGPIJRYFmMw/0HLjaI1V1BtTwlHrXYJlfJky56hyIeEs6KBRyBnur pRz7nfSpU1caKA2zKDa9spD1H7pCBPM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; spf=pass (imf08.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725470026; a=rsa-sha256; cv=none; b=6sg5aOFLExK/50AkFjmh1eTjMMwAfFJASU1Oys4cLpE/af+ye0n8R4vokIZm/wt4myYVrd OOzc0f7kCCCggnRBVVLExhUj5XXESTrAVdKbAVxs4iv5AOKTqVMef1vkalA+Oa0ph3AgJq By3/6A+cUkiv5NLkmgk26+qTPvDWGlo= Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WzTdH42rQz9sSK; Wed, 4 Sep 2024 19:14:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AlpA-TvtqbJ6; Wed, 4 Sep 2024 19:14:59 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4WzTdH3BWjz9sSH; Wed, 4 Sep 2024 19:14:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 58D1C8B77A; Wed, 4 Sep 2024 19:14:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id wEG_f2jM11cu; Wed, 4 Sep 2024 19:14:59 +0200 (CEST) Received: from [192.168.234.246] (unknown [192.168.234.246]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7E3E68B778; Wed, 4 Sep 2024 19:14:58 +0200 (CEST) Message-ID: <919d9520-32a5-4a32-880d-8ac53601b188@csgroup.eu> Date: Wed, 4 Sep 2024 19:14:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/9] x86: vdso: Introduce asm/vdso/page.h To: Vincenzo Frascino , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , 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 References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> <20240903151437.1002990-4-vincenzo.frascino@arm.com> Content-Language: fr-FR From: Christophe Leroy In-Reply-To: <20240903151437.1002990-4-vincenzo.frascino@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Stat-Signature: xgoe7hyo3or7gi9cw4xuzdapmczcmag4 X-Rspam-User: X-Rspamd-Queue-Id: 42DDA160023 X-Rspamd-Server: rspam02 X-HE-Tag: 1725470101-701985 X-HE-Meta: U2FsdGVkX1/DchJJO9hFJewQ5CcKV+4Ql/w/hNZXvOtMwaQyQ4ZsW1MbnHDsBkWbn37l6A6Fv5jSQhNgPld3LFHeP9+IpUjC5I+Aee42P0oG8ZmK7RzfPINXpIrUEUy7acHbNQVHrP+ZMm/qOTbotjXiSGr/P0oRWNb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I3OdLSIjVrb/2DblCnvslO53gm4cZ63SAvT/dGgkZxht1 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: List-Subscribe: List-Unsubscribe: Le 03/09/2024 à 17:14, Vincenzo Frascino a écrit : > 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/page.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 Same, I don't think we need those macros to duplicate PAGE_SIZE and PAGE_MASK in each and every architecture. The best would be to use CONFIG_PAGE_SHIFT which is defined the same way on every architecture and refactor PAGE_SIZE and PAGE_MASK and get rid of all arch specific definitions of PAGE_SIZE and PAGE_MASK. > + > +#endif /* !__ASSEMBLY__ */ > + > +#endif /* __ASM_VDSO_PAGE_H */