From nobody Thu Apr 9 12:08:19 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 85924314A67 for ; Fri, 27 Feb 2026 06:54:49 +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=1772175290; cv=none; b=PmBZi1d44q1FpqjKiyfVdfPcYKHV6cui9kQ2stF2ymR1W/e/77GJKfZRMHSZmTiP5D68ZOqvH08jETxgnfJG8Mhp5/wdn1qs9+WTXUNgM/a5Cq0L8V22QVn0QwBvs4KJNrG6/yZQcTSEjYjITyjqtmNHBdl+suTIvG+ReB8lCKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772175290; c=relaxed/simple; bh=fi5JLAbOTl/+1Nk3gJx/MoRlnQFDtzWfQs1ISlV2qGU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=TKJDdNDBw5FcDfqW/j1pZgP0y67OnDFDA+9T5uGDOAAtl4Ka2nBrUBWwBfXaNirjN/9WXB+4pFsD2rGHmYKZH2572K/uw1ZAjw71iCWhl9qcp0qMLrSLB/+c9hkOc3Jprrv0ipIC4XBWHxaLK6FqLU89Pv7WxoVzN+JZOdP30Mg= 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=zqCtK5Zu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EwUlFhki; 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="zqCtK5Zu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EwUlFhki" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772175288; 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=NYU2DjWIvo/s2zAJBv/B2HsELMqSCe9+by7E9gQC1/M=; b=zqCtK5Zug38lALa1rDaX4rXov8yi0xleLfTP/Nn4hfLXb8yDFrjoRndvLJFHVquqsoFUNx ZklTmvg1YYYCVP3Ms+CyZyNNncFjbMU4YAjtXtu9tDGAVIY62piCYh6x9xobvKFJRRRkSB HKkaNO9hDCvBZ4y7/nVE6+ixU83YPvJd0k37zT45bEytH2N/wPDuTBlnSr+u9jRNzrRpSF XoyJ3P1OfwR90IQy4STigmN6+bHk3rhmcyWudJHu3yAzuzOqGsmY1jSuUQkZX9NvkW0vbB Bsgr67LnUgOfaqxWnY8yQlEkw3iVoOmri5SyVcHgP/Ji7wbp5sBNJxdNRaMZpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772175288; 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=NYU2DjWIvo/s2zAJBv/B2HsELMqSCe9+by7E9gQC1/M=; b=EwUlFhkia9zD/URLV1OXQqVzNJ+xebzIlkbqTkKVmX0eZAECbf9yMxPP/n4hdp8AiJPIzG RmaDJT0KpQDfxFBw== Date: Fri, 27 Feb 2026 07:54:46 +0100 Subject: [PATCH v2] 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: <20260227-cc-can-link-powerpc-v2-1-7690e8030ea2@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/22NwQ6CMBBEf4X07Bq6CAFP/ofhAN2tbDQtaRExh H+3Eo8e30zmzaoiB+GoztmqAs8SxbsEeMiUGTp3YxBKrDDHUiMiGAOmc/AQd4fRvziMBkoiwlP VWCp7lZZjYCvLbr22iQeJkw/v/WTW3/TnK/K/vlmDhhqxqclWXPT2kurnFLyT5Uis2m3bPmUkr Zm6AAAA 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=1772175287; l=1975; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=fi5JLAbOTl/+1Nk3gJx/MoRlnQFDtzWfQs1ISlV2qGU=; b=110tPJbd42OCVbDCmek+mzfdMZ88CUZNMgvUD6PZf3Qj4/IakaahKSpyZAYvOeHW/TFITHV+/ vjoRx7N/AHeBVZLUMnc6XeBankB5q2WrpV0SsePxtZjh3RzIp1wyeeS 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 --- Changes in v2: - Rebase on v7.0-rc1. - Link to v1: https://lore.kernel.org/r/20251230-cc-can-link-powerpc-v1-1-8= 2298df6e3bf@linutronix.de --- arch/powerpc/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ad7a2fe63a2a..793e6b311143 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 @@ -1343,6 +1344,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: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20251222-cc-can-link-powerpc-5ddd2469fd5b Best regards, --=20 Thomas Wei=C3=9Fschuh