From nobody Sat Apr 5 01:04:25 2025 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 4ZTy196NvYz5sjGh for ; Sat, 05 Apr 2025 01:04:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 4ZTy186yR1z3pZV for ; Sat, 05 Apr 2025 01:04:28 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=dzpAbqU3; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3d45503af24so23781345ab.2 for ; Fri, 04 Apr 2025 18:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1743815067; x=1744419867; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wIbzQVy9s/iXHCemJ7tXHEy2j//iu11sNi4izBiHS5Y=; b=dzpAbqU3d+1/Yah+qm+A/70bSCwg2ymUKlqMSQG+UoWUA7a1kiuw/VIOfDHwzdwU0A xuKIeDmE/0pZSxb38bL6RGcw6j/KofAJ06d3NHjGHZxdreAT5XGf8X1LsPkGOirITVvc tOE3d8UQBEN3ODqf8PlL0bq+ocls6XGSIZIMqgJEUFF9MPTzCYINDHFnmgai3443XYaz wYnahiVZJpXua5uFVFRKb4LF6RD94GUlo9AUTigUyjZeDfQnmfyKzMUzDZG34N9PSv+r 318aPChBVBWXgT5OYNB0Lf61HYpSPVL/sgr5Rbz16B6E1dts8MEUAem1/JoOQX3eCi6b FD2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743815067; x=1744419867; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wIbzQVy9s/iXHCemJ7tXHEy2j//iu11sNi4izBiHS5Y=; b=KOrP2BUg0cYwtfLYXo8g+rHsYJ4420a7ulbHw0vJ350+sjOJBZlShipFWSPxtEQarW orYLywDr2gC/PHkXj38xpiuDr7pDB2Eixo7gwipMzVntVET39o5PD11RTMx7MHykqRrF QBhno669LmrQa7CAA8+Uj6RinnZXx4qps/A4jlRBZVbYYoLoDHOxSKH8lVwIUwEVydWD c5apDMdGSqt/OyZo34SkeLt1eJUZHxqgzIaZf98LM7d2uzW4fFVH1q8tI/6T0SwJ19km FGhUERpzkNEQfy9KRQThSeDvx0tGVdB514j0Ql28j1tD3xWHQ3k0jYqcphHhZCXR4GNo 09mw== X-Gm-Message-State: AOJu0YyrfrSLXjLAI2UEvOX49dsIFA8gxn98VsGpjaY6HG8WitRV5CgH 2LQa22B2YCDPwdnVqPrO/k4cmFF3dOfIFHXNUk1avdl1942Dowwm9m+K3x8r6wPpQ4iike0RbAo 3OEQ= X-Gm-Gg: ASbGncvfgYfiAPc7c4LBMFQ3Tc1xRRkedx9E6XJHUa46K8xIT0okZ+xaNaUXXcTmviK J//APSalBr4vUSePWJxrhsqsUozxF4mvqOMxoClvVtgw60SfFEyATsuh1F0z87y/0qbuZSH/O6Z sPaWj7Utbbc9N3fn64R6jk8zewFcpsbs1pK+lXbfixlTYHwm9ReNU51syy5byH/EdwOlMN0U2B7 OiF6weZULvMkLiqUuKVEdILB8mJpOKh1aqve/pYwitpWDsIt2mWItLurA91mT8e+oSGON01qFj7 1PAxPutJ+hdB979NQZm/d6tYkrM= X-Google-Smtp-Source: AGHT+IGLM44Ir9rQIkYBlE02nrAHTA2wycoeMS6eVX9bDVDYHAd/JmGQqM+J3ooVTGJPgSgSml+xCA== X-Received: by 2002:a92:c24f:0:b0:3d3:dcfd:2768 with SMTP id e9e14a558f8ab-3d6e3eea7d0mr66030135ab.4.1743815067455; Fri, 04 Apr 2025 18:04:27 -0700 (PDT) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d6de972df9sm10878655ab.66.2025.04.04.18.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Apr 2025 18:04:26 -0700 (PDT) Date: Sat, 5 Apr 2025 01:04:25 +0000 From: Shawn Webb To: Rick Macklem Cc: FreeBSD CURRENT Subject: Re: Heads Up: commit 2ec2ba7e232d just hit main Message-ID: <2rq3bpvhclcipvgg3mo4gml7ysuzbvt6rfnzkprceumzeaeh4b@casrpprm6mgt> X-Operating-System: FreeBSD mutt-hbsd 14.2-STABLE-HBSD FreeBSD 14.2-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yq5cf7pzbpfqy27c" Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-4.43 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_HAM_SHORT(-0.33)[-0.326]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; DMARC_NA(0.00)[hardenedbsd.org]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::130:from] X-Rspamd-Queue-Id: 4ZTy186yR1z3pZV X-Spamd-Bar: ---- --yq5cf7pzbpfqy27c Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: Heads Up: commit 2ec2ba7e232d just hit main MIME-Version: 1.0 On Fri, Apr 04, 2025 at 05:40:21PM -0700, Rick Macklem wrote: > On Fri, Apr 4, 2025 at 10:50=E2=80=AFAM Shawn Webb wrote: > > > > On Thu, Apr 03, 2025 at 06:12:59PM -0700, Rick Macklem wrote: > > > On Thu, Apr 3, 2025 at 4:52=E2=80=AFPM Shawn Webb wrote: > > > > > > > > On Wed, Apr 02, 2025 at 01:51:26PM -0700, Rick Macklem wrote: > > > > > The commit 2ec2ba7e232d just hit main. I do not think it will > > > > > cause problems, but it is fairly large. > > > > > > > > > > Man page updates will be done as separate commits. > > > > > > > > > > Hopefully this will not cause grief, rick > > > > > > > > Hey Rick, > > > > > > > > The patch review test plan mentions a patch to ZFS itself to support > > > > named attributes. Is that patch available somewhere? > > > The ZFS patch is currently in phabricator as D49654. > > > Feel free to review it. > > > > > > It can also be found at: > > > https://people.freebsd.org/~rmacklem/zfs-xattr.patch > > > (this is a smaller diff which can be applied to an up-to-date main src > > > tree easily) > > > > Hey Rick, > > > > I applied that zfs patch, but trying pathconf(2) on a file on a ZFS > > dataset with xattr=3Don (which seems to be the default) returns 0. Am I > > doing something wrong? > > > > =3D=3D=3D=3D BEGIN LOG =3D=3D=3D=3D > > hbsd-current-01[shawn]:/home/shawn/tmp $ ./xattrtest xattrtest > > xattrtest: Named attributes not enabled: No error: 0 > > hbsd-current-01[shawn]:/home/shawn/tmp (1) $ zfs list /usr/home/shawn > > NAME USED AVAIL REFER MOUNTPOINT > > rpool/usr/home 10.4G 71.4G 9.85G /usr/home > > hbsd-current-01[shawn]:/home/shawn/tmp $ zfs get xattr rpool/usr/home > > NAME PROPERTY VALUE SOURCE > > rpool/usr/home xattr on default > > =3D=3D=3D=3D END LOG =3D=3D=3D=3D > > > > That xattrtest application is yours from: > > https://people.freebsd.org/~rmacklem/xattrtest.c > No idea. It works for me. You used up-to-date kernel sources? > (Check that VIRF_NAMEDATTR is defined in sys/sys/vnode.h.) > Oh, and one more thing to check. zfs_xattr_compat needs to be non-zero. > (It's found in sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c. > It's initialized to 1 and I don't see anything that sets it to 0?) It is indeed set to 1. >=20 > The only thing I can think if is, if you changed xattr to on, you need to > reboot (or at least remount) to get it to take effect. > (Maybe try setting it to "dir" and then reboot/remount. Maybe there is > a difference between "on" and "dir"?) Yeah, tried rebooting and still no go. Note that xattr defaults to "on" in FreeBSD by default. My src tree is synced up to FreeBSD commit 7e70d94acd68b3ac6b45f49d4ab7a0f7867c3ea7. I brought in the ZFS patch you linked to. >=20 > Or, did you build zfs.ko some other way than as part of a kernel build? > (It needs the patched .h files in the kernel sources, not something in > /usr/include/sys > that has not yet been updated.) > All the ZFS changes are #ifdef'd, since OpenZFS requires the sources > build for older kernels. (Basically #ifdef'd on that VIRF_NAMEDATTR menti= oned > above.) Perhaps I need to do a clean build. I'll try that and report back. >=20 > It does remind me that I need to try a build of zfs.ko by doing a "make" = in > the module directory. >=20 > You can try the attached trivial patch and see if it spits out "pathconf = ret=3D1" > on the console. I'll try that after a clean rebuild of the kernel. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --yq5cf7pzbpfqy27c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmfwgZMACgkQ/y5nonf4 4fqXzw//c+q0dKh9EREqE5H1OWhaOG2iwjeIjWSVrlS25PTPEOYQQeFNK2MeCH+9 qSKgmdI/IyPZ+XUfgRmuRWBWI9lQgh3n+Hhmj4CSvlPHgbC2Z3hqbeb/Auuie6C7 QFkTzrN7SAxOUtItGWTiLyHPMCo/fvqNoP2llbMAWevkg8zWhe3xspsgYQPlLfkg E7T47i/VVj9YQ85l1WU0s5eZ+D6GGbB0j0i3nZP/S+ffBItUvHLtgGrZpQJp8nAg YcIbl0QPMjDQzCSGNIu2uq0CZxa9UIoS8gr8WO0VQrn3KQWGnicH/cXf5u1fGGKG AvR6RG86Wl+ardvbeA+OZLakskR5ZySrCnUC1FZ1yjFXIw3ixU38QXW+VX7W7Gpx sKtYgmuIAvLnFZ/iR1M3kUuRUPzit4w6OHxT3bB3h2t0jZDWJCsKR1/ZKssWUPtH zx/zWVVhLL49qpb1Jc03lnV3qRmLCGCnHOWOqdUJd35qEx2VaoGbGuFMYPbQ2SIi CaSN7dkxv8TPDh9Q0rp0s+bZCdZFeIUU9ECIq5QvcLWKIHX3boStCEfhKvg1oApL 0jYyFMGejL0EkjTQydN4qfZhDXTVcZOcymlcOAfyzCJapNEDUjOvHKafYF3S/iFO PpTCv94nqkAracms3UdP5GPqcuWlRKfr8ZFl2ACDAAa7VdrlJZQ= =P6/T -----END PGP SIGNATURE----- --yq5cf7pzbpfqy27c--