From nobody Sat Dec 11 16:55: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 053BE18DAD4D for ; Sat, 11 Dec 2021 16:56:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JBDSK4ydDz4XNX; Sat, 11 Dec 2021 16:56:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1BBGtnn2045131 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 11 Dec 2021 18:55:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1BBGtnn2045131 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1BBGtn4r045130; Sat, 11 Dec 2021 18:55:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 Dec 2021 18:55:49 +0200 From: Konstantin Belousov To: Eugene Grosbein Cc: Gleb Popov , "Daniel O'Connor" , freebsd-hackers Subject: Re: What to use in place of abstract unix sockets? Message-ID: References: <58874E76-8541-46BF-A197-C984D6A869DF@dons.net.au> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4JBDSK4ydDz4XNX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On Sat, Dec 11, 2021 at 11:20:33PM +0700, Eugene Grosbein wrote: > 11.12.2021 16:59, Gleb Popov wrote: > > > EXDEV: Cross-device link > > > > This might be because the chroot's target directory is an nullfs mount. Am > > I right that it isn't possible to create hard links that span nullfs mount > > points? > > It is not possible to create hard links for source and destination directories > with different st_dev values as per stat(2), this includes nullfs, > each of which has its own st_dev id. The VOP_UNP_BIND() and VOP_UNP_CONNECT() vops are bypassed to the lower fs. It means that if you bind(2) or connect(2) on unix domain socket that is visible through nullfs mount, effectively you are doing the bind or connect operation on the lower filesystem. That said, implementing 'abstract' unix socket addresses would be nice.