From nobody Tue Dec 14 08:33:55 2021 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 5281D18E6059; Tue, 14 Dec 2021 08:34:07 +0000 (UTC) (envelope-from kp@krion.cc) Received: from krion.cc (krion.cc [148.251.235.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JCs9W1RJVz4xJg; Tue, 14 Dec 2021 08:34:07 +0000 (UTC) (envelope-from kp@krion.cc) Date: Tue, 14 Dec 2021 09:33:55 +0100 From: Kirill Ponomarev To: Gleb Smirnoff Cc: John Baldwin , "freebsd-current@freebsd.org" , x11@freebsd.org Subject: Re: smr inp breaks some jail use cases and panics with i915kms don't switch to the console anymore Message-ID: References: <1db0942e-0e66-4337-ce2f-4e1005107435@FreeBSD.org> <836761df-6eea-462b-9ae7-5d0d00aad38f@FreeBSD.org> 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="VX9rrHFS+3WhNl63" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4JCs9W1RJVz4xJg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --VX9rrHFS+3WhNl63 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 12/13, Gleb Smirnoff wrote: > On Mon, Dec 13, 2021 at 11:56:35AM -0800, John Baldwin wrote: > J> > J> So there are two things here. The root issue is that the devel/a= pr1 port > J> > J> runs a configure test for TCP_NDELAY being inherited by accepted = sockets. > J> > J> This test panics because prison_check_ip4() tries to lock a priso= n mutex > J> > J> to walk the IPs assigned to a jail, but the caller (in_pcblookup_= hash()) has > J> > J> done an smr_enter() which is a critical_enter(): > J> >=20 > J> > The first one is known, and I got a patch to fix it: > J> >=20 > J> > https://reviews.freebsd.org/D33340 > J> >=20 > J> > However, a pre-requisite to this simple patch is more complex: > J> >=20 > J> > https://reviews.freebsd.org/D33339 > J> >=20 > J> > There is some discussion on how to improve that, and I decided to do= that > J> > rather than stick to original version. So I takes a few extra days. > J> >=20 > J> > We could push D33340 into main, if the negative effects (raciness of > J> > the prison check) is considered lesser evil then potentially contest= ed > J> > mtx_lock in smr section. > J>=20 > J> I think raciness is probably better than always panicking as it does t= oday. >=20 > AFAIK, today it will always panic only with WITNESS. Without WITNESS it w= ould > pass through mtx_lock as long as the mutex is not locked. >=20 > So, do you suggest to push D33340 before finalizing D33339? It panics with GENERIC so I'd suggest to push D33340 or backout it temprorary until D33339 is solved. --VX9rrHFS+3WhNl63 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJCHRFhEAQujKni1pDyI9/LMCykUFAmG4VvMACgkQDyI9/LMC ykXr0Qf+O05zkTDDyGkCIus5KN+bjiJBZPXS359O3s7VzypB+0Ukjz1TEND+xEe3 aTY/P9Pyg0qa4d4bdHoA0R0rujjORgreLOIJmxlWJKqoxP4dtGq0pOl2jGsSVPTo m0IrS8T9dfXL2F2+Lw3NBPYcD2BuNZeeRQbsLDJDZdxJRuk5JUvH5/pt1IfA+j3S XYSdFUV6a6N2BdPt3Aw8hgWPPBRmmEdbp/IAj6HteP9+xJYP+RrUMgVxFjYxsjiv TQLbFca77VEhBVtwyStkSWrZUjAGvYe5uckT09278ibpPoLovA3U5jgr8pehMwzi 7w3GMC2cnbg1kszvyOvnouGln8mF3Q== =PQha -----END PGP SIGNATURE----- --VX9rrHFS+3WhNl63--