From nobody Thu Jan 23 22:42:54 2025 X-Original-To: current@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 4YfGDx3SnBz5lZJ8 for ; Thu, 23 Jan 2025 22:43:13 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfGDw3z28z3Zs0; Thu, 23 Jan 2025 22:43:12 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=eqmvfptg; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::533 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5db689a87cbso2975089a12.3; Thu, 23 Jan 2025 14:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737672191; x=1738276991; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4MpLFY7HS4jJUqdJwaGiLT82OE2Ua8pBxdkCoYjhrK4=; b=eqmvfptgug3fsiRFoSNN4H3wSyopGxdaU52TpkDw3+akNbabePwLz3tZHBBVVq2ERc x6NmP3MxkOlyfkvw3y2dz3a1vcXHX0KuprmzZgmPcWJTB8Qu6wttK6/dWvmXTmmbQGdM pbFFJrHMPue98habw7j2QG+ozNTocIEDKxaDCYbWgPL+b09sIndILEkBSm8Uy/gbgjQ/ lT1/Gcl5VcV37EnjdkSZORqU7vQdEHTHOha1iCHkq6aAk4mTxy2qh2SIj+VUCQ4FKfbD GSKlpho9c38LQQDjKZ818TmcW6NPzldMihpl8mvbLEjMkG1h3WaX6E/k3FvVEE3xMT2G DX+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737672191; x=1738276991; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4MpLFY7HS4jJUqdJwaGiLT82OE2Ua8pBxdkCoYjhrK4=; b=t7bBMyt5MZg2TohvjgG6KTwIM3dg3nveW8QRbhTrbmegC58RkZwpwZ5wNwag+E9VKD o9rwyZjKxqM28PqFEJOItCIxU4aZ2Gam5Nr/0Y9peyMQTAERLlagD4CkdJaivW/klmiy KB8zXnf+hlW8/0mO8kkvEoQxAAmsAVcnPgrnlhhZq7MxDoF4SZ/JsmxSIs132iHOcNYz ZWisfb3O47Fx1GyyQRRfOzDDiHN1oTKOlveHMsKmCSExM4HoMG1uSPkwGmjk3s/x2jsf EwZEwSPinNVeH4Y299OGfXKc0TRaB1lISi8Ift8BLK4ltxN/4uzcplgKAEmBAIrtl+WI 0otg== X-Forwarded-Encrypted: i=1; AJvYcCV+39sbm+Z8KR55syx3/b2vPdZly7VJRae1e6bhQ562Lz9JYsKo2jA5iRwbnI4nqfu3wdxo3VJqOA==@freebsd.org X-Gm-Message-State: AOJu0YznQwrIoUCBjAcxoaP42dw2yZ7/Vi53pxZTqhqYRL4BSqbWhit/ TS1ipjjAXZsBxpZGdQhVMG5fr6Y6aP9G+WDywABST7AS+HUVv9rylbGZ7XE2Uq5ZrGT+hS0uBEZ 5jhJs7eprn7g32RH2y65T/oUKLSBB X-Gm-Gg: ASbGncuB3fZeqBU8HFFa5shDPB8KpapjmmljrubeG/GMHo98mVatBlu8jnLxUI1sCV/ mobC6Kpxx0tE+LwqM0E85Gjkka1mfTbX1+RE2shQtCK5qgccxeDiz53lK5q0cy0IygwuPAVD2Ou rVrR1G+TZmX+SQrVaeLPY= X-Google-Smtp-Source: AGHT+IHZLQUtiyJnkqLbjJxvonEdvam7NfM/7WDtvnLswhsPpIH0MNq3q1GM+D5rW/bQAmIOUyY9PO6UdyQyXE5L8mg= X-Received: by 2002:a05:6402:27cb:b0:5d9:f0d8:22e1 with SMTP id 4fb4d7f45d1cf-5db7d2f0b26mr26302605a12.9.1737672190763; Thu, 23 Jan 2025 14:43:10 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Thu, 23 Jan 2025 14:42:54 -0800 X-Gm-Features: AWEUYZm6G-yrKO6fORbUJ4iie9nio2e3QOHnaFAEUkXlGaQgrrDyHV0r63lo5aA Message-ID: Subject: Re: HEADS UP: NFS changes coming into CURRENT early February To: Gleb Smirnoff Cc: current@freebsd.org, rmacklem@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.985]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[current@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::533:from] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4YfGDw3z28z3Zs0 On Tue, Jan 21, 2025 at 10:27=E2=80=AFPM Gleb Smirnoff wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > Hi, > > TLDR version: > users of NFS with Kerberos (e.g. running gssd(8)) as well as users of NFS= with > TLS (e.g. running rpc.tlsclntd(8) or rpc.tlsservd(8)) as well as users of > network lock manager (e.g. having 'options NFSLOCKD' and running rpcbind(= 8)) > are affected. You would need to recompile & reinstall both the world and= the > kernel together. Of course this is what you'd normally do when you track > FreeBSD CURRENT, but better be warned. I will post hashes of the specifi= c > revisions that break API/ABI when they are pushed. > > Longer version: > last year I tried to check-in a new implementation of unix(4) SOCK_STREAM= and > SOCK_SEQPACKET in d80a97def9a1, but was forced to back it out due to seve= ral > kernel side abusers of a unix(4) socket. The most difficult ones are the= NFS > related RPC services, that act as RPC clients talking to an RPC servers i= n > userland. Since it is impossible to fully emulate a userland process > connection to a unix(4) socket they need to work with the socket internal > structures bypassing all the normal KPIs and conventions. Of course they > didn't tolerate the new implementation that totally eliminated intermedia= te > buffer on the sending side. > > While the original motivation for the upcoming changes is the fact that I= want > to go forward with the new unix/stream and unix/seqpacket, I also tried t= o make > kernel to userland RPC better. You judge if I succeeded or not :) Here a= re > some highlights: > > - Code footprint both in kernel clients and in userland daemons is reduce= d. > Example: gssd: 1 file changed, 5 insertions(+), 64 deletions(-) > kgssapi: 1 file changed, 26 insertions(+), 78 deletions(-) > 4 files changed, 1 insertion(+), 11 deletions(-) > - You can easily see all RPC calls from kernel to userland with genl(1): > # genl monitor rpcnl > - The new transport is multithreaded in kernel by default, so kernel clie= nts > can send a bunch of RPCs without any serialization and if the userland > figures out how to parallelize their execution, such parallelization wo= uld > happen. Note: new rpc.tlsservd(8) will use threads. > - One ad-hoc single program syscall is removed - gssd_syscall. Note: > rpctls syscall remains, but I have some ideas on how to improve that, t= oo. > Not at this step though. > - All sleeps of kernel RPC calls are now in single place, and they all ha= ve > timeouts. I believe NFS services are now much more resilient to hangs. > A deadlock when NFS kernel thread is blocked on unix socket buffer, and > the socket can't go away because its application is blocked in some oth= er > syscall is no longer possible. > > The code is posted on phabricator, reviews D48547 through D48552. > Reviewers are very welcome! > > I share my branch on Github. It is usually rebased on today's CURRENT: > > https://github.com/glebius/FreeBSD/commits/gss-netlink/ > > Early testers are very welcome! Unfortunately it looks like I won't be able to test this until after it is committed to main. Since there are library changes, etc, it appears that it will need a "make buildworld". On the laptop I currently have running it, this will take about a week, if it finishes. (I usually do "make buildworld"s on the universe machines, but since all I currently have is flakey wifi, I don't think that is practical either.) Once there is a snapshot of main that has it, I can download and test that. I will try and take a look at the stuff in phabricator, but given the size of it and my lack of knowledge w.r.t. netlink, I doubt I'll have much to say about it. Hopefully someone else can do some review/testing? rick > > -- > Gleb Smirnoff >