From nobody Thu Dec 02 21:10:10 2021 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 D777918C7DD6; Thu, 2 Dec 2021 21:10:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4pWm5jwvz3Kw6; Thu, 2 Dec 2021 21:10:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f41.google.com with SMTP id n104-20020a9d2071000000b005799790cf0bso1373293ota.5; Thu, 02 Dec 2021 13:10:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SuVbAkIqH1EQOz64zWYUMLd0nRQ3T+wvIlO6l9gyv1Y=; b=4U/jx0KPCXMlgJiXovBlkuH2HMpUBnt5cpVLBetRn+p9bG9aDerRgHRScZd/K7XLxA 0UzTC0wRD2/pZt+8OW70OkEkE1gkwKhAUW4lJ0l6AGkd+AqRgIG4nE6SzFoFfuFetgcv mu+/DeqXr5VLcFs9DDNncSeVxDrEpe5rv17eKxE4JJTMtdmVwb2+uV3GaaV4exfD2YzZ rYhx5mTS9yiOBBiT71o7GANKD4RvULaXVey5cNL+VtxbBgkCHxTn5nN2LTPpyCsjzbvf /haCt1AFIcqNgUu3pjEkz4nJbXX5bZyHdznAfVLlZ6rZt6UIm1sI/J4P6vbK+5h68v+N vOaQ== X-Gm-Message-State: AOAM5321yEXxFTmT+/AUQujT6ZuId4YBN8wPkXlYW/NTXJjXwt8gKWKs qjLn/TJSwvvYvdJs8zcn8TmT7BZ4mShQrO+Kkc45aQzl X-Google-Smtp-Source: ABdhPJxeWJ8itaPuJr6v5COVvj1HqqOJhVMWhCr3ZbbOeeCkEIWCPxwbB3onnwA+z53sQuRoXHuY32/HOk2ZQdJKoyM= X-Received: by 2002:a05:6830:19c8:: with SMTP id p8mr13385081otp.111.1638479421720; Thu, 02 Dec 2021 13:10:21 -0800 (PST) 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111301812.1AUICgqZ088428@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 2 Dec 2021 14:10:10 -0700 Message-ID: Subject: Re: git: 943c446629e3 - main - Revert "libc: Some enhancements to syslog(3)" To: Gleb Smirnoff Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4J4pWm5jwvz3Kw6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Dec 2, 2021 at 2:01 PM Gleb Smirnoff wrote: > > On Tue, Nov 30, 2021 at 06:12:42PM +0000, Alan Somers wrote: > A> Revert "libc: Some enhancements to syslog(3)" > A> > A> This reverts commit 2886c93d1bca231260ebc01d4205743ca781f3c7. > A> The original commit has two problems: > A> > A> * It sets SO_SNDBUF to be as large as MAXLINE. But for unix domain > A> sockets, the send buffer is bypassed. Packets go directly to the > A> peer's receive buffer, so setting and querying SO_SNDBUF is > A> ineffective. To ensure that the socket can accept messages of a > A> certain size, it would be necessary to add a SO_PEERRCVBUF socket > A> option that could query the connected peer's receive buffer size. > > I'd rather say we don't need SO_PEERRCVBUF. The SO_SNDBUF on AF_UNIX > should transparently to the application look and report peer's receive buffer. > > -- > Gleb Smirnoff That would work too. But the devil is in the details. Would the socket buffer's size be adjustable via both endpoints? Are there any security or setrlimit issues in allowing an unprivileged client to change the socket buffer size of its connected privileged peer?