From patchwork Mon Feb 26 16:14:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 206763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2180396dyb; Mon, 26 Feb 2024 08:16:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX1zp16kKVof28RAseqYXFE8A9EKpgqIxCfgljDDApAGIosCAL6BAze6Al9NT0AeZurUffSsBKCHmK4RW1WLzJpi8doNw== X-Google-Smtp-Source: AGHT+IFXI1Y/cWLJ1QQ1pSyMcBXW4plc9vzbBG+eYR+LvKk/dCvzTdUWOEuHbmoL3HPkM4zcXzHN X-Received: by 2002:ad4:5f4f:0:b0:68f:47e2:c617 with SMTP id p15-20020ad45f4f000000b0068f47e2c617mr10552673qvg.36.1708964203029; Mon, 26 Feb 2024 08:16:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708964203; cv=pass; d=google.com; s=arc-20160816; b=byEpvZtmw12JmhlSyMoULm8furbyJR9k6AszmZIgxoXaKsYRmWyEBeGiGDbSzVjNra 53SPZrUmeGycEhLdJcDggYdH5PcDD/bJgXIL61AdoUNKE+SXEwoY/JDaD8A8aStA2C9f XEJ7M9maUsze86nlvi6nsal4TpQTexU6OKhG1RTacmkGLctY/t86e1WSFLgRtmYLD0/e F+EbGX5Gzt3hFN0vN+f2VLnJenpx5gxtGMs10h53BZO42PvbOuoTRHZak+/KYqALFhKw ijmcWqXF4fN86QGOGSNVfneULxLqK9TQq31lxZzU9UYqZa4D8R8oYU2Yp9jsQpRJRZ69 +A/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3wyrgywYZHl7/A9Ukk2gWYi1jSb3cWkq9VxgHuqOsg0=; fh=BleVXquSlxeYENUaQ5V1oDOcsOVvkfsKzBVmxI6DYb0=; b=gQaLNxlyenLlM6mrbN7NGmP0N512ANG5dbkJ+HRIAduNFWeV1RrcjZ1Z4mcIuLLO1j ZaCEMrEKA92hzro57nh4hJzP3uPUtf/VcEcv7NzjRL/D/UfHuY5uPGhqzEY/VmuRQTI8 m+TMEXgvj/ikzdnqDsb+bBpAPfzh5Cxq2eUetA8vVAxO/kqQzpETxHgxhNQtQ+ifs+2n tCfa09/hZZZ2P0DgQkydJy8ZlNreHyDBZwRwh5Nn/SfIfITmROg0hg7G4E5XYzkq7xPi zkgV+cFTsPDexQK73IB7YK8Pl+AtkBrtbTpbl0s6Yld1XA2EZy4VfTYLFYi3XZ2hRnT/ dffg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZiZAMuXY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jq8-20020ad45fc8000000b00690194a4932si568056qvb.560.2024.02.26.08.16.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:16:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZiZAMuXY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CE12A1C23C28 for ; Mon, 26 Feb 2024 16:16:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F44612EBCE; Mon, 26 Feb 2024 16:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZiZAMuXY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7583D12C7F4; Mon, 26 Feb 2024 16:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708964111; cv=none; b=E/Yq6LQ17wd1kPe/YuQaUug64lyw7CPU4vqG9WZ6NaJ2zMkxAZWp8w0gm2m8hhdC8JWFcobWRzUi+f6dFtAPLOsI0EXcHVgm44TTc10M0uw/LRWZOdqAmbROpbLPUr3+78BvfLXDASs6DH93wM1uDHCaILbsZd4n6apS/7QlkE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708964111; c=relaxed/simple; bh=AO14Twor4Epqfova99BdXRAOjLIWQcQyPi3BUqYZmuA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QEcppADMtfH7yYzbceLqJnAJ+ylNLVAYdkMie3GyPvINMkbsu0kIDWZiYRh+zPXWZ7RAkzb5ZLuwHfdOlKs/mW5aSftjjMGpnJ1ttHBPBe3QU3glZzcfLJArmB5tr37PUqwRDcIolhPoZWm7Sd9Kd+K+z9vBdautl5ipE4PLFp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZiZAMuXY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC888C433B2; Mon, 26 Feb 2024 16:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708964110; bh=AO14Twor4Epqfova99BdXRAOjLIWQcQyPi3BUqYZmuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZiZAMuXYiDyR2hDknZ4xgVy8TWczoqlYaz+54BPEoKIfJs4BSV182oJ1ZYu9Y5JbD WmVlYt52eCJD6AGhn7U0y3EC75bLKVFGbI7wGmXiVDKgZPTwDaVuTJTSVkJKvUISzS 2XRA3a5n6YOmUElWz/EoUJbwtBXGMm0MnBobEcfj+6UoFFgUN+ewdn1/f3BBURGCAf oK4FRWPsN9e+IXZu64v2vjYmcNQRQ8eM254ceqdZ/GIQhQ58ktIQY1PjwK8pNlnHUX azFtrkzqYG46sjmhqFVs4snXAZo3hTMRuuCQkCC5flzHnC0ice4Qu8BYIkByoxWD5F EP1u+qVkKv5IQ== From: Arnd Bergmann To: Thomas Gleixner , Vincenzo Frascino , Kees Cook , Anna-Maria Behnsen Cc: Arnd Bergmann , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Guo Ren , Brian Cain , Huacai Chen , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Helge Deller , Michael Ellerman , Christophe Leroy , Palmer Dabbelt , John Paul Adrian Glaubitz , Andreas Larsson , Richard Weinberger , x86@kernel.org, Max Filippov , Andy Lutomirski , Jan Kiszka , Kieran Bingham , Andrew Morton , linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, Linux Kernel Functional Testing Subject: [PATCH 4/4] vdso: avoid including asm/page.h Date: Mon, 26 Feb 2024 17:14:14 +0100 Message-Id: <20240226161414.2316610-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240226161414.2316610-1-arnd@kernel.org> References: <20240226161414.2316610-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791978848358991890 X-GMAIL-MSGID: 1791978848358991890 From: Arnd Bergmann The recent change to the vdso_data_store broke building compat VDSO on at least arm64 because it includes headers outside of the include/vdso/ namespace: In file included from arch/arm64/include/asm/lse.h:5, from arch/arm64/include/asm/cmpxchg.h:14, from arch/arm64/include/asm/atomic.h:16, from include/linux/atomic.h:7, from include/asm-generic/bitops/atomic.h:5, from arch/arm64/include/asm/bitops.h:25, from include/linux/bitops.h:68, from arch/arm64/include/asm/memory.h:209, from arch/arm64/include/asm/page.h:46, from include/vdso/datapage.h:22, from lib/vdso/gettimeofday.c:5, from : arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128' 298 | u128 full; Use an open-coded page size calculation based on the new CONFIG_PAGE_SHIFT Kconfig symbol instead. Reported-by: Linux Kernel Functional Testing Fixes: a0d2fcd62ac2 ("vdso/ARM: Make union vdso_data_store available for all architectures") Link: https://lore.kernel.org/lkml/CA+G9fYtrXXm_KO9fNPz3XaRxHV7UD_yQp-TEuPQrNRHU+_0W_Q@mail.gmail.com/ Signed-off-by: Arnd Bergmann Acked-by: Catalin Marinas --- include/vdso/datapage.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 7ba44379a095..2c39a67d7e23 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,8 +19,6 @@ #include #include -#include - #ifdef CONFIG_ARCH_HAS_VDSO_DATA #include #else @@ -128,7 +126,7 @@ extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden */ union vdso_data_store { struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; + u8 page[1ul << CONFIG_PAGE_SHIFT]; }; /*