From nobody Thu Dec 22 17:45:29 2022 X-Original-To: freebsd-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 4NdHlp1mD4z1H5MQ for ; Thu, 22 Dec 2022 17:45:42 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0: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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NdHln3n7bz44V3; Thu, 22 Dec 2022 17:45:41 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=JlZxq15t; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pg1-x536.google.com with SMTP id 79so1773320pgf.11; Thu, 22 Dec 2022 09:45:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FYi7mdlWAfaIS+D9bTziHF3l0579wthd+q0YWyJgFaY=; b=JlZxq15t1ffyVyExYBHRmgolGVwEwaCkOFevfNM7A+aTk7636A3OZt5NZ98qSxT5q2 THLjWrXDFrEZHRUWKr3jO4Dh6BbAgkA/fNayKnC4OJqBnu7AklsFYM0KUMEhZm1/sKrG 4BRWuepQQXtm/6Hno5SmfWqAUERjyCaypUWRX2oP1ggYF8kIbqD42m1VD2NnVWV4oJGN QcC4DDcxXHHth7Twbb5e3XHfgHVcjg9LEQ501iVkJ4M6MWy+o/RUDkS83ErR2Y0wTohK jXfyTQL58qEvp13qMAuY37/rgFsbqLcQQZDTEwHUSiC9EHRrXalBrI18wE4QfpsB666g R/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=FYi7mdlWAfaIS+D9bTziHF3l0579wthd+q0YWyJgFaY=; b=qXSfK6hP7+3ysEiTinXghxL3H6EVy+apBLV5ixXdHL6KyVnE2seSg3cpdWyo3czPg7 e5rD/wsGBtHW8bM6a4PHCoMRcCkzqhg8XGDZYtnqBbes00AFLun4fXJNnjzu5txvJiWi CcgqG8QZEIGzvB3pz4EtfAITgDqJ802pJFzdVu0Fx4of9ksBnMjrbSrAWEMHhBsv/4nF W/PJVpt2mG6KudQApMyNwR3kW98pLt4w4qT/SD2WkUnM5rvkCovLLr/SiCMVeBqdQs+/ 7+DisJfO67N2vNPrgZ8uKXJ1iMdVapd8I33IQvnKKtUbhXJzbw6L8ANz7chJdElb1BHJ Ou8Q== X-Gm-Message-State: AFqh2kq/gncywyYwPmOzj2SBR56O1C6Z1WDpMGpUuqCHLYXkRt61o4S5 mlJ8DdXxUt3ZgERoeTHoOOVR4wpc8B+dnbJbEp0Q6T02+A== X-Google-Smtp-Source: AMrXdXupdcJfNFuhp5cI848gn7GHBasnqjKdy6lhtH/vZXB+Ar9mkHm4Tqcwf5r8Ub/oFWdc9TwLZ5d6elLb7QMYcDk= X-Received: by 2002:a62:e912:0:b0:579:6402:5b39 with SMTP id j18-20020a62e912000000b0057964025b39mr403906pfh.11.1671731139974; Thu, 22 Dec 2022 09:45:39 -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: <1955021.aDjkhKmpDe@ravel> <8351812.Gc231LQI4k@ravel> In-Reply-To: From: Rick Macklem Date: Thu, 22 Dec 2022 09:45:29 -0800 Message-ID: Subject: Re: RFC: nfsd in a vnet jail To: "Bjoern A. Zeeb" Cc: Konstantin Belousov , James Gritton , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c21b6105f06e3cdf" X-Spamd-Result: default: False [-3.86 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.86)[-0.859]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::536:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4NdHln3n7bz44V3 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000c21b6105f06e3cdf Content-Type: text/plain; charset="UTF-8" On Mon, Dec 19, 2022 at 9:36 AM Bjoern A. Zeeb wrote: > On Mon, 19 Dec 2022, Rick Macklem wrote: > [good stuff snipped] > > Unfortunately, this does not deal with vnet'ng the kgssapi, rpcsec_gss > for > > Kerberized mounts or vnet'ng NFS-over-TLS, but those could be handled in > a > > similar manner, I think? > > Could be, yes. > > I have now created a patch for the NFS-over-TLS part of the krpc. It uses the same technique, except the macros are called KRPC_VNETxxx instead of NFSD_VNETxxx. The patches are in phabricator as: D37519 - Most of the changes. D37777 - The krpc changes for NFS-over-TLS D37741 - The vfs_mount.c changes in D37519 Although I listed a few possible reviewers, anyone is welcome to test and/or review them. The patches are also here (in a form that "patch" might prefer): https://people.freebsd.org/~rmacklem/vnet.patch https://people.freebsd.org/~rmacklem/vnetsmall-rpctls.patch rick > > > So, what do others think of this alternate plan? > > > > rick > > ps: Every use of the vnet'd variables is currently wrapped in a macro > called > > NFSD_VNET(), so the change is pretty easy to do by just re-writing > this > > macro. > > > > -- > Bjoern A. Zeeb r15:7 > --000000000000c21b6105f06e3cdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Dec 19, 2022 at 9:36 AM Bjoern A. Zee= b <bz@freebsd.org> wrote:
On Mon, 19 Dec 2022, = Rick Macklem wrote:
[good stuff snipped]
> Unfortunately, this does not deal with vnet'ng the kgssapi, rpcsec= _gss for
> Kerberized mounts or vnet'ng NFS-over-TLS, but those could be hand= led in a
> similar manner, I think?

Could be, yes.

I have now created a patch for the NFS-over-TLS part of the krpc.<= /span>
It uses the same technique, except the macros are called KRPC_VNETxxx
instead of NFSD_VNETxxx.

The patches are in phabricator as:=
D37519 - Most of the changes.
D37777 - The krpc changes for NFS-ov= er-TLS
D37741 - The vfs_mount.c changes in D37519
Although I listed= a few possible reviewers, anyone is welcome to test
and/or review them= .

The patches are also here (in a form that "patch" = might prefer):

rick
=C2=A0

> So, what do others think of this alternate plan?
>
> rick
> ps: Every use of the vnet'd variables is currently wrapped in a ma= cro called
>=C2=A0 =C2=A0 NFSD_VNET(), so the change is pretty easy to do by just r= e-writing this
> macro.
>

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7
--000000000000c21b6105f06e3cdf--