From owner-dev-commits-src-main@freebsd.org Mon Feb 8 17:46:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1C5A53B012; Mon, 8 Feb 2021 17:46:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZD3D4SXLz4Ygg; Mon, 8 Feb 2021 17:46:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf36.google.com with SMTP id l11so7345011qvt.1; Mon, 08 Feb 2021 09:46:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bQMytWM/pnpVjPKwaz1Dl70pX7vs5uBTHG3Olt1nBGk=; b=rPU4yjvAa4Oe1GPuE7qt5rGw9YS9ygO8BKfEymtzqxnh/MIY5xEfe7M6reEc02+EoT rJexHn6jOi/wbQqXx653HEaCSevAIFrEDBRDpx7vblblta2eTQFz28/r+TRS3DtSuMwI wOPETOXULZfVz/vRApdj/EffOJNF6X3xg4zzhpCPGrsGokn/ewul7VQpKOY+jv9SLuh/ K7CmBmgklznGug4pSGzOg2A5nOc2T0ezfPMpduNIn5z1NmTBWKNmty+4sS9Oq3hy9efZ LZrFFHouEybz/4zq84cXwwCtkivA2CkqfFrwbMM5tEsE2EQLsws33NxrNRQV2CLLwR2P cWdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=bQMytWM/pnpVjPKwaz1Dl70pX7vs5uBTHG3Olt1nBGk=; b=jvrCPYANaL5FfGScr/S1dWkG9sYjbO1LTcWOasSvue7n4QuUoTenj5PdN81OJsQOzp 7runGaAYgM5XK5J8/JcVt6+1IxxhjH6/AeY8HQQaEEVJ5dRhXX+Oy98LAq14OtOjkgVV qD+u810Dr9mUYOGSC6hdvC0eLFx4cNLCnp43Y7kWrbx6sZ09qEmJ+s+0qNGlAukUewyh ph1WOkzaQbi1k2MJ+xW9oS/oJmlETLdIHRmWj3N3E54DXoCjwwFdu/iwYd6MB5PQoFyt UA2x2ovY/3/m4s4pQ76FFj8iV1SwqIBo17v3oqfeRNtlFlO2yC8ENQCdbizT6P2/JW7d zTZA== X-Gm-Message-State: AOAM530FjjH+XvkgPP1EcmGd51dPyZxSfnrivUOVL4VPNrr5jETw4qNk 9auFIbXyIchiOD74ouA926BI+GsZaks= X-Google-Smtp-Source: ABdhPJyqky6xeCXSgfK7iFWllnNSMMoeCY7i2cbeTfKQCYL/tfVmDNKLWWIMGQ+jv+GxOs8m3RwHpw== X-Received: by 2002:a0c:e302:: with SMTP id s2mr4681962qvl.45.1612806375861; Mon, 08 Feb 2021 09:46:15 -0800 (PST) Received: from raichu ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id l66sm423301qkd.21.2021.02.08.09.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 09:46:15 -0800 (PST) Sender: Mark Johnston Date: Mon, 8 Feb 2021 12:46:13 -0500 From: Mark Johnston To: Lutz Donnerhacke Cc: Lutz Donnerhacke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 45d75e3ac3fb - main - netgraph/ng_base: Allow larger BINARY2ASCII conversions Message-ID: References: <202102081335.118DZB5F024911@gitrepo.freebsd.org> <20210208160817.GA4953@belenus.iks-jena.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208160817.GA4953@belenus.iks-jena.de> X-Rspamd-Queue-Id: 4DZD3D4SXLz4Ygg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 17:46:16 -0000 On Mon, Feb 08, 2021 at 05:08:17PM +0100, Lutz Donnerhacke wrote: > On Mon, Feb 08, 2021 at 10:18:06AM -0500, Mark Johnston wrote: > > On Mon, Feb 08, 2021 at 01:35:11PM +0000, Lutz Donnerhacke wrote: > > > The branch main has been updated by donner: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=45d75e3ac3fb5bf8230ca28dc09b48c6e5ed7a4f > > > > > > commit 45d75e3ac3fb5bf8230ca28dc09b48c6e5ed7a4f > > > Author: Lutz Donnerhacke > > > AuthorDate: 2021-02-07 21:07:34 +0000 > > > Commit: Lutz Donnerhacke > > > CommitDate: 2021-02-08 13:31:58 +0000 > > > > > > netgraph/ng_base: Allow larger BINARY2ASCII conversions > > > > > > Allocate the necessary memory for the conversion dynamically starting > > > with a value which is sufficient for almost all normal cases. > > > > Is there some upper bound on the length of the input message? > > Yes. Quote from D23840: > > : Of course, to transmit the data via the ng_socket, the buffer sizes needs > : to be adjusted manually. > > : net.graph.recvspace: 204800 > : net.graph.maxdgram: 204800 > > : To transmit arbitary large data, it's better to change the ng_socket > : interface (incl. libnetgraph), but that is out of scope of this issue > : here. Ok, thanks. I looked through the review but missed this. > > If not, a sufficiently large input looks like it could cause an infinite > > loop by triggering overflow in the bufSize *= 2 calculation. > > That's a valid point. Thank you. > > > I also wonder why the same change was not made for ASCII2BINARY. > > Because it's usually a compression. If you are able to send the ASCII > message, the binary message is shorter and will match anyway. But to answer > your question: It was not part of the PR, it's an nonissue. Ok.