From mboxrd@z Thu Jan 1 00:00:00 1970 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 A97C2C133; Tue, 26 Aug 2025 14:02:54 +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=1756216974; cv=none; b=MBd/OI6L8AO8vNummCFrbMtAMMOsb8Rje3As3LqzRPDT4yDbXNDtDuOfvzGnheWctuvjqGF+ifJz3uxsj0BpDtnoVPqMF3xMNITxFmFzRqsj72QsnnwQ6P7utQczLeyPIYBTN2dCKwVozcRo/G8ZtmrJLB6otmI83zdCjrrG/Us= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756216974; c=relaxed/simple; bh=6kenf1RKDd+5dav2P+JNBppzK+uS1N6fZreMt0SV+Hk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NzpGO0LYLXmjWBbti6MDQXScuJ9yK4QhK7fBfIuueo3U31vxS6QCUIPsvMulVqFKHjZFJn7ya6Fb4mDm55TtKrJ+u3hA2VC7KndfZmUavI80JAfZut4AhEXXsuWxDn0c82onDTpUYKjq2UIsshREKVUJMEud5xoiRbxSIrzP3rE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AL6kWrcm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AL6kWrcm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0302EC4CEF1; Tue, 26 Aug 2025 14:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756216974; bh=6kenf1RKDd+5dav2P+JNBppzK+uS1N6fZreMt0SV+Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AL6kWrcmbYyTXbFXt4d3AgUIO49TDM28t64464iUGXg1Do8SKkP4rcr6tsT2UFMdd zQhb7EJLcvpToFt4zJ0C14h9qeOz/aok58RFBXkYvNmpIDRJvpUyAK7gg/+pDHgWdG 2w6d7b3do3nK8wkTmKbca9Z6HrZ/OI+f/eKPZ8uU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jan Beulich , Josh Poimboeuf , Juergen Gross , Sasha Levin Subject: [PATCH 5.15 612/644] compiler: remove __ADDRESSABLE_ASM{_STR,}() again Date: Tue, 26 Aug 2025 13:11:43 +0200 Message-ID: <20250826111001.717382045@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110946.507083938@linuxfoundation.org> References: <20250826110946.507083938@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan Beulich [ Upstream commit 8ea815399c3fcce1889bd951fec25b5b9a3979c1 ] __ADDRESSABLE_ASM_STR() is where the necessary stringification happens. As long as "sym" doesn't contain any odd characters, no quoting is required for its use with .quad / .long. In fact the quotation gets in the way with gas 2.25; it's only from 2.26 onwards that quoted symbols are half-way properly supported. However, assembly being different from C anyway, drop __ADDRESSABLE_ASM_STR() and its helper macro altogether. A simple .global directive will suffice to get the symbol "declared", i.e. into the symbol table. While there also stop open-coding STATIC_CALL_TRAMP() and STATIC_CALL_KEY(). Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates") Signed-off-by: Jan Beulich Acked-by: Josh Poimboeuf Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Message-ID: <609d2c74-de13-4fae-ab1a-1ec44afb948d@suse.com> Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/xen/hypercall.h | 6 ++++-- include/linux/compiler.h | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -94,12 +95,13 @@ DECLARE_STATIC_CALL(xen_hypercall, xen_h #ifdef MODULE #define __ADDRESSABLE_xen_hypercall #else -#define __ADDRESSABLE_xen_hypercall __ADDRESSABLE_ASM_STR(__SCK__xen_hypercall) +#define __ADDRESSABLE_xen_hypercall \ + __stringify(.global STATIC_CALL_KEY(xen_hypercall);) #endif #define __HYPERCALL \ __ADDRESSABLE_xen_hypercall \ - "call __SCT__xen_hypercall" + __stringify(call STATIC_CALL_TRAMP(xen_hypercall)) #define __HYPERCALL_ENTRY(x) "a" (x) --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -249,14 +249,6 @@ static inline void *offset_to_ptr(const static void * __section(".discard.addressable") __used \ __UNIQUE_ID(__PASTE(__addressable_,sym)) = (void *)&sym; -#define __ADDRESSABLE_ASM(sym) \ - .pushsection .discard.addressable,"aw"; \ - .align ARCH_SEL(8,4); \ - ARCH_SEL(.quad, .long) __stringify(sym); \ - .popsection; - -#define __ADDRESSABLE_ASM_STR(sym) __stringify(__ADDRESSABLE_ASM(sym)) - /* &a[0] degrades to a pointer: a different type from an array */ #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))