From nobody Sat Apr 5 00:40:21 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 4ZTxTZ63wtz5sgrw for ; Sat, 05 Apr 2025 00:40:34 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 4ZTxTZ254Rz3jBT for ; Sat, 05 Apr 2025 00:40:34 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5e6ff035e9aso5004164a12.0 for ; Fri, 04 Apr 2025 17:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743813633; x=1744418433; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FxrDhVEw40E1CmHSmoFo4P5AZ4cHLRTJ4HV25EGiiLE=; b=gT41Z4FRg7vpYhsL5FF+SxtQDUJ3j496PvrIilpz6CyLfkwy9g/tV610ugIeV0h6Hg pdkdVEhAGi6ZlIoEpVVTamnnvwiaf6yztNDsx8Uiwenk92abYF6G+mSAMw8M71jFoknC 6oMTDH6ewHlONnzwU/s42kvYubNxC5bo0ovBsChpPAZin4wSRJCc+VBuAfadpUxqskmg ld9jgkWJqrRyM/i2SizgCqUF0hd/8UGh5kKG00emz/XvugirM56uRTq8MPyD3IAU8f7d BBo1mlgop4wouPax3o8lNe9yaMIRtlORlTE/EAvxTWzjT1u7K1X3E9sfImHLKXLwJa9O Ux0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743813633; x=1744418433; 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=FxrDhVEw40E1CmHSmoFo4P5AZ4cHLRTJ4HV25EGiiLE=; b=bg+7gucCnnWhdZMFMdWGzPgDEyr4z90muVm07sWlfQoT4epMNlJVasMEO1HmbIsFIu 5p60u1D1IdJXDSrPwAnpuEThInTTNLtkZk29k4dyDl8cHOCa1+5PmZOYO5rWBC7KMIVY 5lo3wtSr6iL87cDXTHVcnRGvKfuWhnhe2rInMKG9z7HRzTUeGxcmkza0oiI0GK41zYIx 2evGYMrX+mpy9MOzu7/YLJFiVyS3NyqnXRGRHaQDVZRkRE1sxlGfjIAcXNIrOA0duDQe T2t79Oxlr/+OM+H7sHXMALwE4Y1fc9nIGb9PBlJo81JliwjluZYyJd81QO7EZTorHqu1 ND1A== X-Gm-Message-State: AOJu0Yxm8iWs0z9Cva8JlDv9uwy1HZh5AnjzdyEQt/p4v+LoF62zSPEW iTEj5NQmup/223Mrj8AhbEo91XAhkPLuBLsQEu91Gdfe76rd2V5KMY58C10t4lYW6L4UOSfs1sj 7t//IxMoNSdnV9bOdVWE8vXPsUQ== X-Gm-Gg: ASbGncuQDNOEr5qLDNilG6Rj0nNcCAdxtexI8daEebwnfj/rDYaErczPhrr5hP2uZJd VAPwoVm7TxlnmkL4rWDOgVlZkTKXM+Au0yRhV3EWWXHRoKLDbvcAmk3RL1BimZULEymG34LutZc Q1FkCHXPhDfmcMIyjf2YTqx3HSlWiZfU76X5pdM2x2lgX3HsNNmnihTvEOaQ== X-Google-Smtp-Source: AGHT+IERYkPCsbkL35IBhhnG5mz/dqnosxBHphaM5k5HbzNcru+A11Z5dJIR7XxEYSlCUzSmvkAJJ/GLu7N0wpobPUw= X-Received: by 2002:a05:6402:5194:b0:5ed:d761:db9d with SMTP id 4fb4d7f45d1cf-5f0b470402emr3804096a12.31.1743813632580; Fri, 04 Apr 2025 17:40:32 -0700 (PDT) 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: Fri, 4 Apr 2025 17:40:21 -0700 X-Gm-Features: ATxdqUGTCfRnCkKvJmGbtxi5E56o8IIm0nLpul7PHdMBox0fMbWU6hIShlZ5GXg Message-ID: Subject: Re: Heads Up: commit 2ec2ba7e232d just hit main To: Shawn Webb Cc: FreeBSD CURRENT Content-Type: multipart/mixed; boundary="0000000000002016e30631fd405d" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4ZTxTZ254Rz3jBT X-Spamd-Bar: ---- --0000000000002016e30631fd405d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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?) 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"?) 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 mention= ed above.) It does remind me that I need to try a build of zfs.ko by doing a "make" in the module directory. You can try the attached trivial patch and see if it spits out "pathconf re= t=3D1" on the console. rick > > Thanks, > > -- > 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/0= 3A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --0000000000002016e30631fd405d Content-Type: application/octet-stream; name="pathconf-zfs.patch" Content-Disposition: attachment; filename="pathconf-zfs.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m93hlptp0 LS0tIHN5cy9jb250cmliL29wZW56ZnMvbW9kdWxlL29zL2ZyZWVic2QvemZzL3pmc192bm9wc19v cy5jLnh4eAkyMDI1LTA0LTA0IDE3OjM1OjM0LjUzNjg4NDAwMCAtMDcwMAorKysgc3lzL2NvbnRy aWIvb3Blbnpmcy9tb2R1bGUvb3MvZnJlZWJzZC96ZnMvemZzX3Zub3BzX29zLmMJMjAyNS0wNC0w NCAxNzoyODo1NS41MTE0NzIwMDAgLTA3MDAKQEAgLTUzMzMsNiArNTMzMyw3IEBAIHpmc19mcmVl YnNkX3BhdGhjb25mKHN0cnVjdCB2b3BfcGF0aGNvbmZfYXJncyAqYXApCiAJCQkqYXAtPmFfcmV0 dmFsID0gMTsKIAkJZWxzZQogCQkJKmFwLT5hX3JldHZhbCA9IDA7CitwcmludGYoInBhdGhjb25m IHJldD0lbGRcbiIsICphcC0+YV9yZXR2YWwpOwogCQlNTlRfSVVOTE9DSyhhcC0+YV92cC0+dl9t b3VudCk7CiAJCXJldHVybiAoMCk7CiAjZW5kaWYK --0000000000002016e30631fd405d--