From nobody Thu Oct 31 20:33:19 2024 X-Original-To: dev-commits-src-main@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 4XfbKr0j9gz5cLDB; Thu, 31 Oct 2024 20:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfbKq5BTpz4Wpv; Thu, 31 Oct 2024 20:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730406799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2rqh3r/4/+/PiyPu75Gqu7aq8u19XtApb+W/qpup3U=; b=LNA50uaSOwZGs+LgKiIVKOk3pKlkBfc2JLz5/Kmh188fLud/54nMAXn+R9jqDwpb1XhYvI lKSKD8RXNM6qiJTP54xRi6NWcgli2QTyT9AEjIyCnd0mhG0tOf8lgfDhuMG10P9VEvzQVL 2nqnIGKro0pjIQKzz6M63x5kynOuyqfIwUv5SerM6k1rl0NaHPK6gnkP9r0OJLm6tPjJbp zAi4XzS8SL8CnMKQeRrgSXru8rvhDhtKxAyk0MdcbbKJ9KVniawqPZ37R32a0NUxNATS7+ sePDirAkV9dDv8YebFQAeqSvaOYySlPtz8LH5M1KEj20inbE+KhAEzSg2BYUzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730406799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W2rqh3r/4/+/PiyPu75Gqu7aq8u19XtApb+W/qpup3U=; b=E/UzYY+EHFBDkpZQmzbHO1EyQhFj34Zx3dzSuHDMNr6RpuCgPEryg1V2Hn8UTm5pG4QRcP ugMjKOl8mqvEyGDQ9tJxHJvF56HZ6rZtW9jB3FY9YFZjCKbL2sn8UrB+wFW8zotkAlpUvH pt2zIeQ50ZsLxtKvB5sauagjwF/hJuJZy32REp8FOL+XfKTxR+Km4Os1hJGQclezRbItoV Yas0ukRIjSXphW2XMfh2G43jyeSUBoVYnFPp7gkPMGVR1c/22S5igUBr0FljRnkifZNXFn Tl8spZ/ps9IgpLhTpAsev/rPG0flqv402+NVfXnWmRPZnaeeVRNnjd2cN7v28Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730406799; a=rsa-sha256; cv=none; b=HBQUwQAF/L1z2K2ao8UTjzLOIXNxXUFobpitbhTZCGR2D4zes4Lg0OQm3OZN/PYO6nMzYR /lWaEamhlJsJUv4dgfKEf5SuNoQQQT5vRbOfzGowejnZYiZvM7tHWbs/Updzbie5gjOJRp DImsXDU8BODgp2aUq2orOAiccEDg6uygjZ02ycycLl9gY8axHK9998yEqm7MYFTK566GPn GHxoa/ifwFiaVvy/4vfLhJb+tMkw/6/9WpBZ80DkSO34hv7fZTIlkarnBME6JCbYcMEXed 2jbIqxeRvPydSE9EeXK+eJAnfuiPDi5CSbV+ScthRNZzSeG/gL9TJySfHfnl6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XfbKq4pdczqyF; Thu, 31 Oct 2024 20:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VKXJd2081844; Thu, 31 Oct 2024 20:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VKXJJl081841; Thu, 31 Oct 2024 20:33:19 GMT (envelope-from git) Date: Thu, 31 Oct 2024 20:33:19 GMT Message-Id: <202410312033.49VKXJJl081841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f02d9edfb5d6 - main - ktls: Mark mbufs containing outbound encrypted TLS records read-only List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f02d9edfb5d695734b8866c81d2da0c7700c8779 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f02d9edfb5d695734b8866c81d2da0c7700c8779 commit f02d9edfb5d695734b8866c81d2da0c7700c8779 Author: John Baldwin AuthorDate: 2024-10-31 20:32:32 +0000 Commit: John Baldwin CommitDate: 2024-10-31 20:32:32 +0000 ktls: Mark mbufs containing outbound encrypted TLS records read-only Reviewed by: gallatin, kp Differential Revision: https://reviews.freebsd.org/D46784 --- sys/kern/uipc_ktls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 1e4a933d4e4f..bf2ff37e3c3a 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -3072,6 +3072,7 @@ ktls_encrypt(struct ktls_wq *wq, struct mbuf *top) if ((m->m_epg_flags & EPG_FLAG_ANON) == 0) ktls_finish_nonanon(m, &state); + m->m_flags |= M_RDONLY; npages += m->m_epg_nrdy; @@ -3110,6 +3111,7 @@ ktls_encrypt_cb(struct ktls_ocf_encrypt_state *state, int error) if ((m->m_epg_flags & EPG_FLAG_ANON) == 0) ktls_finish_nonanon(m, state); + m->m_flags |= M_RDONLY; so = state->so; free(state, M_KTLS);