From nobody Tue Sep 29 08:29:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hvBCw36DXz6WwgV for ; Tue, 29 Sep 2026 08:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hvBCw2V1Qz4Whj for ; Tue, 29 Sep 2026 08:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790670540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U7IqpxDF97CyOShKlrYKPnST+YsJZfpi9X51zDJvwVo=; b=fpPm7rw0y9CCsb5QFUnj8KfLZ1KnA5RQSm/UzMN2Xt9P3w1AzI0q+3CBLPj3PvyTrQLPfZ FwuoddaIBYmvFWo0dENqmgBeOLAJ5CDkbqO7RHulZAQHrDzQGfIK/O49fxA4ehxdvZRXPC UhHY9e2q8xJ9oIzb2twTYc22BnZhmH6Nkw1U+irsmjT0l1pbYc8Apo1YFAtUHA0jYME0e7 iJiV06i+lmJBkaT1T+exjNUeODXFwm5q3UtvYBGMb6IuvLP6HJ5Ptu49+WGluwd5v/wYPg nSPq2wUq2eevrcjZQWX/b4aaOpA7r7dpyx3Yq1vPAUeax7rf6cGmrRhYhZkgRA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790670540; b=IMb/ZH7HIxjrWLZDXkjxXXocuL+wjem99zIzFcShTWvbc23hwBLJdCs8IgnuangezSuaCJ BVPXysOkpg9V+UVUs0cEa5gmSSfYfU6Yw1NNP5y2aAEqQIFhL1wZny4KW4TCH37JHkaYuK IUDYaOuZ9hVWLeDdjZwl7DNMTxTg+c0GdlbAJDwMY9HHde4S9R0Y3EtG2NfIjuyIkJrFai E9+X7K+gJkoHi+0/YBzLmhYabggwZx6uEq4hEXqM+ac7kHRSJKx7mAWbR+l9ngeOwPGB2J RdyFD6mUjR1gRSNYp6MMX+P2WMAA0T+VkHgXY3lx1nNmy3CFeOrGyfUS9YZwOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790670540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U7IqpxDF97CyOShKlrYKPnST+YsJZfpi9X51zDJvwVo=; b=SE19Uc1xMenzF3QJThx7M0B/jdX22P/qsQxGge8ZvAlhuFpIPeTQ//9gM6Z5vEgeMgo3DX K+yNTwc6yHPhlf94bzhTjccC0WVpbH8Ezkc6BzvYmajeUN538GDeirO2BmVzUPxSPm7Z+c nkfWU5BPoRa5hb0oiZvgg8Evz3mp0m8VQJwt39SXkijVVrZaQitv+MCCSWXZkvq31t5G8O QVwm8evi7dJlVGVZlviqcnsyZU5cHYZ4jDD1fQrvNqzYBibye+jl5AAMRy7N4/15uF3BMU aQyI2xKv01KP6WiQwYmgpfZ+S4itd67HRmcBaTDxBXht7iS0yl8A03dmOz0YZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hvBCw1XqDz15kM for ; Tue, 29 Sep 2026 08:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f7cc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 29 Sep 2026 08:29:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 081f751823aa - main - stand/powerpc/ofw: do not truncate device tree properties to 1024 bytes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 081f751823aa90d8cfea53e900f81dff7cc9836b Auto-Submitted: auto-generated Date: Tue, 29 Sep 2026 08:29:00 +0000 Message-Id: <6abb76cc.1f7cc.72f1758d@gitrepo.freebsd.org> The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=081f751823aa90d8cfea53e900f81dff7cc9836b commit 081f751823aa90d8cfea53e900f81dff7cc9836b Author: Piotr Kubaj AuthorDate: 2026-09-28 05:33:06 +0000 Commit: Piotr Kubaj CommitDate: 2026-09-29 08:28:46 +0000 stand/powerpc/ofw: do not truncate device tree properties to 1024 bytes When the OpenFirmware loader flattens the firmware device tree into the FDT it hands to the kernel (usefdt=1, i.e. on every real-mode OF system such as pSeries LPARs and QEMU pseries guests), add_node_to_fdt() clamps every property value to 1024 bytes. Any larger property reaches the kernel truncated. On QEMU pseries the PCI host bridge's "interrupt-map" is 3584 bytes (32 slots x 4 pins x 7 cells), so only the entries for slots 0-8 survive and the entry for slot 9 is cut in the middle. A PCI device in slot 9 or above therefore gets no INTx routing (irq 0), and with INVARIANTS the partial trailing entry trips the "ofw_bus_search_intrmap: truncated map" assertion in ofw_bus_search_intrmap() during PCI attach, panicking the kernel as soon as such a device is present. "ibm,drc-indexes", "ibm,drc-names" and "ibm,drc-power-domains" are cut the same way. Drop the clamp. fdt_setprop() already reports a property that does not fit into the FDT buffer, so no separate limit is needed. Fixes: 5ecf8e3852a9 ("Clean up some FDT-related code in the PowerPC bootloader, improving error checking and robustness. Prevents errors and crashes in FDT commands on PowerMac G5 systems.") Differential Revision: https://reviews.freebsd.org/D60086 --- stand/powerpc/ofw/ofwfdt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/stand/powerpc/ofw/ofwfdt.c b/stand/powerpc/ofw/ofwfdt.c index 5422924a3b4c..d55126e925bc 100644 --- a/stand/powerpc/ofw/ofwfdt.c +++ b/stand/powerpc/ofw/ofwfdt.c @@ -47,8 +47,6 @@ add_node_to_fdt(void *buffer, phandle_t node, int fdt_offset) /* Detect and correct for errors and strangeness */ if (proplen < 0) proplen = 0; - if (proplen > 1024) - proplen = 1024; propbuf = malloc(proplen); if (propbuf == NULL) {