lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240703224850.1226697-5-tom@herbertland.com>
Date: Wed,  3 Jul 2024 15:48:44 -0700
From: Tom Herbert <tom@...bertland.com>
To: davem@...emloft.net,
	kuba@...nel.org,
	jesse.brandeburg@...el.com,
	anthony.l.nguyen@...el.com,
	cai.huoqing@...ux.dev,
	netdev@...r.kernel.org,
	felipe@...anda.io
Cc: Tom Herbert <tom@...bertland.com>
Subject: [RFC net-next 04/10] fcoe: Call skb_csum_crc32_unnecessary

Instead of checking for CHECKSUM_UNNECESSARY, call
skb_csum_crc32_unnecessary to see if the FCOE CRC has been
validated. If it is, then call skb_reset_csum_crc32_unnecessary
to clear the flag

Signed-off-by: Tom Herbert <tom@...bertland.com>
---
 drivers/scsi/fcoe/fcoe.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index f1429f270170..9444bf973234 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1612,10 +1612,12 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
 	 * it's solicited data, in which case, the FCP layer would
 	 * check it during the copy.
 	 */
-	if (lport->crc_offload && skb->ip_summed == CHECKSUM_UNNECESSARY)
+	if (lport->crc_offload && skb_csum_crc32_unnecessary(skb)) {
 		fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
-	else
+		skb_reset_csum_crc32_unnecessary(skb);
+	} else {
 		fr_flags(fp) |= FCPHF_CRC_UNCHECKED;
+	}
 
 	fh = fc_frame_header_get(fp);
 	if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA && fh->fh_type == FC_TYPE_FCP)
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ