-
Notifications
You must be signed in to change notification settings - Fork 4
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
[patch v1]: fix compilation error on kernel > 6 #9
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Isaev Ruslan <[email protected]>
@legale do you have any idea what's needed to get it working on 6.6.x? |
This works asfaik. Not sure about exact version I have tested.
…On September 7, 2024 6:12:22 PM GMT+03:00, aabdellah ***@***.***> wrote:
@legale do you have any idea what's needed to get it working on 6.6.x?
--
Reply to this email directly or view it on GitHub:
#9 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
There are some conflicts with crypto functions:
|
I've tried on latest debian stable kernel. 6.1.0-22 I think.
Will try to find out what is the problem here on 6.6
…On Sat, Sep 7, 2024, 19:05 aabdellah ***@***.***> wrote:
There are some conflicts with crypto functions:
DKMS make.log for notwireguard-1.0.20220627 for kernel 6.6.20+rpt-rpi-2712
(aarch64) Tue 12 Mar 13:14:57 EET 2024 make: Entering directory
'/usr/src/linux-headers-6.6.20+rpt-rpi-2712' CC [M]
/var/lib/dkms/notwireguard/1.0.20220627/build/main.o CC [M]
/var/lib/dkms/notwireguard/1.0.20220627/build/noise.o CC [M]
/var/lib/dkms/notwireguard/1.0.20220627/build/device.o CC [M]
/var/lib/dkms/notwireguard/1.0.20220627/build/peer.o In file included from
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/crypto/algapi.h:10,
from /var/lib/dkms/notwireguard/1.0.20220627/build/noise.c:18:
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/crypto/utils.h:68:19:
error: redefinition of ‘crypto_memneq’ 68 | static inline int
crypto_memneq(const void *a, const void *b, size_t size) | ^~~~~~~~~~~~~ In
file included from <command-line>:
/var/lib/dkms/notwireguard/1.0.20220627/build/compat/memneq/include.h:2:19:
note: previous definition of ‘crypto_memneq’ with type ‘int(const void *,
const void *, size_t)’ {aka ‘int(const void *, const void *, long unsigned
int)’} 2 | static inline int crypto_memneq(const void *a, const void *b,
size_t size) | ^~~~~~~~~~~~~ CC [M]
/var/lib/dkms/notwireguard/1.0.20220627/build/timers.o make[2]: ***
[/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248:
/var/lib/dkms/notwireguard/1.0.20220627/build/noise.o] Error 1 make[2]: ***
Waiting for unfinished jobs....
/var/lib/dkms/notwireguard/1.0.20220627/build/device.c: In function
‘wg_xmit’: /var/lib/dkms/notwireguard/1.0.20220627/build/device.c:170:40:
error: implicit declaration of function ‘skb_gso_segment’; did you mean
‘skb_gso_reset’? [-Werror=implicit-function-declaration] 170 | struct
sk_buff *segs = skb_gso_segment(skb, 0); | ^~~~~~~~~~~~~~~ | skb_gso_reset
/var/lib/dkms/notwireguard/1.0.20220627/build/device.c:170:40: warning:
initialization of ‘struct sk_buff *’ from ‘int’ makes pointer from integer
without a cast [-Wint-conversion] cc1: some warnings being treated as
errors make[2]: ***
[/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248:
/var/lib/dkms/notwireguard/1.0.20220627/build/device.o] Error 1
/var/lib/dkms/notwireguard/1.0.20220627/build/timers.c: In function
‘wg_timers_data_sent’:
/var/lib/dkms/notwireguard/1.0.20220627/build/timers.c:150:25: error:
implicit declaration of function ‘prandom_u32_max’; did you mean
‘prandom_u32_state’? [-Werror=implicit-function-declaration] 150 |
prandom_u32_max(REKEY_TIMEOUT_JITTER_MAX_JIFFIES)); | ^~~~~~~~~~~~~~~ |
prandom_u32_state cc1: some warnings being treated as errors make[2]: ***
[/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248:
/var/lib/dkms/notwireguard/1.0.20220627/build/timers.o] Error 1 make[1]:
*** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:1938:
/var/lib/dkms/notwireguard/1.0.20220627/build] Error 2 make: ***
[/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:246: __sub-make]
Error 2 make: Leaving directory '/usr/src/linux-headers-6.6.20+rpt-rpi-2712'
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY4JFY7M5NJGWKIXAMXLJLZVMP4JAVCNFSM6AAAAABNCJ53IOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZVG4YTEOBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think this "problem" came with 6.4 kernel. Need to rename crypto_memneq to avoid name conflict on kernel > 6.3 Take a look here: https://github.com/torvalds/linux/blob/6995e2de6891c724bfeb2db33d7b87775f913ad1/include/crypto/utils.h#L56 |
Well, I commented it out and made it use the kernel one, then fixed some other issues and it compiled without issue. here's the patch: Now there's a NULL pointer dereference issue on starting nwg-quick: Sep 07 16:26:21 raspberrypi systemd[1]: Starting [email protected] - NotWireGuard via nwg-quick(8) for nwg0... |
make it work for kernel 6
tested on kernel 6.1.0-22