From owner-freebsd-net@freebsd.org Tue Dec 26 09:55:42 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56569E815C8 for ; Tue, 26 Dec 2017 09:55:42 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCB5A6D2EE for ; Tue, 26 Dec 2017 09:55:41 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 3E4AD13418A3; Tue, 26 Dec 2017 12:55:29 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2JB01pu6GR-tMbiZqU5; Tue, 26 Dec 2017 12:55:23 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1514282123; bh=f6eIt9pESZzbXDZHeD6Cy6YbQn8m3Xvf1l8exVlxWV8=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=Xpx5l4e8OT7+5zKwxwxtOUJndluP02m3ldHkCHECZzHakR9c/nPl+A2ry/Ew0pOwR Ba/f4qEDFmHNZ1qLEfNc7EbDL94vDYxrYEc2qMTv3hJd/BmdEsfMVgfqkkliOVfblq I1vGgAEAdHexev2irgqH6UZDK3n8R7VkI0bua2ms= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id qd9z8lOUyW-tMu0PRsf; Tue, 26 Dec 2017 12:55:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1514282122; bh=f6eIt9pESZzbXDZHeD6Cy6YbQn8m3Xvf1l8exVlxWV8=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=IyV+Uo6DtbgTnz05QNetazuEZfosH2ThbJexwfuUQv/VNSRkmEhuQB3JDM9Ll9j5V DC/aIcJSrnK0DJ8gKCVQzppx1L7Ov274abSJNR2kVBgddXVVaVhUIjK3yLbsWdb+Z7 qNDnzLthqine5uSkLZiB+9U6Ytpf2c6E0YxueFVY= Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: [freebsd-current]Who should reset M_PKTHDR flag in m_buf when IP packets are fragmented. m_unshare panic throw when IPSec is enabled To: Harsh Jain , freebsd-net@freebsd.org References: <73302ead-b2e9-c25b-4d11-475f38dec1a1@chelsio.com> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <993c58bb-3bf2-d6a3-9a05-13e1631aec87@yandex.ru> Date: Tue, 26 Dec 2017 12:52:34 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <73302ead-b2e9-c25b-4d11-475f38dec1a1@chelsio.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="giudNWLMnbHfGdEAqIVvhWbiDTvOIjcC9" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 09:55:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --giudNWLMnbHfGdEAqIVvhWbiDTvOIjcC9 Content-Type: multipart/mixed; boundary="cdUnNoLdFC1fNs7dmKTdNXiod0W9CeqdP"; protected-headers="v1" From: "Andrey V. Elsukov" To: Harsh Jain , freebsd-net@freebsd.org Message-ID: <993c58bb-3bf2-d6a3-9a05-13e1631aec87@yandex.ru> Subject: Re: [freebsd-current]Who should reset M_PKTHDR flag in m_buf when IP packets are fragmented. m_unshare panic throw when IPSec is enabled References: <73302ead-b2e9-c25b-4d11-475f38dec1a1@chelsio.com> In-Reply-To: <73302ead-b2e9-c25b-4d11-475f38dec1a1@chelsio.com> --cdUnNoLdFC1fNs7dmKTdNXiod0W9CeqdP Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 26.12.2017 07:43, Harsh Jain wrote: > Hi All, >=20 > If I try to run ping of size say 6000 in IPSec transport mode, m_unshar= e() panic with following trace. It seems that while re-assembly of IP pac= ket "ip_reass" missed re-setting of "M_PKTHDR". After applying below pat= ch things work fine. Can some one suggest Is it a BUG or I am missing som= ethings. >=20 > panic: m_unshare: m0 0xfffff80020f82600, m 0xfffff8005d054100 has M_PKT= HDR > cpuid =3D 15 > time =3D 1495578455 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2c/frame 0xfffffe044= e9bb890 > kdb_backtrace() at kdb_backtrace+0x53/frame 0xfffffe044e9bb960 > vpanic() at vpanic+0x269/frame 0xfffffe044e9bba30 > kassert_panic() at kassert_panic+0xc7/frame 0xfffffe044e9bbac0 > m_unshare() at m_unshare+0x578/frame 0xfffffe044e9bbbc0 > esp_output() at esp_output+0x44c/frame 0xfffffe044e9bbe40 > ipsec4_perform_request() at ipsec4_perform_request+0x5df/frame 0xfffffe= 044e9bbff0 Hi, it seems unusual that IP reassembly happens on outbound path. Do you have some packet normalization using firewall? --=20 WBR, Andrey V. Elsukov --cdUnNoLdFC1fNs7dmKTdNXiod0W9CeqdP-- --giudNWLMnbHfGdEAqIVvhWbiDTvOIjcC9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlpCG+IACgkQAcXqBBDI oXpoUwgAoyNBFvmFW2bgLl6Xx9krr38ZQ7Iz9m1CE3n+uOvpBjTSd5xeh54xFyOd zqwas/0C4OCTZTo7+QOJ4SeUAUxwQiZEEzpvZHkisjWb7E1gxiCREGAFexLgJ1DP B2RTJzw7+oHlFEItk0MiluW4PAIl8KvtbJTrdKec2VgTbsy+pMYSNx5v62o5K6/6 evvKMjc2Hu3VVUBQYcVh6yO9+fJ33Z4judyyF78vsS6tsuMv0rgyGpaTjT6OFp8Y qf6i0w11ALivMj/UUryFly6yk1xMsyguuo1EvmkmpAqC7udhrhUqSJB/dM45eS+/ 6iP9xRLP1RDfLA/c7OEZeiof2CL/1Q== =iB3v -----END PGP SIGNATURE----- --giudNWLMnbHfGdEAqIVvhWbiDTvOIjcC9--