CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 16 16:30:53 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
sys/aes_via: fix broken link in comment


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jun 16 16:30:53 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
sys/aes_via: fix broken link in comment


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/crypto/aes/arch/x86/aes_via.c
diff -u src/sys/crypto/aes/arch/x86/aes_via.c:1.8 src/sys/crypto/aes/arch/x86/aes_via.c:1.9
--- src/sys/crypto/aes/arch/x86/aes_via.c:1.8	Sun Jun 16 16:11:17 2024
+++ src/sys/crypto/aes/arch/x86/aes_via.c	Sun Jun 16 16:30:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_via.c,v 1.8 2024/06/16 16:11:17 christos Exp $	*/
+/*	$NetBSD: aes_via.c,v 1.9 2024/06/16 16:30:52 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.8 2024/06/16 16:11:17 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.9 2024/06/16 16:30:52 rillig Exp $");
 
 #ifdef _KERNEL
 #include 
@@ -857,7 +857,7 @@ aesvia_probe(void)
 #else
 	/*
 	 * From the VIA PadLock Programming Guide:
-	 * http://linux.via.com.tw/support/beginDownload.action?eleid=181=261
+	 * https://web.archive.org/web/20220104214041/http://linux.via.com.tw/support/beginDownload.action?eleid=181=261
 	 */
 	unsigned eax, ebx, ecx, edx;
 	if (!__get_cpuid(0, , , , ))



CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 16 16:11:17 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
revert previous, probably a gcc bug?


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/crypto/aes/arch/x86/aes_via.c
diff -u src/sys/crypto/aes/arch/x86/aes_via.c:1.7 src/sys/crypto/aes/arch/x86/aes_via.c:1.8
--- src/sys/crypto/aes/arch/x86/aes_via.c:1.7	Sun Jun 16 09:03:48 2024
+++ src/sys/crypto/aes/arch/x86/aes_via.c	Sun Jun 16 12:11:17 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_via.c,v 1.7 2024/06/16 13:03:48 christos Exp $	*/
+/*	$NetBSD: aes_via.c,v 1.8 2024/06/16 16:11:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.7 2024/06/16 13:03:48 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.8 2024/06/16 16:11:17 christos Exp $");
 
 #ifdef _KERNEL
 #include 
@@ -428,8 +428,7 @@ aesvia_cbc_dec(const struct aesdec *dec,
 break;
 			memcpy(cv, in + nbytes - 16, 16);
 			xor128(tmp, tmp, cv);
-			// XXX: is this right? (subtracting 16)
-			memcpy(out + nbytes - 16, tmp, 16);
+			memcpy(out + nbytes, tmp, 16);
 		}
 
 		xor128(tmp, tmp, iv0);



CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 16 16:11:17 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
revert previous, probably a gcc bug?


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 16 13:03:48 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
try to fix the overflow gcc pointed out.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/crypto/aes/arch/x86/aes_via.c
diff -u src/sys/crypto/aes/arch/x86/aes_via.c:1.6 src/sys/crypto/aes/arch/x86/aes_via.c:1.7
--- src/sys/crypto/aes/arch/x86/aes_via.c:1.6	Tue Jul 28 10:01:35 2020
+++ src/sys/crypto/aes/arch/x86/aes_via.c	Sun Jun 16 09:03:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_via.c,v 1.6 2020/07/28 14:01:35 riastradh Exp $	*/
+/*	$NetBSD: aes_via.c,v 1.7 2024/06/16 13:03:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.6 2020/07/28 14:01:35 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aes_via.c,v 1.7 2024/06/16 13:03:48 christos Exp $");
 
 #ifdef _KERNEL
 #include 
@@ -428,7 +428,8 @@ aesvia_cbc_dec(const struct aesdec *dec,
 break;
 			memcpy(cv, in + nbytes - 16, 16);
 			xor128(tmp, tmp, cv);
-			memcpy(out + nbytes, tmp, 16);
+			// XXX: is this right? (subtracting 16)
+			memcpy(out + nbytes - 16, tmp, 16);
 		}
 
 		xor128(tmp, tmp, iv0);



CVS commit: src/sys/crypto/aes/arch/x86

2024-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 16 13:03:48 UTC 2024

Modified Files:
src/sys/crypto/aes/arch/x86: aes_via.c

Log Message:
try to fix the overflow gcc pointed out.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/crypto/aes/arch/x86/aes_via.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.