From patchwork Tue Feb 20 20:04:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 203798 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp637624dyc; Tue, 20 Feb 2024 12:06:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUSnhsLbhzFeVOwoa527d7T7qgcpRrGI63VnU+xeuO2ANtO3xTv1lJtVW6dGq99kNynlpfCwu8fsLCFZZ4Z6psNc5gcTA== X-Google-Smtp-Source: AGHT+IGBet4KPrcC9DLz0YDj5cLnr8x8xtqFFW1xcZh1S+VHzlU+R2oGHybBMFgLN3+0GII+1ytF X-Received: by 2002:a05:622a:1342:b0:42d:c8ed:6782 with SMTP id w2-20020a05622a134200b0042dc8ed6782mr21357868qtk.40.1708459578166; Tue, 20 Feb 2024 12:06:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708459578; cv=pass; d=google.com; s=arc-20160816; b=ls+qn/1Wlc26PpKQuzYGQEPmMXN0eNIL5socEev7DtRzaPw29kUCw+FDm60DRD4d0f JPMqERe/YSABfK78NDUiUHzPgJICU0QuI7EWlxGQLMXe31vj/9e4LcsSLSuQU+SyN6T4 myQKG8eFKXCDgyRYeqoozNdEpeLI7T+Jv1jw4mKA9P6eu+iQHXc9HYB5eyoLypv06XZZ BHZzWe4serIb7u7cDOEQjpG1randRQ3V0ALOF9Q2/IQufrhwdKMtHS6zsM8OVcqr8xYc Khei6CqwLDVtfw4YmDilzRtxIfaDf4RpKU2AimiUox6IuhygHTHq4R3/61OHQ1eNfe0l vFgA== 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=NpLzDQM4p8MzYemt/5BaaxZB7bvUITLVj+nxe5abCSc=; fh=a6/Psrb0bpVgvoChO1/Rb07f2AHm9CvbWp001nJ2HYs=; b=d3fDvSNR4r2s811UJantB9VYfqIjzRuwH/D3qppLjCSQLayGVN210C6wvqZVlUiUwv OhhqgQcDGBiw16RY7fvPGOEvLIzU9PkMzem8l0B78081h7NUvlefNUSxioEJeSZR3nhA HCKsqjSFig/plKEjdUy/2QqulPZDLA9+dY0qUVVz17xHdlcQwtKCISHKPUNZXkXSUvJM u+TfzC2RiZDjVD1rcrbnSnd0W6Bm/omDuKL4eTBGCZpLDrSOyHI9rmVAqEKw/v3k/NA1 6CwRa2bQJtvebyh1h3bi/O3XUUmmMJovYKkn2ls9d9zmXfoMPgQ4gRt2Do9CgRCG7HXf 3Z/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=isjk5MMK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=qhx13rg5; 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-73647-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73647-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h4-20020ac87144000000b0042df31d1e69si8230519qtp.772.2024.02.20.12.06.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 12:06:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73647-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=@linutronix.de header.s=2020 header.b=isjk5MMK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=qhx13rg5; 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-73647-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73647-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DBF1C1C20EBA for ; Tue, 20 Feb 2024 20:06:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BD961509BF; Tue, 20 Feb 2024 20:04:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="isjk5MMK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qhx13rg5" 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 5D01B14D438; Tue, 20 Feb 2024 20:04:32 +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=1708459475; cv=none; b=kEAb3HVU/q018ZOYe0G2s2gIzHqKNs2GZQErXMNGcY2sEztfg+9DK0CwCKO70aLBzzOdohf8xoolXlqxJAuWbL0OWB3bJk5kN7dETSLOwLQ/UF7bxklFkIf2PMflT1Wf3sGzLM83/PAhBTCFkpkiM1/h7zWeTP6HdRz2awsJ5sM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708459475; c=relaxed/simple; bh=KEDsLXYcoyRDbxR0FZqnM+1PrPd3XchfuAYflXjBMzA=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=g5brHx05x6Ijuf2f3XTy3urbcOuu7V0RbABOd/xjnGTEuXue4R5jChuO1qbhPt5Vy/Cn/ngCkmIm4I6xVT+fxkiSTeH82iYdVLq9/mMPWdeGejhBObePCVMahivRvCcR+XycImvUMI4jvsSspz6kKGHlLC9XSKRCpiVmmzLwBHA= 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=isjk5MMK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qhx13rg5; 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: Tue, 20 Feb 2024 20:04:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708459471; 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=NpLzDQM4p8MzYemt/5BaaxZB7bvUITLVj+nxe5abCSc=; b=isjk5MMKuRwO2dOxEDqg0/aVi4tt3HrKOJQR8Zs1ra6+HkEfzLsrT2JncyX0m087F6QdTg KKtTRqRG6RHI4rXMqEsCxa9ROJ69XNS0EiQqgWCp1aV8FsVv46eaY3nAIsR+mEf3jJvh47 2Cv1xepOVHYB9qmtBDlGL666PcuoKqnwlnJw2q6DQtiJRpQ1aGmYgJI2DdD0NQB0oGOE/y q4kx+5Tl8DB5pPr7BZfvTXN8kt+cck2HC+yCAchqqStyCHVP79+U5c11bkzk3rZQTtOTm/ B22yl6sSH9w+ne9KtbLUvTcq6OvrCFJsrdqeWzBGO2JTmnsJkkw9dm+uEwqh3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708459471; 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=NpLzDQM4p8MzYemt/5BaaxZB7bvUITLVj+nxe5abCSc=; b=qhx13rg5RI2RUQFDNARM0O083Y+AQJ7TUhUSWHapC3UN+qvyu+NOo/UeNfrNEE1nH49fMc oNWfAvlUpLi3i+DQ== From: "tip-bot2 for Anna-Maria Behnsen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] vdso/ARM: Make union vdso_data_store available for all architectures Cc: "Anna-Maria Behnsen" , Thomas Gleixner , Vincenzo Frascino , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240219153939.75719-5-anna-maria@linutronix.de> References: <20240219153939.75719-5-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170845947061.398.18124310641714961312.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791449710414212026 X-GMAIL-MSGID: 1791449710414212026 The following commit has been merged into the timers/core branch of tip: Commit-ID: a0d2fcd62ac2d3749ff48e30635fe8ea184f0a97 Gitweb: https://git.kernel.org/tip/a0d2fcd62ac2d3749ff48e30635fe8ea184f0a97 Author: Anna-Maria Behnsen AuthorDate: Mon, 19 Feb 2024 16:39:33 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 20 Feb 2024 20:56:00 +01:00 vdso/ARM: Make union vdso_data_store available for all architectures The vDSO data page "union vdso_data_store" is defined in an ARM specific header file and also defined in several other places. Move the definition from the ARM header file into the generic vdso datapage header to make it also usable for others and to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20240219153939.75719-5-anna-maria@linutronix.de --- arch/arm/include/asm/elf.h | 1 - arch/arm/include/asm/vdso_datapage.h | 26 -------------------------- arch/arm/kernel/asm-offsets.c | 4 +++- arch/arm/kernel/vdso.c | 4 ---- include/vdso/datapage.h | 10 ++++++++++ 5 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 arch/arm/include/asm/vdso_datapage.h diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index d681016..9f21e17 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -4,7 +4,6 @@ #include #include -#include /* * ELF register definitions.. diff --git a/arch/arm/include/asm/vdso_datapage.h b/arch/arm/include/asm/vdso_datapage.h deleted file mode 100644 index bef68f5..0000000 --- a/arch/arm/include/asm/vdso_datapage.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Adapted from arm64 version. - * - * Copyright (C) 2012 ARM Limited - */ -#ifndef __ASM_VDSO_DATAPAGE_H -#define __ASM_VDSO_DATAPAGE_H - -#ifdef __KERNEL__ - -#ifndef __ASSEMBLY__ - -#include -#include - -union vdso_data_store { - struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; -}; - -#endif /* !__ASSEMBLY__ */ - -#endif /* __KERNEL__ */ - -#endif /* __ASM_VDSO_DATAPAGE_H */ diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 219cbc7..4915662 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c @@ -21,10 +21,12 @@ #include #include #include -#include #include #include #include + +#include + #include "signal.h" /* diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index f297d66..d499ad4 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -35,9 +34,6 @@ extern char vdso_start[], vdso_end[]; /* Total number of pages needed for the data and text portions of the VDSO. */ unsigned int vdso_total_pages __ro_after_init; -/* - * The VDSO data page. - */ static union vdso_data_store vdso_data_store __page_aligned_data; struct vdso_data *vdso_data = vdso_data_store.data; diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 73eb622..7ba4437 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,6 +19,8 @@ #include #include +#include + #ifdef CONFIG_ARCH_HAS_VDSO_DATA #include #else @@ -121,6 +123,14 @@ struct vdso_data { extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden"))); extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden"))); +/** + * union vdso_data_store - Generic vDSO data page + */ +union vdso_data_store { + struct vdso_data data[CS_BASES]; + u8 page[PAGE_SIZE]; +}; + /* * The generic vDSO implementation requires that gettimeofday.h * provides: