From nobody Mon Dec 13 14:24:49 2021 X-Original-To: freebsd-hackers@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 0ECE518D9BA1 for ; Mon, 13 Dec 2021 14:25:24 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 4JCP1H1fWqz3L6Y; Mon, 13 Dec 2021 14:25:23 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lj1-f171.google.com with SMTP id k23so23970394lje.1; Mon, 13 Dec 2021 06:25:23 -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=4Kg0xCGAxQmATkd/NIu0M0pKXUjIwIzdfkSnGUIrHhA=; b=AzrBk1LBlhnaQAMWrVNreahG2u2QvF+pSI+1I6SlZWx7/NnKvE7SdVDIDGrQSOhTcQ 39BiqD516kUuAEzdqhBB58AsIZ9N8NeFSX+jsvoqAvxEfrMl201wALgyV1AqlJCchEXX VO68jPMlWbP/LAK0mBA7iOr7MGHpuz8qC9NCvPuEM77LuMe/EXahrgdwIzdWz7hmhENy wIDZLwwAaMiKWO3nr2wPYc7+KHlUYMb/O5TYd5f7RbUE7j8yuTSSunpDs/Bs4j+9Y74K N3SOC8ulrnfrZ+pUqZMauPp8J+ehhlOs73VKp8lqD4t8pbaOZXqslTeKOqst4uUXMco2 lpZA== X-Gm-Message-State: AOAM533VinPFfuoPBGcAZY8XF7mDK7FwlY/9yhc99GV7W38n/aKeHde0 tUrQ6oiUQIXzuq2PIr3aA7walOA51tus6w== X-Google-Smtp-Source: ABdhPJyFQ+PXwntpPt0Yf6EH2lGdouW0MHVOoiRtI4T1LLtqbwSpFaxO/Oapw0Abq4TFZM+y+sVohQ== X-Received: by 2002:a05:651c:4ca:: with SMTP id e10mr29318786lji.101.1639405516371; Mon, 13 Dec 2021 06:25:16 -0800 (PST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id o15sm1456114lfd.164.2021.12.13.06.25.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Dec 2021 06:25:15 -0800 (PST) Received: by mail-lf1-f50.google.com with SMTP id e24so5442232lfc.0; Mon, 13 Dec 2021 06:25:15 -0800 (PST) X-Received: by 2002:a05:6512:3405:: with SMTP id i5mr28810704lfr.471.1639405515542; Mon, 13 Dec 2021 06:25:15 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Mon, 13 Dec 2021 17:24:49 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: What to use in place of abstract unix sockets? To: Alan Somers Cc: freebsd-hackers Content-Type: multipart/alternative; boundary="00000000000065945e05d307d7fc" X-Rspamd-Queue-Id: 4JCP1H1fWqz3L6Y X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.208.171 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-1.99 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.992]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.171:from,209.85.167.50:received]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.171:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y --00000000000065945e05d307d7fc Content-Type: text/plain; charset="UTF-8" On Sat, Dec 11, 2021 at 8:02 PM Alan Somers wrote: > Since socketpair() doesn't work in this case, why not just use a UDP > socket bound to 127.0.0.1 ? > This would introduce a bit of overhead as the packet would pass through the IP stack. Another problem is that the current code uses SOCK_STREAM socket type, which isn't supported by the UDP protocol. Maybe this would work with SCTP? Anyways, I'm going to try this only as a last resort. OK, so far my options are: 1. Mount the directory containing UDS into chroot with nullfs. 2. Use PF_INET. 3. Do kernel-hacking and implement abstract sockets (as well as remount-to-readonly support for nullfs). I'd go straight to #3 but with my skills/free time this would take a lot of time, so I'm going to try hacking it around with #1 and #2. Thanks everyone for all the suggestions. --00000000000065945e05d307d7fc--