Discussion:
[Madwifi-devel] Madwifi compile warnings (2.6.38)
Teco Boot
2011-09-07 11:22:35 UTC
Permalink
I've some warnings compiling madwifi version with 2.6.38
(Voyage Linux 0.7.5). See below the details. Bypass is:
remove -Werror in line "WARNINGS = -Werror -Wall" in file
Makefile.inc. I didn't see problems with compiled madwifi
in 2.6.38 (yet...).

In 2.6.32, there is no problem.

Is someone on this mail-list willing to check?
Other mail list?

Thanks, Teco


My in_use version:
==================
CC [M] /home/madwifi/madwifi-0.9.4-r4136-20110203/net80211/ieee80211_wireless.o
cc1: warnings being treated as errors
In file included from /usr/src/linux-source-2.6.38-voyage/arch/x86/include/asm/uaccess.h:571,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from include/linux/if_ether.h:126,
from include/linux/netdevice.h:29,
from /home/madwifi/madwifi-0.9.4-r4136-20110203/net80211/../include/compat.h:45,
from <command-line>:0:
In function 'copy_from_user',
inlined from 'ieee80211_ioctl_setmode' at /home/madwifi/madwifi-0.9.4-r4136-20110203/net80211/ieee80211_wireless.c:1939:
/usr/src/linux-source-2.6.38-voyage/arch/x86/include/asm/uaccess_32.h:212: error: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
make[3]: *** [/home/madwifi/madwifi-0.9.4-r4136-20110203/net80211/ieee80211_wireless.o] Error 1
make[2]: *** [/home/madwifi/madwifi-0.9.4-r4136-20110203/net80211] Error 2
make[1]: *** [_module_/home/madwifi/madwifi-0.9.4-r4136-20110203] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.38-voyage'
make: *** [modules] Error 2


Current_build version:
======================
CC [M] /home/madwifi/madwifi-0.9.4-r4167-20110827/net80211/ieee80211_wireless.o
cc1: warnings being treated as errors
In file included from /usr/src/linux-source-2.6.38-voyage/arch/x86/include/asm/uaccess.h:571,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from include/linux/if_ether.h:126,
from include/linux/netdevice.h:29,
from /home/madwifi/madwifi-0.9.4-r4167-20110827/net80211/../include/compat.h:45,
from <command-line>:0:
In function 'copy_from_user',
inlined from 'ieee80211_ioctl_setmode' at /home/madwifi/madwifi-0.9.4-r4167-20110827/net80211/ieee80211_wireless.c:1938:
/usr/src/linux-source-2.6.38-voyage/arch/x86/include/asm/uaccess_32.h:212: error: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
make[3]: *** [/home/madwifi/madwifi-0.9.4-r4167-20110827/net80211/ieee80211_wireless.o] Error 1
make[2]: *** [/home/madwifi/madwifi-0.9.4-r4167-20110827/net80211] Error 2
make[1]: *** [_module_/home/madwifi/madwifi-0.9.4-r4167-20110827] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.38-voyage'
make: *** [modules] Error 2
Pavel Roskin
2011-09-10 02:16:58 UTC
Permalink
Post by Teco Boot
I've some warnings compiling madwifi version with 2.6.38
remove -Werror in line "WARNINGS = -Werror -Wall" in file
Makefile.inc. I didn't see problems with compiled madwifi
in 2.6.38 (yet...).
In 2.6.32, there is no problem.
...
Post by Teco Boot
error: call to 'copy_from_user_overflow' declared with attribute
warning: copy_from_user() buffer size is not provably correct
This is a new check absent in older kernels.

But it catches a problem in Linux headers, not in MadWifi. I don't
think there is an easy way for the MadWifi build system to ignore
warnings in Linux headers, but not in MadWifi itself.
--
Regards,
Pavel Roskin
Teco Boot
2011-09-10 07:23:42 UTC
Permalink
Thanks. I'll check what I can (let) do in the Linux kernel / headers.

BTW, I always need to patch for full functions (QoS, 4-address mode, BSSID multicast filter) in AHDEMO. Ronald in't Velt helped me with the patch. Are you willing to adopt the patch? See attachment for details.
(I apply the .rej files, it shows I am not a developer with right tools :=)

Thanks, Teco
Pavel Roskin
2011-09-10 14:59:15 UTC
Permalink
Post by Teco Boot
Thanks. I'll check what I can (let) do in the Linux kernel / headers.
I think it was fixed in later kernels. Or maybe your compiler process
that code correctly. The copy_from_user() check relies on the
compiler optimizing out some code, and it's known to have problems
with some gcc versions.
https://lkml.org/lkml/2011/5/30/350
Post by Teco Boot
BTW, I always need to patch for full functions (QoS, 4-address mode,
BSSID multicast filter) in AHDEMO. Ronald in't Velt helped me with
the patch. Are you willing to adopt the patch? See attachment for
details.
(I apply the .rej files, it shows I am not a developer with right tools :=)
There is no way I can apply a patch that is not submitted by its
original author and that has the word "hack" in it.
--
Regards,
Pavel Roskin
Loading...