Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2936205lqz; Wed, 3 Apr 2024 12:56:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGJYzkxaYOvEJEjbmvFr622Bq74MSj6p5RZUHgwYE10CvH0jLkzF4KBi7IdpnFEyU5xHLqBRYvUAj3CrMi9kKeFdqookqbE1YeCr+Wsg== X-Google-Smtp-Source: AGHT+IHE6adA77MyhhpLd9d+HjmOyVqHTzxWodWDTWjBo6b7XdwFFXPvh4vFsOm44DwoktwF7OY+ X-Received: by 2002:a50:cd16:0:b0:56e:966:be7c with SMTP id z22-20020a50cd16000000b0056e0966be7cmr292557edi.2.1712174163759; Wed, 03 Apr 2024 12:56:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712174163; cv=pass; d=google.com; s=arc-20160816; b=NNMLReLwjzGqvgEsMwGrkH7fd4OyN9M1toDZxlxJ1wppBfHXcDinnMYBm8r47G5oht 5pz6b6XIFe6qpal/uwM3IV/XGYHFEvul5vUyWed4UpyxccdSG9VoS9cdGtPEXZOzxp0F xDqqnpYGbpGJkPdLIDUn+zCqLdYPqoFINAhAY3lEHe/ZHC/xoV51TetIWQSLgtNaN+Ue iutVgOCiEmBdUf2LLv6jFcjfj4JaUqENTQL4yS5iBsfvtX/zxuOkfmVeyNxxrxijGqmi s7DuvEJJS0S4iK5tHj+3G9R4iJikadvAom8Euzn9keSKyrCW6+i/1Tk0A+a7AR8kyUQK ZEDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=idUDMwnOdD1GcHVrCLPrBZtu2WPcarrSRJydUdZHxkI=; fh=003ZEjzoW+RAH6XGHiMjcWBAicT/KNGqg2q8Ht66Gls=; b=b5SAa+I0R5E41i4xXOvbxUalLInAKMlL2biFUgdnb7r4UpHseD5t3pI4cO5B5cyeMn QQRMdYzgMqTyaVNMV1gPyNijfg0Np2nS7ODI8f+Bv337NBvHVqgn7OeR5jTDWZ7FBk2a NXlEglhv2u3+1Djug4LgMzUrifFzmXY+Ofv8fpq9VU5hj9wLT4ZaBmz4AOSYtQo7Vqza 0ioP3WMqb6UxNavdVDNq4GSZPbnh9TUKkCtQCBKOUPjrEcu7fwafi22rhjajf7rt9yjD /E37KyWpA+FT8oq//y7rtM4K+uAMAM4mNNEWiiTl5OHX/gpDgOswWKdDYkW6Y186Hv6S szKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kBkZOuNj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u2-20020a50a402000000b0056c498c9881si7265317edb.471.2024.04.03.12.56.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 12:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kBkZOuNj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5343C1F24D8F for ; Wed, 3 Apr 2024 19:56:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61BE71553A5; Wed, 3 Apr 2024 19:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kBkZOuNj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IEacnahp" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 90EC315530D; Wed, 3 Apr 2024 19:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712174155; cv=none; b=c6mmheivpWpzQtlrHf/E1ToyhGSuBK7wipxRiwWSVcsRR+X7QnhG/quPs/ubwXfM+/BRa5yPGANRcAp4MfJU7KiPY1cmzND2ZE6H0e5jKP/bT3aWDUx91XsN9TQ4ONSEQGbsRzgBcFlvkS1fc7sYyPtc0vUrKBr/8QyuvL76ww8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712174155; c=relaxed/simple; bh=KS37d74OWEsLdUEIIEugWBwvMSdxG69bHALvunzttbc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fv3WPU8sIO9LTDsPq36kjhvde0gn8d9deJXttHr0Mi/iPitwPmDQSU5uB6qB7swWDytU9g7C6bZq0epKaPGNU6QT/Og2+ArNXUCYURK8oDZLpOPIY5y0Yk2UAjW7VvXhGJIlulhBr3h6fPzYgtZxLR9q31uGju1eSIib9Gypf3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kBkZOuNj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IEacnahp; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 03 Apr 2024 19:55:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712174151; h=from:from:sender:sender:reply-to: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=idUDMwnOdD1GcHVrCLPrBZtu2WPcarrSRJydUdZHxkI=; b=kBkZOuNjisLiR/uhLgxW63f9eRFmd9Dt+ZDdTSQoUtvZ/zqpIk02l5Zl3AFh2qxKviu0jV 6EomyjHxEWDxdVsag3B9Jpik8NYkp9XRjegX/UBsSzLt9Mfqhb2a2P4OLv1DHkDKBakNC7 Sfm8+a6xEEQtsFhmWqB4Ms0vsJ+TTZQZ+h3kBE5BWH90pDjmJtihvM/7tBVUpS491Uw6cX 9g1g3K2etnNHna1Og0oYJjuHltBlWmBV2ozxQIzPa7h5g8//aSabEO0ilepacvbqham+EO 0UFdKVq1Q8ImNgfvwfVJlF0dUbpA0qXilEXM8A3YaYapo5GZ13wP8F8wlWgpRg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712174151; h=from:from:sender:sender:reply-to: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=idUDMwnOdD1GcHVrCLPrBZtu2WPcarrSRJydUdZHxkI=; b=IEacnahprwmcUw4Uodu8dxqd9CH7anKU6hM4TfMOZYSliJwE+0b5D+J/yj/+xwDEVAEs3A dSAI4w6eeJVjewCA== From: "tip-bot2 for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/urgent] vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h Cc: Arnd Bergmann , Thomas Gleixner , Kees Cook , Michael Ellerman , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240320180228.136371-1-arnd@kernel.org> References: <20240320180228.136371-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171217415035.10875.5390578420995891180.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/urgent branch of tip: Commit-ID: cffaefd15a8f423cdee5d8eac15d267bc92de314 Gitweb: https://git.kernel.org/tip/cffaefd15a8f423cdee5d8eac15d267bc92de314 Author: Arnd Bergmann AuthorDate: Wed, 20 Mar 2024 19:02:15 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 03 Apr 2024 21:50:04 +02:00 vdso: Use CONFIG_PAGE_SHIFT in vdso/datapage.h Both the vdso rework and the CONFIG_PAGE_SHIFT changes were merged during the v6.9 merge window, so it is now possible to use CONFIG_PAGE_SHIFT instead of including asm/page.h in the vdso. This avoids the workaround for arm64 - commit 8b3843ae3634 ("vdso/datapage: Quick fix - use asm/page-def.h for ARM64") and addresses a build warning for powerpc64: In file included from :4: In file included from /home/arnd/arm-soc/arm-soc/lib/vdso/gettimeofday.c:5: In file included from ../include/vdso/datapage.h:25: arch/powerpc/include/asm/page.h:230:9: error: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare] 230 | return __pa(kaddr) >> PAGE_SHIFT; | ^~~~~~~~~~~ arch/powerpc/include/asm/page.h:217:37: note: expanded from macro '__pa' 217 | VIRTUAL_WARN_ON((unsigned long)(x) < PAGE_OFFSET); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON' 202 | #define VIRTUAL_WARN_ON(x) WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON' 88 | int __ret_warn_on = !!(x); \ | ^ Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Acked-by: Michael Ellerman (powerpc) Link: https://lore.kernel.org/r/20240320180228.136371-1-arnd@kernel.org --- arch/powerpc/include/asm/vdso/gettimeofday.h | 3 +-- include/vdso/datapage.h | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/vdso/gettimeofday.h b/arch/powerpc/include/asm/vdso/gettimeofday.h index f0a4cf0..78302f6 100644 --- a/arch/powerpc/include/asm/vdso/gettimeofday.h +++ b/arch/powerpc/include/asm/vdso/gettimeofday.h @@ -4,7 +4,6 @@ #ifndef __ASSEMBLY__ -#include #include #include #include @@ -95,7 +94,7 @@ const struct vdso_data *__arch_get_vdso_data(void); static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd) { - return (void *)vd + PAGE_SIZE; + return (void *)vd + (1U << CONFIG_PAGE_SHIFT); } #endif diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 5d5c0b8..c71ddb6 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,12 +19,6 @@ #include #include -#ifdef CONFIG_ARM64 -#include -#else -#include -#endif - #ifdef CONFIG_ARCH_HAS_VDSO_DATA #include #else @@ -132,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[1U << CONFIG_PAGE_SHIFT]; }; /*