Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nano-Vanity compiles, but won't run with the gpu flag (Error passing generic uint32_t to const uint32_t) #52

Closed
qwahzi opened this issue Dec 11, 2022 · 11 comments

Comments

@qwahzi
Copy link

qwahzi commented Dec 11, 2022

Nano-vanity compiles, but won't run with the GPU flag, even after installing GPU drivers from scratch + Visual Studio + CUDA Toolkit.

Also tried this, but no luck so far.

Nvidia 1080 Ti
Driver version: 527.56

Cuda:

> nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Mon_Oct_24_19:40:05_Pacific_Daylight_Time_2022
Cuda compilation tools, release 12.0, V12.0.76
Build cuda_12.0.r12.0/compiler.31968024_0

Error:

Estimated attempts needed: 1099511627776
183 errors generated.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OclCore(ProgramBuild(BuildLog("<kernel>:1788:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1788:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1788:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1789:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1789:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1789:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1790:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1790:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1790:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1795:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1795:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1795:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, p->x, p->t);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1796:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1796:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1796:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->y, p->y, p->z);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1797:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1797:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1797:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->z, p->z, p->t); 
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1798:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->x, p->y); 
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1798:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->x, p->y); 
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1798:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->x, p->y); 
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1803:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(p->ysubx, r->y, r->x);
                       ^~~~~~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1803:27: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(p->ysubx, r->y, r->x);
                                 ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1803:33: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(p->ysubx, r->y, r->x);
                                       ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1804:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(p->xaddy, r->y, r->x);
                       ^~~~~~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1804:27: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(p->xaddy, r->y, r->x);
                                 ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1804:33: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(p->xaddy, r->y, r->x);
                                       ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1805:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_copy(p->z, r->z);
                        ^~~~
<kernel>:1121:29: note: passing argument to parameter 'out' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                            ^
<kernel>:1805:24: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_copy(p->z, r->z);
                              ^~~~
<kernel>:1121:52: note: passing argument to parameter 'in' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                                                   ^
<kernel>:1806:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul_const(p->t2d, r->t, ge25519_ec2d);
                             ^~~~~~
<kernel>:1355:34: note: passing argument to parameter 'out' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                 ^
<kernel>:1806:31: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul_const(p->t2d, r->t, ge25519_ec2d);
                                     ^~~~
<kernel>:1355:57: note: passing argument to parameter 'a' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                                        ^
<kernel>:1817:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1817:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1818:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1818:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1819:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(t, q->y, q->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1819:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(t, q->y, q->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1820:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(u, q->y, q->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1820:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(u, q->y, q->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1823:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1823:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t);
                                ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1825:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(d, p->z, q->z);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1825:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(d, p->z, q->z);
                                ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1827:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(r->x, b, a);
                       ^~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1828:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->y, b, a);
                       ^~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1829:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add_after_basic(r->z, d, c);
                                   ^~~~
<kernel>:1150:40: note: passing argument to parameter 'out' here
curve25519_add_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                       ^
<kernel>:1830:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->t, d, c);
                                   ^~~~
<kernel>:1207:40: note: passing argument to parameter 'out' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                       ^
<kernel>:1838:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(a, p->x);
                             ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:1839:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(b, p->y);
                             ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:1840:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(c, p->z);
                             ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:1842:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->x, p->x, p->y);
                       ^~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1842:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(r->x, p->x, p->y);
                             ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1842:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(r->x, p->x, p->y);
                                   ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1843:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_square(r->x, r->x);
                          ^~~~
<kernel>:1453:31: note: passing argument to parameter 'out' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                              ^
<kernel>:1843:26: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(r->x, r->x);
                                ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:1844:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->y, b, a);
                       ^~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1845:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(r->z, b, a);
                       ^~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1846:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->x, r->x, r->y);
                                   ^~~~
<kernel>:1207:40: note: passing argument to parameter 'out' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                       ^
<kernel>:1846:35: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->x, r->x, r->y);
                                         ^~~~
<kernel>:1207:63: note: passing argument to parameter 'a' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                              ^
<kernel>:1846:41: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->x, r->x, r->y);
                                               ^~~~
<kernel>:1207:84: note: passing argument to parameter 'b' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                                   ^
<kernel>:1847:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->t, c, r->z);
                                   ^~~~
<kernel>:1207:40: note: passing argument to parameter 'out' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                       ^
<kernel>:1847:38: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub_after_basic(r->t, c, r->z);
                                            ^~~~
<kernel>:1207:84: note: passing argument to parameter 'b' here
curve25519_sub_after_basic(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                                   ^
<kernel>:1856:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1856:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1857:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1857:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1858:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(a, a, qb[signbit]); /* x for +, y for - */
                             ^~~~~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1859:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, b, qb[signbit^1]); /* y for +, x for - */
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1859:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, b, qb[signbit^1]); /* y for +, x for - */
                                ^~~~~~~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1860:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->y, r->x, a);
                       ^~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1860:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(r->y, r->x, a);
                             ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1861:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(r->x, r->x, a);
                       ^~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1861:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(r->x, r->x, a);
                             ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1862:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1862:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                                ^~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1863:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, p->z, p->z);
                              ^~~~
<kernel>:1166:35: note: passing argument to parameter 'out' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                  ^
<kernel>:1863:30: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, p->z, p->z);
                                    ^~~~
<kernel>:1166:58: note: passing argument to parameter 'a' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                         ^
<kernel>:1863:36: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, p->z, p->z);
                                          ^~~~
<kernel>:1166:79: note: passing argument to parameter 'b' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                              ^
<kernel>:1864:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_copy(r->z, r->t);
                        ^~~~
<kernel>:1121:29: note: passing argument to parameter 'out' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                            ^
<kernel>:1864:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_copy(r->z, r->t);
                              ^~~~
<kernel>:1121:52: note: passing argument to parameter 'in' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                                                   ^
<kernel>:1865:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(rb[2+signbit], rb[2+signbit], c); /* z for +, t for - */
                       ^~~~~~~~~~~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1865:32: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(rb[2+signbit], rb[2+signbit], c); /* z for +, t for - */
                                      ^~~~~~~~~~~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1866:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(rb[2+(signbit^1)], rb[2+(signbit^1)], c); /* t for +, z for - */
                       ^~~~~~~~~~~~~~~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1866:36: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(rb[2+(signbit^1)], rb[2+(signbit^1)], c); /* t for +, z for - */
                                          ^~~~~~~~~~~~~~~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1875:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1875:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1876:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1876:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1877:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(a, a, qb[signbit]); /* ysubx for +, xaddy for - */
                             ^~~~~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1878:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, b, qb[signbit^1]); /* xaddy for +, ysubx for - */
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1878:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, b, qb[signbit^1]); /* xaddy for +, ysubx for - */
                                ^~~~~~~~~~~~~
@qwahzi
Copy link
Author

qwahzi commented Dec 11, 2022

Part 2 of error:

curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1879:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->y, r->x, a);
                       ^~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1879:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(r->y, r->x, a);
                             ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1880:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(r->x, r->x, a);
                       ^~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1880:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(r->x, r->x, a);
                             ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1881:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1881:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                                ^~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1882:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->z, q->z);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1882:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->z, q->z);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1882:29: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, p->z, q->z);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1883:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, r->t, r->t);
                              ^~~~
<kernel>:1166:35: note: passing argument to parameter 'out' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                  ^
<kernel>:1883:30: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, r->t, r->t);
                                    ^~~~
<kernel>:1166:58: note: passing argument to parameter 'a' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                         ^
<kernel>:1883:36: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->t, r->t, r->t);
                                          ^~~~
<kernel>:1166:79: note: passing argument to parameter 'b' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                              ^
<kernel>:1884:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_copy(r->z, r->t);
                        ^~~~
<kernel>:1121:29: note: passing argument to parameter 'out' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                            ^
<kernel>:1884:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_copy(r->z, r->t);
                              ^~~~
<kernel>:1121:52: note: passing argument to parameter 'in' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                                                   ^
<kernel>:1885:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(rb[2+signbit], rb[2+signbit], c); /* z for +, t for - */
                       ^~~~~~~~~~~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1885:32: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(rb[2+signbit], rb[2+signbit], c); /* z for +, t for - */
                                      ^~~~~~~~~~~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1886:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(rb[2+(signbit^1)], rb[2+(signbit^1)], c); /* t for +, z for - */
                       ^~~~~~~~~~~~~~~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1886:36: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(rb[2+(signbit^1)], rb[2+(signbit^1)], c); /* t for +, z for - */
                                          ^~~~~~~~~~~~~~~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1914:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, r->y, r->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1914:26: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, r->y, r->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1915:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, r->y, r->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1915:26: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, r->y, r->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1916:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(a, a, q->ysubx);
                             ^~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1917:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(e, b, q->xaddy);
                             ^~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1920:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, r->t, q->t2d);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1920:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, r->t, q->t2d);
                                ^~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1921:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(f, r->z, r->z);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1921:26: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(f, r->z, r->z);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1924:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, e, f);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1925:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->y, h, g);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1926:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->z, g, f);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1927:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->t, e, h);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1934:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                          ^~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1934:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(a, p->y, p->x);
                                ^~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1935:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                          ^~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1935:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(b, p->y, p->x);
                                ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1936:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(a, a, q->ysubx);
                             ^~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1937:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(x, b, q->xaddy);
                             ^~~~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1940:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1940:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(c, p->t, q->t2d);
                                ^~~~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1941:20: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(t, p->z, q->z);
                          ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1941:26: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(t, p->z, q->z);
                                ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1945:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->xaddy, x, t);
                       ^~~~~~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1946:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->ysubx, y, z);
                       ^~~~~~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1947:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->z, z, t);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1948:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->t2d, x, y);
                       ^~~~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1949:21: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_copy(y, r->ysubx);
                           ^~~~~~~~
<kernel>:1121:52: note: passing argument to parameter 'in' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                                                   ^
<kernel>:1950:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub(r->ysubx, r->ysubx, r->xaddy);
                       ^~~~~~~~
<kernel>:1191:28: note: passing argument to parameter 'out' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1950:27: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(r->ysubx, r->ysubx, r->xaddy);
                                 ^~~~~~~~
<kernel>:1191:51: note: passing argument to parameter 'a' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1950:37: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub(r->ysubx, r->ysubx, r->xaddy);
                                           ^~~~~~~~
<kernel>:1191:72: note: passing argument to parameter 'b' here
curve25519_sub(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:1951:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add(r->xaddy, r->xaddy, y);
                       ^~~~~~~~
<kernel>:1136:28: note: passing argument to parameter 'out' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:1951:27: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(r->xaddy, r->xaddy, y);
                                 ^~~~~~~~
<kernel>:1136:51: note: passing argument to parameter 'a' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:1952:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul_const(r->t2d, r->t2d, ge25519_ec2d);
                             ^~~~~~
<kernel>:1355:34: note: passing argument to parameter 'out' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                 ^
<kernel>:1952:31: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul_const(r->t2d, r->t2d, ge25519_ec2d);
                                     ^~~~~~
<kernel>:1355:57: note: passing argument to parameter 'a' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                                        ^
<kernel>:2025:23: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_recip(zi, p->z);
                             ^~~~
<kernel>:1984:53: note: passing argument to parameter 'z' here
curve25519_recip(bignum25519 out, const bignum25519 z) {
                                                    ^
<kernel>:2026:21: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(tx, p->x, zi);
                           ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2027:21: error: passing 'const __generic uint32_t *' (aka 'const __generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(ty, p->y, zi);
                           ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2052:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_expand(r->y, p);
                          ^~~~
<kernel>:1604:31: note: passing argument to parameter 'out' here
curve25519_expand(bignum25519 out, const unsigned char in[32]) {
                              ^
<kernel>:2053:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_copy(r->z, one);
                        ^~~~
<kernel>:1121:29: note: passing argument to parameter 'out' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                            ^
<kernel>:2054:25: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(num, r->y); /* x = y^2 */
                               ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:2056:34: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_sub_reduce(num, num, r->z); /* x = y^1 - 1 */
                                        ^~~~
<kernel>:1223:79: note: passing argument to parameter 'b' here
curve25519_sub_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                              ^
<kernel>:2057:27: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_add(den, den, r->z); /* den = dy^2 + 1 */
                                 ^~~~
<kernel>:1136:72: note: passing argument to parameter 'b' here
curve25519_add(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:2063:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_square(r->x, d3);
                          ^~~~
<kernel>:1453:31: note: passing argument to parameter 'out' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                              ^
<kernel>:2064:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, den);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:2064:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, den);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2065:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, num);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:2065:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, num);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2066:26: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_pow_two252m3(r->x, r->x);
                                ^~~~
<kernel>:2002:37: note: passing argument to parameter 'two252m3' here
curve25519_pow_two252m3(bignum25519 two252m3, const bignum25519 z) {
                                    ^
<kernel>:2066:32: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_pow_two252m3(r->x, r->x);
                                      ^~~~
<kernel>:2002:65: note: passing argument to parameter 'z' here
curve25519_pow_two252m3(bignum25519 two252m3, const bignum25519 z) {
                                                                ^
<kernel>:2069:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, d3);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:2069:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, d3);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2070:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, num);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:2070:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->x, r->x, num);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2073:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_square(t, r->x);
                             ^~~~
<kernel>:1453:54: note: passing argument to parameter 'in' here
curve25519_square(bignum25519 out, const bignum25519 in) {
                                                     ^
<kernel>:2082:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
                curve25519_mul_const(r->x, r->x, ge25519_sqrtneg1);
                                     ^~~~
<kernel>:1355:34: note: passing argument to parameter 'out' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                 ^
<kernel>:2082:30: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
                curve25519_mul_const(r->x, r->x, ge25519_sqrtneg1);
                                           ^~~~
<kernel>:1355:57: note: passing argument to parameter 'a' here
curve25519_mul_const(bignum25519 out, const bignum25519 a, constant uint32_t *b) {
                                                        ^
<kernel>:2085:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_contract(check, r->x);
                                   ^~~~
<kernel>:1649:62: note: passing argument to parameter 'in' here
curve25519_contract(unsigned char out[32], const bignum25519 in) {
                                                             ^
<kernel>:2088:22: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
                curve25519_copy(t, r->x);
                                   ^~~~
<kernel>:1121:52: note: passing argument to parameter 'in' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                                                   ^
<kernel>:2089:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
                curve25519_neg(r->x, t);
                               ^~~~
<kernel>:1240:28: note: passing argument to parameter 'out' here
curve25519_neg(bignum25519 out, const bignum25519 a) {
                           ^
<kernel>:2091:17: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_mul(r->t, r->x, r->y);
                       ^~~~
<kernel>:1258:28: note: passing argument to parameter 'out' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                           ^
<kernel>:2091:23: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, r->x, r->y);
                             ^~~~
<kernel>:1258:51: note: passing argument to parameter 'a' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                  ^
<kernel>:2091:29: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_mul(r->t, r->x, r->y);
                                   ^~~~
<kernel>:1258:72: note: passing argument to parameter 'b' here
curve25519_mul(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                                                       ^
<kernel>:2130:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_expand(t->ysubx, packed +  0);
                          ^~~~~~~~
<kernel>:1604:31: note: passing argument to parameter 'out' here
curve25519_expand(bignum25519 out, const unsigned char in[32]) {
                              ^
<kernel>:2131:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_expand(t->xaddy, packed + 32);
                          ^~~~~~~~
<kernel>:1604:31: note: passing argument to parameter 'out' here
curve25519_expand(bignum25519 out, const unsigned char in[32]) {
                              ^
<kernel>:2132:20: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_expand(t->t2d  , packed + 64);
                          ^~~~~~
<kernel>:1604:31: note: passing argument to parameter 'out' here
curve25519_expand(bignum25519 out, const unsigned char in[32]) {
                              ^
<kernel>:2135:30: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_swap_conditional(t->ysubx, t->xaddy, sign);
                                    ^~~~~~~~
<kernel>:1765:41: note: passing argument to parameter 'a' here
curve25519_swap_conditional(bignum25519 a, bignum25519 b, uint32_t iswap) {
                                        ^
<kernel>:2135:40: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_swap_conditional(t->ysubx, t->xaddy, sign);
                                              ^~~~~~~~
<kernel>:1765:56: note: passing argument to parameter 'b' here
curve25519_swap_conditional(bignum25519 a, bignum25519 b, uint32_t iswap) {
                                                       ^
<kernel>:2136:22: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'const uint32_t *' (aka 'const unsigned int *') changes address space of pointer
        curve25519_neg(neg, t->t2d);
                            ^~~~~~
<kernel>:1240:51: note: passing argument to parameter 'a' here
curve25519_neg(bignum25519 out, const bignum25519 a) {
                                                  ^
<kernel>:2137:30: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_swap_conditional(t->t2d, neg, sign);
                                    ^~~~~~
<kernel>:1765:41: note: passing argument to parameter 'a' here
curve25519_swap_conditional(bignum25519 a, bignum25519 b, uint32_t iswap) {
                                        ^
<kernel>:2155:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_sub_reduce(r->x, t.xaddy, t.ysubx);
                              ^~~~
<kernel>:1223:35: note: passing argument to parameter 'out' here
curve25519_sub_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                  ^
<kernel>:2156:24: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_add_reduce(r->y, t.xaddy, t.ysubx);
                              ^~~~
<kernel>:1166:35: note: passing argument to parameter 'out' here
curve25519_add_reduce(bignum25519 out, const bignum25519 a, const bignum25519 b) {
                                  ^
<kernel>:2160:18: error: passing '__generic uint32_t *' (aka '__generic unsigned int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') changes address space of pointer
        curve25519_copy(r->t, t.t2d);
                        ^~~~
<kernel>:1121:29: note: passing argument to parameter 'out' here
curve25519_copy(bignum25519 out, const bignum25519 in) {
                            ^
\0")))', C:\Users\pj\.cargo\registry\src\github.com-1ecc6299db9ec823
ano-vanity-0.4.14\src\main.rs:406:10
stack backtrace:
   0:     0x7ff6d5d8ca82 - <unknown>
   1:     0x7ff6d5da3f2b - <unknown>
   2:     0x7ff6d5d8990a - <unknown>
   3:     0x7ff6d5d8ec84 - <unknown>
   4:     0x7ff6d5d8e8ba - <unknown>
   5:     0x7ff6d5d8f471 - <unknown>
   6:     0x7ff6d5d8f37d - <unknown>
   7:     0x7ff6d5d8d4af - <unknown>
   8:     0x7ff6d5d8f040 - <unknown>
   9:     0x7ff6d5dae695 - <unknown>
  10:     0x7ff6d5dae7a3 - <unknown>
  11:     0x7ff6d5cfe8bf - <unknown>
  12:     0x7ff6d5d026c7 - <unknown>
  13:     0x7ff6d5d076a6 - <unknown>
  14:     0x7ff6d5d03a6c - <unknown>
  15:     0x7ff6d5d84d7e - <unknown>
  16:     0x7ff6d5d0383c - <unknown>
  17:     0x7ff6d5daa7e4 - <unknown>
  18:     0x7ffa9a5e74b4 - BaseThreadInitThunk
  19:     0x7ffa9abc26a1 - RtlUserThreadStart

@adrianegraphene
Copy link

adrianegraphene commented Jan 2, 2023

So, I had this working fine about a year ago. Something either in the Rust version or windows update, has ruined this. I can't figure out what it is either. I can no longer get what used to work for me.... to work anymore.
Edit: I was getting the exact same set of errors (or close enough). I found that rolling back my GPU drivers to August 31st, 2021 worked. See next comment for details.

@adrianegraphene
Copy link

adrianegraphene commented Jan 3, 2023

Ok, so I figured out the issue for myself using a 3070 GPU on a Lenovo Legion 7 2021 AMD model and I'm convinced I can get it to work for you too.

I simply rolled-back my GPU drivers to the dates that I recall it was working for me... So I downloaded and installed this set of driver from Aug. 2021. I didn't even have to restart my laptop, it just worked after that.

image

Now, for yours... you'll want to try version 471.96 below.
I found your 1080 TI drivers released on the same dates here.
Can you try making a backup of your system, then downloading & running the 1080 TI drivers linked above?

Once installed, you'll want to cargo uninstall nano-vanity and cargo install nano-vanity --features gpu again.

I imagine you're running the most recent branch of nano-vanity... I have a slightly modified version, so if you still get issues after downloading / installing / runnning with the August 31st 2021 drivers, let me know and I'll pass the cleaned version of my modified branch to you for further testing.

Edit: If you're using a different Windows version like 8... you'll want to use this.

@qwahzi
Copy link
Author

qwahzi commented Jan 3, 2023

Wow, thank you so much for the detailed research and workaround @adrianegraphene! That indeed resolved this issue for me! I am now able to run with the -g flag and get >2,000,000 keys/second 🙌

@adrianegraphene
Copy link

You're welcome. Glad to hear you got it working!

@qbbt
Copy link

qbbt commented Feb 11, 2023

Something in the 40xx series release broke this. The last driver 517.48 before that date still works.

@FlatBananoTheory
Copy link

Any chance for a fix for this? 3000 series cards and older have the option to downgrade their driver version, but 4000 series and anything after will be unable to use the GPU flag going forward.

Thanks for supporting this software for so long!

@PlasmaPower
Copy link
Owner

PlasmaPower commented Apr 14, 2023

I was kind of hoping nvidia would fix it, since it definitely seems to be a bug in their drivers. IIRC you can patch the OpenCL kernel a bit to make it work. I'll take a look.

@PlasmaPower
Copy link
Owner

The kernel compilation is currently just hanging on my system, so I'm afraid I can't really build that alternative kernel. I think if you change const to const __generic in the bignum25519 definition and a few other places it might work, but I'm not sure. It's been a while since I last looked at this.

Perhaps you could try opening a bug report with nvidia.

@bbedward
Copy link
Contributor

This solved it for me: #56

No idea if it's the right way to do it per what @PlasmaPower suggested - or how it impacts AMD, etc. But it works fine for me on latest nvidia driver.

@PlasmaPower
Copy link
Owner

This is fixed with #56. My guess is AMD is (still?) not working though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants