From nobody Wed Jun 19 18:31:26 2024 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 4W4Bz600mrz5Nc6S for ; Wed, 19 Jun 2024 18:31:30 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (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 4W4Bz54s3Zz479g for ; Wed, 19 Jun 2024 18:31:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-376211b3a4fso2594175ab.1 for ; Wed, 19 Jun 2024 11:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1718821888; x=1719426688; 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=jeRthG/FXSjbZqUUIwi5gq5tgIf82ZUv5enmx2coBFo=; b=J6dlSdFcTKi0YSD4TX/nhaWzSnC4ZLES4gt8UOZD4je+LUHpwa/RgZJO2QBpuTaG9x Kbf+FcnRVhcBZ59P9H1xC2JI+jspiTkpGcUxc58k7WPQvBrsJyXY09aJsTyMO7R3K0qF pUfJgJhSkqasW/bWbgwIRW85gInB2ldgLVhhA7//n5u+GEu+R62edydfe1v5oFE18S4P u7e4c3wr6ioqCtyrbIzTc3UMd2t4eZO3Q8vXLgKZO/wMGQeukLwGnA8Lae5xXZ0FUTf3 PkV5JIaIRWlxL5Z0yA+T98sS9ZJiT5pqk0al+2FgmKF2cD+bCq779iEsl4OIxlD82h0n T2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718821888; x=1719426688; 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=jeRthG/FXSjbZqUUIwi5gq5tgIf82ZUv5enmx2coBFo=; b=Sdc2kXkkL8pGMYc2hZjkpFYX+R9DnuJpkIWNz2gcYl0FrwBWn0Av83aFW0J6wnzakC 3S4ltc/ywFSyeg5r18ej4dKtz/bHrQkIzZpC9WbKrckZhdM+9zzUZNGKws7wDfuTJ2H/ mgesoAyBeK8QGim38GPTZOCkIlx8CwTXiFjcVPpj/WgoIjaqH4DtGTaCNU/RHt2vMUq6 leqOSyIYOBIuaV/SEBQgRNA5wdxX/LcQe/VLdBjMoXLyCgeFwLwnZTahft3baINv0ATU W1vdq6PQprw1ktXRiXOLXMBeRwxjJWF4w3bUns/NgvWQol9FMkbi5K6VM3bGJk3o3QIT shRw== X-Gm-Message-State: AOJu0Yxpg/XAjKe5oLeFg8CcRaZsMMvx1O5oP6WS2WMfPuGmMmbZQCGe nPRd1Pe+DaBtWREy2t/XXkXF+EABbFiby1xKNtJ9dY1AhxKNg42p0o5NWXC/JVE= X-Google-Smtp-Source: AGHT+IHUmAxOgTTBCJJi9tdO4fycx3hX+JcWuKBIjKhhMgSSuUol8wEZQb7LFEK9ztHdrASed3HHHQ== X-Received: by 2002:a05:6e02:2141:b0:376:2649:32c6 with SMTP id e9e14a558f8ab-3762649410dmr3044995ab.3.1718821887883; Wed, 19 Jun 2024 11:31:27 -0700 (PDT) Received: from mutt-hbsd ([184.99.37.29]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-375d8b45112sm27710685ab.80.2024.06.19.11.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 11:31:27 -0700 (PDT) Date: Wed, 19 Jun 2024 18:31:26 +0000 From: Shawn Webb To: David Chisnall Cc: FreeBSD Current Subject: Re: Is anyone using libzfs_core on 15-CURRENT? Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD 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="t5vldg4ugcahddvt" Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- 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)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4W4Bz54s3Zz479g --t5vldg4ugcahddvt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 19, 2024 at 06:34:24PM +0100, David Chisnall wrote: > Hi all, >=20 > I have some code using libzfs_core that works fine on 13, but seems not t= o on 15-CURRENT. The lzc_snapshot function is failing with exactly the sam= e nv list argument. It is failing with errno 2 (ENOENT) from the ZFS ioctl= (and not returning an nvlist of errors). >=20 > My understanding is that the zfs command-line tool wraps libzfs_core and = so it must be working somehow. Has anything changed in between 13 and 14 t= hat would be expected to cause incompatibilities? The fact that we don=E2= =80=99t install usable headers for these libraries makes it quite difficult= to be sure that I haven=E2=80=99t done anything wrong, but stepping throug= h the libzfs_core bits in a debugger, everything looks correct up to the io= ctl call. I have a little wrapper around libzfs{,_core}: https://git.hardenedbsd.org/shawn.webb/liblattzfs It kinda sucks, but fills a need. We imported that into HardenedBSD base. We don't link against libzfs_core, but we do reference a header: https://git.hardenedbsd.org/shawn.webb/liblattzfs/-/blob/main/src/liblattzf= s.c?ref_type=3Dheads#L40 liblattzfs mainly serves to get the status of a pool. We use it in another utility, hbsdmon: https://git.hardenedbsd.org/hardenedbsd/hbsdmon hbsdmon is a simple HardenedBSD system monitoring tool. It can monitor a ZFS pool, sending a Pushover message if the pool is unhealthy: https://git.hardenedbsd.org/hardenedbsd/hbsdmon/-/blob/master/usr.bin/hbsdm= on/zfs.c?ref_type=3Dheads So to answer your question of whether there are any libzfs_core consumers: yes, but only the C headers. My use case seems quite different than yours, so the information presented in this email might not be applicable. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD 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 --t5vldg4ugcahddvt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmZzI/cACgkQ/y5nonf4 4frZmQ//TgOOpBGjWmKyYeUs/1IdbtLoDZzzbhZKZtNgcNTxoA6DxuYTFX+dS9nD aSf4sSteJIoUe3YsqrsKAP56Le13dc1/1AtZcnaStlS+Ie2MixW4nJAWaD7YnDtd qL3s/skjC/0H/mM9iaNtLww7i6Sttt9zqhHJDfRY0NmAPyMX9VIS3V+H4+d6QbLL Roij0feXNTxYE7cLlKtdKm8G/P2MRhwjBdf1Eivi0okYXzsH/wIQn7vWDgA1p7qV dlfPq4W5AnVMw6lupVhcVH0t9exx09Rqn3CLBhWaz1dsHViTf9owCqSyp3LvX5cD RES2zzSnxEmfU6W9dW01ZfbxD/A3QbXo5wWYZgEpJWRjsFJDUSpFGza85XXo0azP je8wlasJL5UVz0/IiBomZg4tMmhHD8fE7effgJVFjKtEzVnOC3R/n9pD5DbHjui6 VUo3bRVpI6Cw6oXNgCk6E0x0PH9EAvk6lAUvV4javbM7tKGNaNhwkBMCBsU8TvlM Uzvky1/nMYCmEkY2ujvUHVTahP3Hm35NohQkzVJlYpmsrNqthPB46EGuQoI0XbL0 LLwKu12V023cthCgqA8hz257K86gu/IWdP20DygrQIypLojuQU5XIR4+yQqK4GdU Li9QnfyXKIs9ic5wzWCe6C+ELws6N+Fpm1fF3lCU0guPCybCf4E= =Uw5m -----END PGP SIGNATURE----- --t5vldg4ugcahddvt--