From owner-freebsd-hackers@freebsd.org Tue Dec 10 23:51:11 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 BDA6B1E748B for ; Tue, 10 Dec 2019 23:51:11 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47XcJv251Wz4S1r for ; Tue, 10 Dec 2019 23:51:11 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.nyi.freebsd.org (Postfix) id 478F41E7486; Tue, 10 Dec 2019 23:51:11 +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 4752C1E7485 for ; Tue, 10 Dec 2019 23:51:11 +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 47XcJs5KQbz4S1m for ; Tue, 10 Dec 2019 23:51:08 +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 xBANp2rw031146 for ; Tue, 10 Dec 2019 23:51:02 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id xBANp1DM031145 for hackers@freebsd.org; Tue, 10 Dec 2019 15:51:01 -0800 (PST) (envelope-from david) Date: Tue, 10 Dec 2019 15:51:01 -0800 From: David Wolfskill To: hackers@freebsd.org Subject: Re: I seem to be getting mixed messages from savecore(8) Message-ID: <20191210235101.GG27431@albert.catwhisker.org> Reply-To: hackers@freebsd.org References: <20191208224712.GC1227@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qoTlaiD+Y2fIM3Ll" Content-Disposition: inline In-Reply-To: <20191208224712.GC1227@albert.catwhisker.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 47XcJs5KQbz4S1m 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.35 / 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.95)[ip: (-9.80), ipnet: 107.192.0.0/12(-4.90), 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: Tue, 10 Dec 2019 23:51:11 -0000 --qoTlaiD+Y2fIM3Ll Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In case anyone is interested, for the archives: On Sun, Dec 08, 2019 at 02:47:12PM -0800, David Wolfskill wrote: > ... > So: If I understand correctly, "savecore -C" detacts that a dump exists > on the cited device, but invoking savecore to actually ... save ... the > dump does not actually do that. The observed behavior is a result of attempting to implement encrypted swap: I had successfully arranged to swap to /dev/nda0p5.eli; apparently performing a read-only open of /dev/nda0p5: =2E.. 1062 int 1063 main(int argc, char **argv) 1064 { =2E.. 1027 /* 1028 * The fileargs capability does not currently provide a way= to limit 1029 * ioctls. 1030 */ 1031 (void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IO= CTL); 1032 capfa =3D fileargs_init(argc, argv, checkfor || keep ? O_RD= ONLY : O_RDWR, 1033 0, &rights, FA_OPEN); 1034 if (capfa =3D=3D NULL) { 1035 logmsg(LOG_ERR, "fileargs_init(): %m"); 1036 exit(1); 1037 } =2E.. 578 static void 579 DoFile(const char *savedir, int savedirfd, const char *device) 580 { =2E.. 618 if (verbose) 619 printf("checking for kernel dump on device %s\n", d= evice); 620=20 621 fddev =3D fileargs_open(capfa, device); 622 if (fddev < 0) { 623 logmsg(LOG_ERR, "%s: %m", device); 624 return; 625 } =2E... is OK, but read/write ... is not. (Which is not unreasonable.) > Any suggestions for expressing my request in a way that savecore is a > bit more likely to accept? My revised appraoch is to run savecore before starting swapping on the device (via swapon). That appears to work, though I don't know if that may cause a problem later on. (In this environment, swapon is being invoked explicitly in an /etc/rc.d script, rather than by virtue of /etc/fstab entrues (for example).) 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. --qoTlaiD+Y2fIM3Ll Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAl3wL2VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2 PcmvRQgApHs2fa2dKETczr0xjUzBPpc52fRladE8RoU2LYk+kx+K1fZBT7fS9fHC 94RAZoOiR68bvaMW98OZ6pMFk19edCd59tfSbalvDPD1UMmy+Nq5eLFT2duGJDWI GoEhY5/RUy9EsWnljpS6k7SHzK+8NRq38PGh2ih2FlgIdGyhMonO5W2mc1RSKgpA +LagxvY/AmBS823nH1c+1cWI7nNdZILIj7gggScILUHueWeGnZWy9mp7HopdtB88 BoiBB8FWMK3hQ+sMjv5fpe26eH/8UP2HUC85dVizQxq6Dzuvk+jgJdvm9qLiAWAy SrqJeNbtRKjvPZHVf8myqRWN7G5srA== =3wTZ -----END PGP SIGNATURE----- --qoTlaiD+Y2fIM3Ll--