| Message ID | 20260110202906.187370-17-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768077034; bh=PwXAkdpC4te6Y0o9xHrSoVC3Tosq1zixbWoj5qSQPU8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PDB82X4xuaajEj4vK77hJ2L8RmNcwcM2C3Dry0DMkjuApIH8+ZV/tdIJxVP5t+9u6 T4x1nWYrAWFKKFv2sB+zokB2drLhaRTFtAloIlY6/LH4jD1hESJvy8GhLAIr9KffpA YKERqG3+hqHqUv6WE3b8ZgcdCQMxpe87jGCkCnJOycBZTDXkrbgORH7DUbWdmaItfV 0Y8JUrOnq6wWpIM02WNBBfhjNOhk/ZQdok38vl4uL5jrcCrYDL84dJIBysYj4NfX4b vvUyAmlu3rATxBsA+a5+XVTsrkFHYQGgyRolQXlGekEYJ6lbThafew+qoz8ctJeOm7 FZunLr5T8JwOA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C050069299 for <u-boot-concept@u-boot.org>; Sat, 10 Jan 2026 13:30:34 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9PJFJbYcO0PV for <u-boot-concept@u-boot.org>; Sat, 10 Jan 2026 13:30:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768077034; bh=PwXAkdpC4te6Y0o9xHrSoVC3Tosq1zixbWoj5qSQPU8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PDB82X4xuaajEj4vK77hJ2L8RmNcwcM2C3Dry0DMkjuApIH8+ZV/tdIJxVP5t+9u6 T4x1nWYrAWFKKFv2sB+zokB2drLhaRTFtAloIlY6/LH4jD1hESJvy8GhLAIr9KffpA YKERqG3+hqHqUv6WE3b8ZgcdCQMxpe87jGCkCnJOycBZTDXkrbgORH7DUbWdmaItfV 0Y8JUrOnq6wWpIM02WNBBfhjNOhk/ZQdok38vl4uL5jrcCrYDL84dJIBysYj4NfX4b vvUyAmlu3rATxBsA+a5+XVTsrkFHYQGgyRolQXlGekEYJ6lbThafew+qoz8ctJeOm7 FZunLr5T8JwOA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AF3DB69291 for <u-boot-concept@u-boot.org>; Sat, 10 Jan 2026 13:30:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768077033; bh=hH2wgwp7Ihn/aZbPeAv/cvF/taQOhzPo8zrmfzdebvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jiNbYhj3CYY6Rd9beqM3YudCfXnHhJw1GrNUIda9YMjCoaOugX+28xPzcZPXbfSRT GlPEtjyB5yUc36419odOifND5frds2hpH2AGpeUflcaxkwrQxlk57/e4KE6W6zuBoZ H2OX2g571kSrWLlbrT8VqUVMjT7s7kdPOqbrMPtP1EYvWc6JpVJM0/y+YRfSfB2u3i JyoJgDa8XdCtwhZ+d/3JgAfmIuPtOKgt9OXMLNmhvw/kjfKhJQPKUur+yJ3d4b8JEX g3G8+ylCnG9fYn5TDsg1yBeumyJVL1WjkQW/TKXtiWfD8UF5V6W+FvuDDGTxCLyCfk c0J1uMNanK+Hg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B79CF6927E; Sat, 10 Jan 2026 13:30:33 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id MIDu-p_dDYKn; Sat, 10 Jan 2026 13:30:33 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768077028; bh=micRvxuLfxGPwm5RUTAqoLUgJNEZ7jvIgUYx4vjEpCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoGzS6m1RGYpQT/+paea35hG4DIKxg/+NoCwDD+IHsKV9zWYSTk31BNz8Y84p6/Rx +h2weCHcF4ZSs4IO96M3CtBeiVqusOQlLTZhK5VsHp3v4M1VTe7ib0P9IDFiZu4eLo wXd9VHK6ZnpybiG3N4y60pTFHrl8z8P09zC65nBKPxd+Se6b9vJG2oB7al5ZwBzbhL qPtBebOO2yD3j5vmdVbQrzb+qJIQGHaxCGhq5ye/CkeKW+QkEd7RDO8wKF4Jbdy5MU ZclhBRSSMcdHWmDDM8AZHX8tjBbo2qnkF6D74zFO3iRce+9QgJNFlNoqv5QWbs85eQ yPCeHxTpQ6pIw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D78D169186; Sat, 10 Jan 2026 13:30:27 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Sat, 10 Jan 2026 13:28:48 -0700 Message-ID: <20260110202906.187370-17-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260110202906.187370-1-sjg@u-boot.org> References: <20260110202906.187370-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IRKLEPMRQG3V5RLH4IGBE3VBFAOQR7HP X-Message-ID-Hash: IRKLEPMRQG3V5RLH4IGBE3VBFAOQR7HP X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com>, "Claude Opus 4 . 5" <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 16/26] boot: pxe: Set pxe_file_size in extlinux_read_all() List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/IRKLEPMRQG3V5RLH4IGBE3VBFAOQR7HP/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
boot: pxe: Add three-phase API and fix memory leaks
|
|
Commit Message
Simon Glass
Jan. 10, 2026, 8:28 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> The extlinux_read_all() function calls pxe_probe() with a config file that is already loaded in bflow->buf. However, ctx->pxe_file_size is not set, so the parser receives a size of 0 and fails. Set ctx->pxe_file_size from bflow->size before calling pxe_probe(). Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- boot/ext_pxe_common.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/boot/ext_pxe_common.c b/boot/ext_pxe_common.c index 3b1412b86d3..930e54ea84d 100644 --- a/boot/ext_pxe_common.c +++ b/boot/ext_pxe_common.c @@ -136,6 +136,7 @@ int extlinux_read_all(struct udevice *dev, struct bootflow *bflow, if (ret) return log_msg_ret("era", ret); addr = map_to_sysmem(bflow->buf); + plat->ctx.pxe_file_size = bflow->size; ret = pxe_probe(&plat->ctx, addr, false); if (ret) return log_msg_ret("elb", -EFAULT);