You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded my kernel from 4.16.0 to 4.18.0 and when I tried to recompile the .ko module and the hacked iproute2, it failed.
I use Debian, all dependencies satisfied. Everything go fine when switching back to 4.16
====================
user@localhost:/dev/shm/af-graft-master# make -C kmod/
make: Entering directory '/dev/shm/af-graft-master/kmod'
echo -I/../include/
-I/../include/
make -C /lib/modules/4.18.0-3-amd64/build M=/dev/shm/af-graft-master/kmod V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-3-amd64'
CC [M] /dev/shm/af-graft-master/kmod/af_graft.o
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_getname’:
/dev/shm/af-graft-master/kmod/af_graft.c:684:45: warning: passing argument 3 of ‘hsock->ops->getname’ makes integer from pointer without a cast [-Wint-conversion]
return hsock->ops->getname(hsock, uaddr, uaddr_len,
^~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c:684:45: note: expected ‘int’ but argument is of type ‘int *’
/dev/shm/af-graft-master/kmod/af_graft.c:684:11: error: too many arguments to function ‘hsock->ops->getname’
return hsock->ops->getname(hsock, uaddr, uaddr_len,
^~~~~
/dev/shm/af-graft-master/kmod/af_graft.c: At top level:
/dev/shm/af-graft-master/kmod/af_graft.c:996:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.getname = graft_getname,
^~~~~~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c:996:13: note: (near initialization for ‘graft_proto_ops.getname’)
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_sso_delayed_result’:
/dev/shm/af-graft-master/kmod/af_graft.c:460:3: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_to_user(ptr, &sso->res, res_siz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_setsockopt’:
/dev/shm/af-graft-master/kmod/af_graft.c:780:2: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_from_user(buf, optval, optlen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.18.0-3-common/scripts/Makefile.build:329: /dev/shm/af-graft-master/kmod/af_graft.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.18.0-3-common/Makefile:1519: module/dev/shm/af-graft-master/kmod] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-3-amd64'
make: *** [Makefile:11: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/kmod'
=================
user@localhost:/dev/shm/af-graft-master# make -C iproute2-4.10.0/
make: Entering directory '/dev/shm/af-graft-master/iproute2-4.10.0'
sh configure /usr/include
TC schedulers
ATM no
libc has setns: yes
SELinux support: yes
ELF support: no
libmnl support: no
Berkeley DB: no
docs: latex: yes
pdflatex: yes
sgml2latex: no
WARNING: no LaTeX files can be build from SGML files
sgml2html: no
WARNING: no HTML docs can be built from SGML
lib
make[1]: Entering directory '/dev/shm/af-graft-master/iproute2-4.10.0/lib'
CC libgenl.o
[...]
CC m_ematch.o
m_ematch.c: In function ‘lookup_map.constprop’:
m_ematch.c:78:5: warning: ‘strncpy’ output may be truncated copying 31 bytes from a string of length 511 [-Wstringop-truncation]
strncpy(dst, namebuf, len - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
YACC emp_ematch.yacc.c
"emp_ematch.y", line 9: junk after `%%' in definition section
"emp_ematch.y", line 9: no input grammar
free(): double free detected in tcache 2
Aborted
make[1]: *** [Makefile:165: emp_ematch.yacc.c] Error 134
make[1]: Leaving directory '/dev/shm/af-graft-master/iproute2-4.10.0/tc'
make: *** [Makefile:66: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/iproute2-4.10.0'
=============
user@localhost:/dev/shm/af-graft-master# make -C iproute2-4.15.0/
make: Entering directory '/dev/shm/af-graft-master/iproute2-4.15.0'
sh configure /usr/include
TC schedulers
ATM no
libc has setns: yes
SELinux support: yes
ELF support: no
libmnl support: no
Berkeley DB: no
need for strlcpy: yes
docs: latex: yes
pdflatex: yes
sgml2latex: no
WARNING: no LaTeX files can be build from SGML files
sgml2html: no
WARNING: no HTML docs can be built from SGML
lib
CC libgenl.o
[...]
CC m_ematch.o
m_ematch.c: In function ‘lookup_map.constprop’:
m_ematch.c:77:5: warning: ‘strncpy’ output may be truncated copying 31 bytes from a string of length 511 [-Wstringop-truncation]
strncpy(dst, namebuf, len - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
YACC emp_ematch.yacc.c
"emp_ematch.y", line 9: junk after `%%' in definition section
"emp_ematch.y", line 9: no input grammar
free(): double free detected in tcache 2
Aborted
make[1]: *** [Makefile:167: emp_ematch.yacc.c] Error 134
make: *** [Makefile:66: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/iproute2-4.15.0'
The text was updated successfully, but these errors were encountered:
I tested on kernel 4.18 and the kmod is now compiling.
user@localhost:~$ uname --all
Linux localhost 4.18.0-0.bpo.3-amd64 #1 SMP Debian 4.18.20-2~bpo9+1 (2018-12-08) x86_64 GNU/Linux
Same errors appear again with iproute2-4.10.0, iproute2-4.15.0 and iproute2-4.19.0 folders when compiling, but the iproute2 command is created fine and works normally.
I upgraded my kernel from 4.16.0 to 4.18.0 and when I tried to recompile the .ko module and the hacked iproute2, it failed.
I use Debian, all dependencies satisfied. Everything go fine when switching back to 4.16
====================
user@localhost:/dev/shm/af-graft-master# make -C kmod/
make: Entering directory '/dev/shm/af-graft-master/kmod'
echo -I/../include/
-I/../include/
make -C /lib/modules/4.18.0-3-amd64/build M=/dev/shm/af-graft-master/kmod V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-3-amd64'
CC [M] /dev/shm/af-graft-master/kmod/af_graft.o
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_getname’:
/dev/shm/af-graft-master/kmod/af_graft.c:684:45: warning: passing argument 3 of ‘hsock->ops->getname’ makes integer from pointer without a cast [-Wint-conversion]
return hsock->ops->getname(hsock, uaddr, uaddr_len,
^~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c:684:45: note: expected ‘int’ but argument is of type ‘int *’
/dev/shm/af-graft-master/kmod/af_graft.c:684:11: error: too many arguments to function ‘hsock->ops->getname’
return hsock->ops->getname(hsock, uaddr, uaddr_len,
^~~~~
/dev/shm/af-graft-master/kmod/af_graft.c: At top level:
/dev/shm/af-graft-master/kmod/af_graft.c:996:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.getname = graft_getname,
^~~~~~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c:996:13: note: (near initialization for ‘graft_proto_ops.getname’)
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_sso_delayed_result’:
/dev/shm/af-graft-master/kmod/af_graft.c:460:3: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_to_user(ptr, &sso->res, res_siz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dev/shm/af-graft-master/kmod/af_graft.c: In function ‘graft_setsockopt’:
/dev/shm/af-graft-master/kmod/af_graft.c:780:2: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_from_user(buf, optval, optlen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.18.0-3-common/scripts/Makefile.build:329: /dev/shm/af-graft-master/kmod/af_graft.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.18.0-3-common/Makefile:1519: module/dev/shm/af-graft-master/kmod] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-3-amd64'
make: *** [Makefile:11: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/kmod'
=================
user@localhost:/dev/shm/af-graft-master# make -C iproute2-4.10.0/
make: Entering directory '/dev/shm/af-graft-master/iproute2-4.10.0'
sh configure /usr/include
TC schedulers
ATM no
libc has setns: yes
SELinux support: yes
ELF support: no
libmnl support: no
Berkeley DB: no
docs: latex: yes
pdflatex: yes
sgml2latex: no
WARNING: no LaTeX files can be build from SGML files
sgml2html: no
WARNING: no HTML docs can be built from SGML
lib
make[1]: Entering directory '/dev/shm/af-graft-master/iproute2-4.10.0/lib'
CC libgenl.o
[...]
m_ematch.c: In function ‘lookup_map.constprop’:
m_ematch.c:78:5: warning: ‘strncpy’ output may be truncated copying 31 bytes from a string of length 511 [-Wstringop-truncation]
strncpy(dst, namebuf, len - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
YACC emp_ematch.yacc.c
"emp_ematch.y", line 9: junk after `%%' in definition section
"emp_ematch.y", line 9: no input grammar
free(): double free detected in tcache 2
Aborted
make[1]: *** [Makefile:165: emp_ematch.yacc.c] Error 134
make[1]: Leaving directory '/dev/shm/af-graft-master/iproute2-4.10.0/tc'
make: *** [Makefile:66: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/iproute2-4.10.0'
=============
user@localhost:/dev/shm/af-graft-master# make -C iproute2-4.15.0/
make: Entering directory '/dev/shm/af-graft-master/iproute2-4.15.0'
sh configure /usr/include
TC schedulers
ATM no
libc has setns: yes
SELinux support: yes
ELF support: no
libmnl support: no
Berkeley DB: no
need for strlcpy: yes
docs: latex: yes
pdflatex: yes
sgml2latex: no
WARNING: no LaTeX files can be build from SGML files
sgml2html: no
WARNING: no HTML docs can be built from SGML
lib
CC libgenl.o
[...]
m_ematch.c: In function ‘lookup_map.constprop’:
m_ematch.c:77:5: warning: ‘strncpy’ output may be truncated copying 31 bytes from a string of length 511 [-Wstringop-truncation]
strncpy(dst, namebuf, len - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
YACC emp_ematch.yacc.c
"emp_ematch.y", line 9: junk after `%%' in definition section
"emp_ematch.y", line 9: no input grammar
free(): double free detected in tcache 2
Aborted
make[1]: *** [Makefile:167: emp_ematch.yacc.c] Error 134
make: *** [Makefile:66: all] Error 2
make: Leaving directory '/dev/shm/af-graft-master/iproute2-4.15.0'
The text was updated successfully, but these errors were encountered: