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

mvebu build error #15108

Open
1 task done
anomeome opened this issue Apr 8, 2024 · 13 comments
Open
1 task done

mvebu build error #15108

anomeome opened this issue Apr 8, 2024 · 13 comments
Labels
bug issue report with a confirmed bug invalid

Comments

@anomeome
Copy link
Contributor

anomeome commented Apr 8, 2024

Describe the bug

PR15098 issue with target, see a number of resolutions as indicated in PR15064 by way of workarounds, or are things to be fixed

In file included from ./include/linux/string.h:294,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/string.h:3,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/smp.h:13,
                 from ./include/linux/lockdep.h:14,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/lockdep.h:3,
                 from ./include/linux/spinlock.h:63,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/spinlock.h:3,
                 from ./include/linux/wait.h:9,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/wait.h:3,
                 from ./include/linux/wait_bit.h:8,
                 from ./include/linux/fs.h:6,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/fs.h:3,
                 from ./include/linux/highmem.h:5,
                 from ./include/linux/bvec.h:10,
                 from ./include/linux/skbuff.h:17,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from ../../../../staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/mac80211-backport/linux/etherdevice.h:3,
                 from ../mwlwifi-2023.11.29~ebf31674/hif/pcie/8864/rx.c:18:
In function 'fortify_memset_chk',
    inlined from 'pcie_8864_rx_recv' at ../mwlwifi-2023.11.29~ebf31674/hif/pcie/8864/rx.c:455:5:
./include/linux/fortify-string.h:493:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  493 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:243: /home/kc/wrtpac/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/mwlwifi-2023.11.29~ebf31674/hif/pcie/8864/rx.o] Error 1
make[5]: *** [/home/kc/wrtpac/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-6.6.25/Makefile:1913: /home/kc/wrtpac/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/mwlwifi-2023.11.29~ebf31674] Error 2
make[4]: *** [Makefile:234: __sub-make] Error 2
make[4]: Leaving directory '/home/kc/wrtpac/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-6.6.25'
make[3]: *** [Makefile:103: /home/kc/wrtpac/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/mwlwifi-2023.11.29~ebf31674/.built] Error 2
make[3]: Leaving directory '/home/kc/wrtpac/source/package/kernel/mwlwifi'
time: package/kernel/mwlwifi/compile#1.49#0.49#1.97
    ERROR: package/kernel/mwlwifi failed to build.
make[2]: *** [package/Makefile:129: package/kernel/mwlwifi/compile] Error 1

OpenWrt version

master

OpenWrt release

master

OpenWrt target/subtarget

mvebu

Device

mvebu

Image kind

Self-built image

Steps to reproduce

No response

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@anomeome anomeome added the bug issue report with a confirmed bug label Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

Invalid Version reported. master
Is this from a clean repository?

Copy link

github-actions bot commented Apr 8, 2024

Invalid Release reported. master
Is this from a clean repository?

Copy link

github-actions bot commented Apr 8, 2024

Invalid Target/Subtarget reported. mvebu
Is this from a supported device?

@neheb
Copy link
Contributor

neheb commented Apr 10, 2024

memset on struct member. Maybe @Ansuel knows more.

@neheb
Copy link
Contributor

neheb commented Apr 10, 2024

@anomeome try

--- a/hif/pcie/dev.h
+++ b/hif/pcie/dev.h
@@ -223,7 +223,7 @@ struct pcie_desc_data {
 struct pcie_dma_data {
        __le16 fwlen;
        struct ieee80211_hdr wh;
-       char data[0];
+       char data[];
 } __packed;
 
 /* New Data Path */

for mwlwifi. Source: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20240409&id=2a18a5502648128288ed62edf02018ffc08c69d6

@anomeome
Copy link
Contributor Author

Thanks, build succeeds with patch. I do not use the radios on these anymore, so will leave testing to anyone still banging their head against that wall. As far as getting this into master, upstream is a bit tenuous regarding timeliness, both here and there perhaps?

@neheb
Copy link
Contributor

neheb commented Apr 10, 2024

I’ll wrap up a patch soon.

@neheb
Copy link
Contributor

neheb commented Apr 11, 2024

hrm I'd like to get runtime testing of https://github.com/neheb/mwlwifi/commits/mangix/

Oh well.

@stklcode
Copy link
Contributor

I’ll wrap up a patch soon.

Quickly tested the upstream fix, seems to work fine.

hrm I'd like to get runtime testing of https://github.com/neheb/mwlwifi/commits/mangix/

Tested this one as well. Just a very quick run, radios come up, clients connect on both 5 and 2.4GHz and packets go through. No Errors in the logs.

Both on a WRT1900ACS with Kernel 6.6.25 built on top of r25876.

@anomeome
Copy link
Contributor Author

Fixed with upstream PR418

@neheb
Copy link
Contributor

neheb commented Apr 13, 2024

True but it’s neither merged nor applied to OpenWrt.

@ynezz ynezz reopened this Apr 14, 2024
stklcode added a commit to stklcode/openwrt that referenced this issue Apr 19, 2024
This update contains a minor fix to resolve "detected write beyond size
of field" warning during compilation:
* "replace [0] with []" (1d0d08c)

All patches still apply.

References:
* openwrt#15108

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
@robimarko
Copy link
Contributor

Anybody else seeing this when building for mvebu/cortex-a53 and kernel 6.6?

  CC [M]  /home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.o
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c: In function 'mwl_debugfs_info_read':
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:367:99: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  367 |                                 "wcb_base0   : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
      |                                                                                                   ^
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:367:162: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  367 |                                 "wcb_base0   : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
      |                                                                                                                                                                  ^
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:367:152: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  367 |                                 "wcb_base0   : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
      |                                                                                                                                                        ^
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:370:105: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  370 |                                 "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
      |                                                                                                         ^
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:370:170: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  370 |                                 "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
      |                                                                                                                                                                          ^
/home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.c:370:160: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  370 |                                 "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
      |                                                                                                                                                                ^
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243: /home/robimarko/Building/mwlwifi-openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/mwlwifi-2024.04.19~a737d348/debugfs.o] Error 1

robimarko pushed a commit to stklcode/openwrt that referenced this issue Apr 23, 2024
This update contains a minor fix to resolve "detected write beyond size
of field" warning during compilation:
* "replace [0] with []" (1d0d08c)

All patches still apply.

References:
* openwrt#15108

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
@neheb
Copy link
Contributor

neheb commented Apr 23, 2024

--- a/debugfs.c
+++ b/debugfs.c
@@ -364,10 +364,10 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf,
                         "-----------------------=>  address| address|qlen|fw_desc_cnt\n");
                spin_lock_irqsave(&pcie_priv->tx_desc_lock, flags);
                len += scnprintf(p + len, size - len,
-                               "wcb_base0   : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
+                               "wcb_base0   : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, le32_to_cpu(get_hw_spec->wcb_base0),&get_hw_spec->wcb_base0,skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
                for(i = 0; i < SYSADPT_TOTAL_TX_QUEUES - 1; i++)
                        len += scnprintf(p + len, size - len,
-                               "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
+                               "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], get_hw_spec->wcb_base[i],&get_hw_spec->wcb_base[i],skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
                spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags);
        }
 

Change is 100% wrong but it does compile.

Vladdrako pushed a commit to Vladdrako/openwrt that referenced this issue Apr 28, 2024
This update contains a minor fix to resolve "detected write beyond size
of field" warning during compilation:
* "replace [0] with []" (1d0d08c)

All patches still apply.

References:
* openwrt#15108

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug invalid
Projects
None yet
Development

No branches or pull requests

5 participants