From patchwork Mon Feb 26 17:50:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna-Maria Behnsen X-Patchwork-Id: 13572662 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A8EBC5478C for ; Mon, 26 Feb 2024 17:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GKQxAUo5NBQX2ncZJmxmveGPjRbzt1g9Z5xGGmXeoM4=; b=XgPX0MEGzTxT0+ G8G+6F63MvgDJLW91ON/1ZdOL7S7ksmQ4yitq+SWBR+rdH/rg8sXStbzCQVsLUclPPyO+pzqvBR/Q 2c1yt/ER7ogiif4dhpZBd4QROQbh93WWMagovbTLyHt1yW9xMz8kiUvNapc7gLbbGnmzw/ZwdQuOI bnErjX0EFF9EmZ5kVKtcbTwCgElneGP8YnLr6Zogr+kxmMrgZGgZ2euUgwmgJPdzffqGo87rZEffq g2zy+YreHbGmMlBNcaaPvk7yZon0ePS/ediYaxJupcCJiHMZFGxnn7i555lJ4XE72mhJ/hMGTSbua sfmsiXZr3GhnEuIPOwLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ref7f-0000000257o-3jFd; Mon, 26 Feb 2024 17:50:41 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ref7Y-00000002546-1X6g for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2024 17:50:36 +0000 From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708969830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=oyT45bJy0NjlcqFeA1O9Jx+i3jRc/06dKDog6PI1l+4=; b=Knwrmv/ne0GuLsaIkgP25WJhHcBK3CEuVrDHOY9iW6vUAONksfcKffr/5cZZWJvcgmFw5a cc6M2e5t6QlVFSiLjMDH/PcPWw7X35Bhtfg0jQWLg9c8F9jTyC8XD2iWGRdEUuVxWZHjD/ iP3niE9tt2NHvH5Frwc2t5FZG+Q/pFlVX5AC7+4o+DavWJ1WLCfpXqeuei8I4AEwGXzsMD tYHPpb0A/3aazMqgSBzCvYvH6fPq3Qu7itP/j09M8AJEhVmQxFo80lg47A2MedsCz88ywN wa1I/RdLwnd1nTyQhmPPP1XoQPpZ5RA4FbHoo36x2IzD6wtr8/74spkoB2cxeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708969830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=oyT45bJy0NjlcqFeA1O9Jx+i3jRc/06dKDog6PI1l+4=; b=ZKGuHU/IWsEbqGm6dBb+ljqasEBd013J41hORt5AxNf/sfUz032h1Nm8NwzRXeoCGE4d5r J7OfhzWWh1vFtPBQ== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Arnd Bergmann , Kees Cook , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Anna-Maria Behnsen , Linux Kernel Functional Testing Subject: [PATCH] vdso/datapage: Quick fix - use asm/page-def.h for ARM64 Date: Mon, 26 Feb 2024 18:50:23 +0100 Message-Id: <20240226175023.56679-1-anna-maria@linutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_095032_586404_F76B83FD X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The vdso rework for the generic union vdso_data_store broke compat VDSO on arm64: 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; | ^~~~ arch/arm64/include/asm/atomic_ll_sc.h:305:24: error: unknown type name 'u128' 305 | static __always_inline u128 \ | The reason is the include of asm/page.h which in turn includes headers which are outside the scope of compat VDSO. The only reason for the asm/page.h include is the required definition of PAGE_SIZE. But as arm64 defines PAGE_SIZE in asm/page-def.h without extra header includes, this could be used instead. Caution: this is a quick fix only! The final fix is an upcoming cleanup of Arnd which consolidates PAGE_SIZE definition. After the cleanup, the include of asm/page.h to access PAGE_SIZE is no longer required. 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: Anna-Maria Behnsen Acked-by: Catalin Marinas Acked-by: Vincenzo Frascino --- Patch applies on tip/timers/core and was tested with clang-14 --- include/vdso/datapage.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 7ba44379a095..5d5c0b8efff2 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,7 +19,11 @@ #include #include +#ifdef CONFIG_ARM64 +#include +#else #include +#endif #ifdef CONFIG_ARCH_HAS_VDSO_DATA #include