From nobody Tue Sep 29 08:29:00 2026 X-Original-To: dev-commits-src-all@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 4hvBD1452yz6WwZh for ; Tue, 29 Sep 2026 08:29:05 +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 4hvBD13Srkz4WjT for ; Tue, 29 Sep 2026 08:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790670545; 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=Q1RG0f+fxi8i1pDDYaKd710Qm9So75b/2FUqJo0ngehCMQ3MA5a/5tvRvaiqaeGk6EUOic owiCZSj7C7ECStg/r2lcEW7aweVLBNLFScLamoFlBaGJW62QaRU18DzAjuOlmeYi7f9GNA MbrLM7q/GYXVYmSDJTSXr70k1abDNT7NCM6VpYZRE/CDd/WLeQzlK/dj4xBINqLkGbIIUX D1zbrHgIjcBKwhPXNtCNb61YDQ/JwDWbCBiMVFTmYtoRbQhuxULn7o5BtoRo1nyJRLsut9 HUEF29EPZkQ7ie4D4xXnLdUPchChvuw+mPbvZEBZd0z2+yKs8mKTwSRdd6/6qg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790670545; b=un7Vrz3rjyUwQ1wzJr1I4k6a144Epu+P8MYEZ7qILpgGvD4LMllz7vut+kqg0473TVKJ8d INwWIVPAXwLnG3S3s6Af4c1fjrGeXTNKph1EZVYx4HeUH2o5a6xd95/aD4wzjy9HCnnIAK 82Sa124hQc/YE2TymqeQj1fucb9Rt7D7ZJiRttMGaPQuLsCGfEQYFRC6+yQng7dpo6zl04 xVmcY0pap+0nR1HQ6dbBALEi+T9wjFIj575jylGUK/YYPQnPa7ivIwwW6utx6hGGKeMYsO 5dpgMzOefGl4gHABE5In94Yfk/LTuXmQF8FhKcc0BziymyVj4GU5eFilWhWhow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790670545; 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=djWH5jTZCof75DYzZYYQUM7Byoc5wIqYNne7Fgogi7aTxunOiA9h/BeLJQ1FmMwAV1wNBS uQ1cBfFLG2awQEH3uQYRu8HmiTCCJufw0SrSYSZ6elY/tlxVDXY8JvY/KZVZLphJ0bdx2c EATlQIVajxNj+5POxmoki+NGDAmCHYYMolfVJKe3NUdJR9osxYLSCDLs3/8hM3juQBo55Z 6JkrMrvNjPhJ8dOXYsKPlT5BFLP9UdtSJbokYUccIg94AVWvktONtns82sGGYI1RSdlTCv 5XGyQvvsdyZN7+vHGklQz7IOs2pYQf7VJepqGjE7ZS4A72jC+jbrVPnshSby9Q== 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 4hvBD12XwCz15tD for ; Tue, 29 Sep 2026 08:29:05 +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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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) {