From owner-freebsd-hackers@freebsd.org Wed Dec 11 22:35:39 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6AAA1E1F83 for ; Wed, 11 Dec 2019 22:35:39 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47YBbH1QrRz3F0Z for ; Wed, 11 Dec 2019 22:35:39 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.nyi.freebsd.org (Postfix) id 2E9B31E1F82; Wed, 11 Dec 2019 22:35:39 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E6061E1F81 for ; Wed, 11 Dec 2019 22:35:39 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (107-204-234-170.lightspeed.sntcca.sbcglobal.net [107.204.234.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47YBbF6LhKz3F0Y for ; Wed, 11 Dec 2019 22:35:37 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id xBBMZY97044298 for ; Wed, 11 Dec 2019 22:35:34 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id xBBMZYg1044297 for hackers@freebsd.org; Wed, 11 Dec 2019 14:35:34 -0800 (PST) (envelope-from david) Date: Wed, 11 Dec 2019 14:35:34 -0800 From: David Wolfskill To: hackers@freebsd.org Subject: Setting up encrypted swap: "swapon" vs. "swapctl -a" Message-ID: <20191211223534.GU27431@albert.catwhisker.org> Reply-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kSOhxpxUsM1s2qz/" Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47YBbF6LhKz3F0Y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of david@catwhisker.org designates 107.204.234.170 as permitted sender) smtp.mailfrom=david@catwhisker.org X-Spamd-Result: default: False [-2.33 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[hackers@freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:107.204.234.170]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[catwhisker.org]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:7018, ipnet:107.192.0.0/12, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.93)[ip: (-9.72), ipnet: 107.192.0.0/12(-4.86), asn: 7018(0.01), country: US(-0.05)]; REPLYTO_EQ_TO_ADDR(5.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2019 22:35:39 -0000 --kSOhxpxUsM1s2qz/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I find that swapon(8) allows a -E flag: | The swapon utility adds the specified swap devices to the system... | The -E option causes each of following devices to receive a BIO_DELETE | command.... While "swapctl -a" is (otherwise) similar to "swapon,": | swapctl -E -a /dev/nda11p5.eli | usage: swapctl [-AghklmsU] [-a file ... | -d file ...] | swapctl -a /dev/nda11p5.eli | swapctl: adding /dev/nda11p5.eli as swap device | swapoff /dev/nda11p5.eli | swapon -E /dev/nda11p5.eli That said, I also note: | The swapctl utility exists primarily for those familiar with other | BSDs and may be used to add, remove, or list swap devices.... Should "swapctl -a" also accept & make use of -E? Peace, david --=20 David H. Wolfskill david@catwhisker.org Some might think an oath of office is as meaningful as a marriage vow. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --kSOhxpxUsM1s2qz/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAl3xbzZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2 PcmO+ggApvDQ1AwQiqCY+wy4LmsMloYmFp5JOpb2g7icXFxw/K8vLOjuBo578bV3 vc/aF2CDVXrAEPQjej0/yCPoxPtmztPULnT/72g5bXaYaEvfJGo2xxBCA0Xkz7ZY khlcUBPiJNqa+eKJWtHN7iIo5yiZUhBoCJ72xcijWlM89g/fClcgFUqaYU80I4YH Eflw6gjaWsuMS6qkJx/wtqCQOC7xds/7cX8b/Gs/JePqb38NAjSMI8R1a9ADKZXp 6qKpvICa6KDGF4EmXShwTthVYftkJ94Bg66qXFt+yf9vRyHhw5/RUAWchqbpb4fv qZvRtztfYv9WK53G+/LDa+mjaCxnjQ== =vEOv -----END PGP SIGNATURE----- --kSOhxpxUsM1s2qz/--