From nobody Mon Feb 9 05:43:13 2026 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 1D5E52D2381 for ; Tue, 30 Dec 2025 07:06:14 +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=1767078376; cv=none; b=S5fRfVX4HkF+myeCVvWWPpiZZAd1SZxiV/Lbsr1HGPEW6VS/IAyp2624IxZYPrQbKoFqGohZcG/kQKRn7IsB3569Melhs2jQeLW1phHdX0+ssyIrJDo79XKg5ixLMhUFbM3MLTajljxltgTVlhFYHryKpnQw3UrDsU0EbXpz7C8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767078376; c=relaxed/simple; bh=E4HkiIB9B7tc63pFuMTGeDGcq4l+vohVXKTRCjI0+pw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=tCPENp46UnWeGx4aSabmkMNFr63pIsGr3xr4+zAc7wsxh9aGou2srAn62kxs7+rqURA04DzQT1pqJ7F50Q8fY9uyzV7P/2bvOA9HBwgDD9N640WyyLcbb6RJ3QsAojGin5EHqSPgQjiShBt/vsRGTk4hiPb2HQtsMiiP4Bg42fQ= 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=hh16YiRM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2GG6MLyM; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hh16YiRM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2GG6MLyM" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767078372; h=from:from: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; bh=b1xPGbzuTr1LSu9nNPB/3ljn0u/93ZcpdrYp3MCRdIM=; b=hh16YiRMsRLlucVT/KU+FWt6580yhZHH0JME4PWxj1VDt0L7iHxHKkdrnAv/Amj1riBvtb v/jLMPsPdKlrv/4Pgv8WBRooFT+Vwnelckx218OdfalKOnLzzWHdkVmncq55NZTmAnTBxC WtUdFka1roZ6jtADwgmMTXtC4iOF/OeRrIrq6FMo1rDmSBzH42SS67bGBHdOevjk/Nh1uK KjwnsysTXyWK3w90ftWi7Diarhha2e1jNoXifDEIpNllLvN1E2msLDwAOAxZAgPwtDYKKc 47tkre6pr/GtFG+eebuUYXAhWgoPlyaD3k1rIpQyHmVj9id6Pf+LTZFTS7CsNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767078372; h=from:from: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; bh=b1xPGbzuTr1LSu9nNPB/3ljn0u/93ZcpdrYp3MCRdIM=; b=2GG6MLyMb9wEU/FbzflYTWjI6Lpa0ipt7+VIXps4mqaG0avsEvYc37EZt3Ed6NCgMBc0wN TgkmWGWou53OBaDQ== Date: Tue, 30 Dec 2025 08:06:10 +0100 Subject: [PATCH] powerpc: Implement ARCH_HAS_CC_CAN_LINK Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251230-cc-can-link-powerpc-v1-1-82298df6e3bf@linutronix.de> X-B4-Tracking: v=1; b=H4sIAOJ5U2kC/x3MQQoCMQxA0auUrA3YYAW9irioSToGpS0tOEKZu 0+Z5Vv8P6BrM+1wdwOa/qxbyRP+5IDfMS+KJtNAZwqeiJAZOWb8Wv5gLau2yhhEhC7XW5Lwgln Wpsn+x/Xx3LYdwwPPmmUAAAA= X-Change-ID: 20251222-cc-can-link-powerpc-5ddd2469fd5b To: Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1767078370; l=1829; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=E4HkiIB9B7tc63pFuMTGeDGcq4l+vohVXKTRCjI0+pw=; b=vHjWSkP643fsjY0SlPDhJ7dt0o1ZUXOG/WzzQRKB+M4jY8dNxaNjb6qF4v+FB32s3MDsCN9uj CXLkKV2HNgmDNn01CAuwAzx5FM2Da93yBAcwUX5N54tNVvSNvB3SilQ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The generic CC_CAN_LINK detection does not handle different byte orders. This may lead to userprogs which are not actually runnable on the target kernel. Use architecture-specific logic supporting byte orders instead. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/powerpc/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 9537a61ebae0..6bb2f90e97ea 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -127,6 +127,7 @@ config PPC select ARCH_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE select ARCH_ENABLE_MEMORY_HOTPLUG select ARCH_ENABLE_MEMORY_HOTREMOVE + select ARCH_HAS_CC_CAN_LINK select ARCH_HAS_COPY_MC if PPC64 select ARCH_HAS_CURRENT_STACK_POINTER select ARCH_HAS_DEBUG_VIRTUAL @@ -1342,6 +1343,20 @@ endif config PPC_LIB_RHEAP bool =20 +config ARCH_CC_CAN_LINK + bool + default $(cc_can_link_user,$(m64-flag) -mlittle-endian) if 64BIT && CPU_L= ITTLE_ENDIAN + default $(cc_can_link_user,$(m64-flag) -mbig-endian) if 64BIT && CPU_BIG_= ENDIAN + default $(cc_can_link_user,$(m32-flag) -mlittle-endian) if CPU_LITTLE_END= IAN + default $(cc_can_link_user,$(m32-flag) -mbig-endian) if CPU_BIG_ENDIAN + +config ARCH_USERFLAGS + string + default "$(m64-flag) -mlittle-endian" if 64BIT && CPU_LITTLE_ENDIAN + default "$(m64-flag) -mbig-endian" if 64BIT && CPU_BIG_ENDIAN + default "$(m32-flag) -mlittle-endian" if CPU_LITTLE_ENDIAN + default "$(m32-flag) -mbig-endian" if CPU_BIG_ENDIAN + source "arch/powerpc/kvm/Kconfig" =20 source "kernel/livepatch/Kconfig" --- base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 change-id: 20251222-cc-can-link-powerpc-5ddd2469fd5b Best regards, --=20 Thomas Wei=C3=9Fschuh