From nobody Sat Feb 01 14:06:27 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 4YlZLy1fyRz5lWMY for ; Sat, 01 Feb 2025 14:06:50 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4YlZLx1lb8z3Qnk; Sat, 01 Feb 2025 14:06:49 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=nkhJUILh; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::536 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5dc89df7eccso1876664a12.3; Sat, 01 Feb 2025 06:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738418806; x=1739023606; 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=JvvK25xGUYfenib+IPtYf+bPz8ujKw0O/303hLYNSys=; b=nkhJUILhtvHI+x8Dl9FNkihQgFhARMOSvJTc7eTkPaly1s/RjHFqT0209yO1XFxx8/ Utw5hsAxq7L8eCrf3g3pm31B0FE4k5y5mM2HqoFYkdWJ/r3NKlVlAbMUwV/ZWR7exBPA 2T91OhLyiJNh3gJLShdPzfnTPIDCrjkbLx0VvAzwwLI1NG43ujuo3ekswaxeTLL4zSCZ /Z1ELnR6qzRrqStEa+yOuNAZhoDOL4cdrTPozF+LpWvyJX/tYy6kiXKDB6UJWOnLVXsi eNOjsOtprKf3rz93EbWXt7KfE4t4Q1X0qqvR1LppVVR6ZFmSmlhTBqBboV0ZjipFyuQ/ sdow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738418806; x=1739023606; 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=JvvK25xGUYfenib+IPtYf+bPz8ujKw0O/303hLYNSys=; b=D3tTpGQl1lmruC32auCX+bnr5fqLPZaoEIEy+r0bKo3Y4IFCpxRytW50G/el1gP0Eu 1y/gQMSf48075N+AijIe8Lc+pMR4Smx8a01+iWE4a9QJFN2v47KusBZssw0NsiqSbLXy yuuHlVxhzvqLMjpfEQtDWjkCSupvZfnxT+C7xYHCZXyjFpMyMgwE5p0VlNjYmOR74c3d a5jpWRVVo3kGv+TC9RfUqW5SC/YtcJ83pKdfrQC90jW6EZaLm54MEKliffjIppl4R1I1 APEpgzla7eOVXLFmX7g3sCjEPit2wHJ1i6SKBeBuPLwJoWaQmgJ0zIu1RVUwem/kNQUK BMfA== X-Forwarded-Encrypted: i=1; AJvYcCU7HSkaOcwkK+ZT4UhheSNyStu3AIYZEdXm4dpmX70d6r2WEXCIKo3MObBrjInCiVF4nESuTQb6oQ==@freebsd.org X-Gm-Message-State: AOJu0YxThSxQON0dTc9TnIffXyq2vC98jnTtEyoQkuHTl3cohl/mNii4 +VatIgHCM0BHXCpYCpgdHvgag2fhtooEf4ItdSOT1XY0IS8rA1iABpBrxn+eLo8qJ6teAiQXSYt WM9s3W35v1V2Jv8CD6P30WYPuGUX9 X-Gm-Gg: ASbGncvnT+Zby7cNVdLIt7GN3cDG3XtkMsim+W6ig91WxJt3lL+FjVHsBmHZE9EJmv6 P6wRDs51CXzg5BVX619ujElSzTn6alsXEULerkEzSlz+8iJVjPHg7wjSzJkTiu+4eiE4nZ1Ra+J 8aXbeLSTjuZSGUn6fwyW8Fkgo4zmCf3Q== X-Google-Smtp-Source: AGHT+IFBTZEk3QlylQOptK4KoHxM0Kx1psZTGqY9z4lEh9HACAzzGY88+QfwnKUBxam9WQ+AD1XOUBnfPFlo2wp/N44= X-Received: by 2002:a05:6402:13cc:b0:5d0:abb8:79d with SMTP id 4fb4d7f45d1cf-5dc5efbd4b8mr16134565a12.14.1738418804961; Sat, 01 Feb 2025 06:06:44 -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: Sat, 1 Feb 2025 06:06:27 -0800 X-Gm-Features: AWEUYZle4W-NS1Ee2nz_dl1XTnv2OFdgj_DC_o9j0yD9NF75oxWyvsYDqaHWMow 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 [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; 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:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_FROM(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::536:from]; 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)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4YlZLx1lb8z3Qnk 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! Good work getting all this committed! You might want to put an entry in UPDATING noting that the daemons need to be upgraded with the kernel. Thanks for all your work on this, rick > > -- > Gleb Smirnoff >