From nobody Fri Sep 06 15:54:21 2024 X-Original-To: freebsd-hackers@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 4X0glP1Kr0z5VNQj for ; Fri, 06 Sep 2024 15:54:25 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (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 4X0glN2vgPz4pjY for ; Fri, 6 Sep 2024 15:54:24 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=troutmask.apl.washington.edu header.s=troutmask header.b=jVNNvYjt; dmarc=fail reason="No valid SPF" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.18.1/8.18.1) with ESMTP id 486FsMtZ014978 for ; Fri, 6 Sep 2024 08:54:22 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) DKIM-Filter: OpenDKIM Filter v2.10.3 troutmask.apl.washington.edu 486FsMtZ014978 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=troutmask.apl.washington.edu; s=troutmask; t=1725638062; bh=0/CIx2X1UTJ7nUASWZp95V+yBZN3Il2ENV5fMdrmW+U=; h=Date:From:To:Subject:Reply-To:From; b=jVNNvYjtbwQLxoSqPalBE0gSiSI71Zy5kxUvOmEI9KO7Zs4OA6wKCwSS3Kt6LdXei BH85k2IL8wMYv3rKlHfGNmOiscq2yr/bxvZK45KDVoodOYgr4v49GgOAAPsqu6y3l6 bEvWIAHLqw4uWXK1sS+ny857dfp5QGh89eMnwX40L+8nHby2Z534cj0nsWbBxkUgMx oeYN5xT9D8wkPBXoAHxSkh4dYf6aT2z/WPc0xt26p3PIL3ZwVNeOuJuNPqVTjHw7iz UjxdVFBZ9LpPD8kJxFYGY2lZfxqLlK0a49fjZMHeBmkcyWHWMR8CtH0QLpFGSs/+PS rr4nYhC+XTLzQ== Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.18.1/8.18.1/Submit) id 486FsL7V014977 for freebsd-hackers@freebsd.org; Fri, 6 Sep 2024 08:54:21 -0700 (PDT) (envelope-from sgk) Date: Fri, 6 Sep 2024 08:54:21 -0700 From: Steve Kargl To: freebsd-hackers@freebsd.org Subject: New lock-order reversal Message-ID: Reply-To: sgk@troutmask.apl.washington.edu List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF,none]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[128.95.76.21:from]; R_DKIM_PERMFAIL(0.00)[troutmask.apl.washington.edu:s=troutmask]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; ARC_NA(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[troutmask.apl.washington.edu:~] X-Rspamd-Queue-Id: 4X0glN2vgPz4pjY FYI (and return hackers to a non-language) Update my old system to circa Aug 10, 2024 top-of-tree and rebuilts all installed ports. I'm now see a new lock-order reversal while using openvpn. lock order reversal: 1st 0xfffff801e5482aa0 udpinp (udpinp, rw) @ /usr/src/sys/netinet/udp_usrreq.c:1129 2nd 0xfffff80003510188 if_ovpn_lock (if_ovpn_lock, rm) @ /usr/src/sys/net/if_ovpn.c:2118 lock order if_ovpn_lock -> udpinp established at: #0 0xffffffff80ba66fa at witness_checkorder+0x32a #1 0xffffffff80b2d692 at _rw_wlock_cookie+0x62 #2 0xffffffff80d45e4e at udp_set_kernel_tunneling+0x4e #3 0xffffffff82a783a1 at ovpn_ioctl_set+0xe81 #4 0xffffffff82a76df8 at ovpn_ioctl+0xf8 #5 0xffffffff80c62179 at ifioctl+0x949 #6 0xffffffff80bacd26 at kern_ioctl+0x286 #7 0xffffffff80baca3d at sys_ioctl+0x12d #8 0xffffffff8104b018 at amd64_syscall+0x158 #9 0xffffffff8101d73b at fast_syscall_common+0xf8 lock order udpinp -> if_ovpn_lock attempted at: #0 0xffffffff80ba6f75 at witness_checkorder+0xba5 #1 0xffffffff80b2c22c at _rm_rlock_debug+0x12c #2 0xffffffff82a76e91 at ovpn_output+0x41 #3 0xffffffff80d0e1ce at ip_output+0x150e #4 0xffffffff80d45ad9 at udp_send+0xa69 #5 0xffffffff80be56d1 at sosend_dgram+0x311 #6 0xffffffff80be62b9 at sousrsend+0x79 #7 0xffffffff80bec35c at kern_sendit+0x1bc #8 0xffffffff80bec66b at sendit+0x1ab #9 0xffffffff80bec4ad at sys_sendto+0x4d #10 0xffffffff8104b018 at amd64_syscall+0x158 #11 0xffffffff8101d73b at fast_syscall_common+0xf8 -- Steve