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: <20240221-parisc_use_generic_checksum-v1-1-ad34d895fd1b@rivosinc.com>
Date: Wed, 21 Feb 2024 18:37:11 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>, 
 Helge Deller <deller@....de>, Arnd Bergmann <arnd@...db.de>, 
 Andrew Morton <akpm@...ux-foundation.org>, 
 Guenter Roeck <linux@...ck-us.net>
Cc: linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-arch@...r.kernel.org, Charlie Jenkins <charlie@...osinc.com>
Subject: [PATCH 1/4] asm-generic headers: Allow csum_partial arch override

Arches can have more a efficient implementation of csum_partial.

Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
---
 include/asm-generic/checksum.h | 2 ++
 lib/checksum.c                 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h
index ad928cce268b..3309830ba2cb 100644
--- a/include/asm-generic/checksum.h
+++ b/include/asm-generic/checksum.h
@@ -4,6 +4,7 @@
 
 #include <linux/bitops.h>
 
+#ifndef csum_partial
 /*
  * computes the checksum of a memory block at buff, length len,
  * and adds in "sum" (32-bit)
@@ -17,6 +18,7 @@
  * it's best to have buff aligned on a 32-bit boundary
  */
 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
+#endif
 
 #ifndef ip_fast_csum
 /*
diff --git a/lib/checksum.c b/lib/checksum.c
index 6860d6b05a17..c115a9ac71d9 100644
--- a/lib/checksum.c
+++ b/lib/checksum.c
@@ -110,6 +110,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
 EXPORT_SYMBOL(ip_fast_csum);
 #endif
 
+#ifndef csum_partial
 /*
  * computes the checksum of a memory block at buff, length len,
  * and adds in "sum" (32-bit)
@@ -134,6 +135,7 @@ __wsum csum_partial(const void *buff, int len, __wsum wsum)
 	return (__force __wsum)result;
 }
 EXPORT_SYMBOL(csum_partial);
+#endif
 
 /*
  * this routine is used for miscellaneous IP-like checksums, mainly

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ