From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DC72C4332F for ; Mon, 28 Nov 2022 19:52:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82D92852F6; Mon, 28 Nov 2022 20:52:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ijyD8gnu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 13AC985290; Mon, 28 Nov 2022 20:52:03 +0100 (CET) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCC1A852ED for ; Mon, 28 Nov 2022 20:52:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ej1-x634.google.com with SMTP id ho10so28629217ejc.1 for ; Mon, 28 Nov 2022 11:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hGn0Yi4S3XFvH/2A8yUb9Bgty9FRvD2Yf3ww9GY3Byg=; b=ijyD8gnuAyc2F0sE3jCia1ZqcfTJp2hVEsZXwl5edqH7//iGT8Sk8i7eS3MWWLED5w 5Tnb2oG8svT7CdL+PeDifSz/ctntWCxYcDAm4ekMrfQCjPMMUeuHyO2EDYntrf2Nx8oz HY4iwNj7r8xUtqhj984sZh8q+We6OD/NyyuJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hGn0Yi4S3XFvH/2A8yUb9Bgty9FRvD2Yf3ww9GY3Byg=; b=d7jraOA8Cx/IUBrXrtqAd3U32hMfRvaMH4k8L9fwf91rFaPFPvgrNfMFpIZY55NcdK xFzG0MZWflr+GPm6VHCEPKjV4MMgGJGbQKAnwUfSFUqwOF3ntLH78atB8ve8Te+ETKSu LA9iawcLeiisRP1cDSRciiQZNcNmn+ULdxZZqXnqJLdfOXLjMWP9wo4ttCXtXp9a1Vu2 zlQiKdWjfgpRng9wSEbv2mU+9oBNup8CU95a6XIt+X0if8/yOz0JXsEpw5uosPdFg3yB 96i4Skld2Dg8D8V5v9iRjq3OSV81XpLaiEpMUmM+4GP0dBsEcYOWCr1oGbsMFgui5Ylf ZU4g== X-Gm-Message-State: ANoB5pnkot/gAMuWDhcWMV9kY9O8elrCCqP6dQ/AF7EcmYrmDN9L72pz 9l5OH9qOZBohhOaDp0JErqbxEw== X-Google-Smtp-Source: AA0mqf7MhSeCbG2QDxoYdm6mDkriMSF150jk5fPoqN7Fmbtcfhi5JqHRFX5VQsHCTh+hTZbnYtqzKA== X-Received: by 2002:a17:907:c208:b0:7ad:79c0:547a with SMTP id ti8-20020a170907c20800b007ad79c0547amr34624267ejc.41.1669665120325; Mon, 28 Nov 2022 11:52:00 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-69da-bdfc-6a2b-e036.res6.spectrum.com. [2603:6081:7b00:6400:69da:bdfc:6a2b:e036]) by smtp.gmail.com with ESMTPSA id kz10-20020a17090777ca00b007806c1474e1sm5285867ejc.127.2022.11.28.11.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 11:51:59 -0800 (PST) Date: Mon, 28 Nov 2022 14:51:55 -0500 From: Tom Rini To: Rasmus Villemoes Cc: u-boot@lists.denx.de, Fabio Estevam , Nicolas Bidron , Joe Hershberger , Ramon Fried Subject: Re: [PATCH 6/6] net: tftp: sanitize tftp block size, especially for TX Message-ID: <20221128195155.GH3787616@bill-the-cat> References: <20221014174342.3216982-1-rasmus.villemoes@prevas.dk> <20221014174342.3216982-7-rasmus.villemoes@prevas.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/If7Wv41KAW8wPhq" Content-Disposition: inline In-Reply-To: <20221014174342.3216982-7-rasmus.villemoes@prevas.dk> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --/If7Wv41KAW8wPhq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 14, 2022 at 07:43:42PM +0200, Rasmus Villemoes wrote: > U-Boot does not support IP fragmentation on TX (and unless > CONFIG_IP_DEFRAG is set, neither on RX). So the blocks we send must > fit in a single ethernet packet. >=20 > Currently, if tftpblocksize is set to something like 5000 and I > tftpput a large enough file, U-Boot crashes because we overflow > net_tx_packet (which only has room for 1500 bytes plus change). >=20 > Similarly, if tftpblocksize is set to something larger than what we > can actually receive (e.g. 50000, with NET_MAXDEFRAG being 16384), any > tftp get just hangs because we never receive any packets. >=20 > Signed-off-by: Rasmus Villemoes > Reviewed-by: Ramon Fried Applied to u-boot/master, thanks! --=20 Tom --/If7Wv41KAW8wPhq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOFEVsACgkQFHw5/5Y0 tyxy2wwAkm/Si9VM5XNinnerpE3i5d3MlJzmYHKJoEwfY6QLy5scZHeGXuE4HAAi RqWxijNEq60btZKb/z2Q9qXGrk6hUT99+Dkd3rWJTk6EtCMCaujhC3tJZS5oxwLa LFU1HsslQ/qdDIimVmoBoymRQYTJCQSelsJ+AcOeBPeXWg8KgeRb4kUcbjyBVa59 SGPaKC3s96Tln3yMZo6RP4vVWh2TTDs6fXrBnzncOiPzKxem//+onEVEX6b6+t8o Ukm2ai4E5cqYj1yxATBYG8ivHYUwrVT2DmSXiezHEX2kIx33ZMja2TJMHMTTSQrQ 55bgdr/OdoLgRQvPhSayhb3z/to1rm8df1fwTtwv+ecp407zdyctuuGFrZjFgy29 EVtRrJkW9HgEvEFH+E8EiMDNEChh6uLaIVYCC9rBw2hh0twN6qG5x6fBGuFai+6u cV5F8LyTSBm7AWlKxZobAqq45iJCl8KYrgx9m0n8wudhEp472gIh/uNX+7gePr/t TPFtDN68 =kU1I -----END PGP SIGNATURE----- --/If7Wv41KAW8wPhq--