Giter Site home page Giter Site logo

natflow's Introduction

Coding.. 👋

https://github-readme-stats.vercel.app/api/top-langs/?username=ptpt52&hide=pawn&langs_count=8&layout=compact

natflow's People

Contributors

deepsource-io[bot] avatar ptpt52 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

natflow's Issues

natflow user warning log

[ 9725.731703] ------------[ cut here ]------------
[ 9725.731996] WARNING: CPU: 2 PID: 7191 at net/netfilter/nf_conntrack_core.c:1382 nf_conntrack_free+0x88/0x90 [nf_conntrack]
[ 9725.735436] Modules linked in: ksmbd qcserial pppoe ppp_async option cdc_mbim batman_adv ath10k_pci ath10k_core ath wireguard usb_wwan sierra_net sierra rndis_host qmi_wwan pptp pppox ppp_mppe ppp_generic pl2303 mac80211 libchacha20poly1305 libblake2s ipt_REJECT huawei_cdc_ncm curve25519_neon cfg80211 cdc_ncm cdc_ether xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_socket xt_recent xt_quota xt_pkttype xt_physdev xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_ipp2p xt_iface xt_hl xt_helper xt_hashlimit xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_NFQUEUE xt_NETMAP xt_MASQUERADE xt_LOG xt_IPMARK xt_HL xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet usblp ts_fsm ts_bm tcp_hybla tcp_bbr slhc sch_cake r8152 poly1305_arm ntfs3 nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_objref nft_numgen nft_meta_bridge nft_log nft_limit
[ 9725.736004]  nft_hash nft_fwd_netdev nft_dup_netdev nft_ct nft_counter nfnetlink_queue nf_tproxy_ipv6 nf_tproxy_ipv4 nf_tables_set nf_tables nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_rtsp nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_log_ipv4 nf_dup_netdev nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtsp nf_conntrack_pptp nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda nf_conncount macvlan libcurve25519_generic libcrc32c libblake2s_generic ipvlan iptable_raw iptable_nat iptable_mangle iptable_filter ipt_ah ipt_ECN ipheth ip_tables hwmon crc_ccitt compat_xtables compat chacha_neon cdc_wdm br_netfilter asn1_decoder natflow natcap fuse sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact ledtrig_usbport xt_set ip_set_list_set
[ 9725.811692]  ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip6t_NPT ip6t_rt ip6t_mh ip6t_ipv6header ip6t_hbh ip6t_frag ip6t_eui64 ip6t_ah nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos bonding ip6_gre ip_gre gre ifb nat46 ip6_udp_tunnel udp_tunnel sit ip6_tunnel tunnel6 tunnel4 ip_tunnel rpcsec_gss_krb5 auth_rpcgss oid_registry tun vfat fat lockd sunrpc grace autofs4 nls_utf8 nls_iso8859_1 nls_cp437 sha1_generic sha1_arm_neon sha1_arm md5 md4 ghash_generic ghash_arm_ce gf128mul gcm cts cmac ccm arc4 uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl
[ 9725.897843]  sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat mii crc32c_generic
[ 9726.007241] CPU: 2 PID: 7191 Comm: kworker/2:1 Not tainted 5.4.155 #0
[ 9726.016493] Hardware name: Generic DT based system
[ 9726.022922] Workqueue: events_power_efficient gc_worker [nf_conntrack]
[ 9726.027533] [<c030e030>] (unwind_backtrace) from [<c030aa44>] (show_stack+0x10/0x14)
[ 9726.034041] [<c030aa44>] (show_stack) from [<c0841c68>] (dump_stack+0x8c/0xa0)
[ 9726.041935] [<c0841c68>] (dump_stack) from [<c032110c>] (__warn+0xb4/0xd0)
[ 9726.048965] [<c032110c>] (__warn) from [<c0321190>] (warn_slowpath_fmt+0x68/0x78)
[ 9726.055894] [<c0321190>] (warn_slowpath_fmt) from [<bf399a7c>] (nf_conntrack_free+0x88/0x90 [nf_conntrack])
[ 9726.063498] [<bf399a7c>] (nf_conntrack_free [nf_conntrack]) from [<c0761b44>] (nf_conntrack_destroy+0x20/0x28)
[ 9726.072969] [<c0761b44>] (nf_conntrack_destroy) from [<bf39ad54>] (gc_worker+0x228/0x2f4 [nf_conntrack])
[ 9726.083076] [<bf39ad54>] (gc_worker [nf_conntrack]) from [<c0338964>] (process_one_work+0x1d4/0x434)
[ 9726.092637] [<c0338964>] (process_one_work) from [<c0338c28>] (worker_thread+0x64/0x5b8)
[ 9726.101747] [<c0338c28>] (worker_thread) from [<c033e00c>] (kthread+0x130/0x134)
[ 9726.109818] [<c033e00c>] (kthread) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[ 9726.117189] Exception stack(0xcd37bfb0 to 0xcd37bff8)
[ 9726.124218] bfa0:                                     00000000 00000000 00000000 00000000
[ 9726.129347] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 9726.137505] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 9726.145698] ---[ end trace a51d4b5ef580db08 ]---
[ 9726.153837] ------------[ cut here ]------------
[ 9726.157087] WARNING: CPU: 2 PID: 7191 at net/netfilter/nf_conntrack_core.c:1382 nf_conntrack_free+0x88/0x90 [nf_conntrack]
[ 9726.161553] Modules linked in: ksmbd qcserial pppoe ppp_async option cdc_mbim batman_adv ath10k_pci ath10k_core ath wireguard usb_wwan sierra_net sierra rndis_host qmi_wwan pptp pppox ppp_mppe ppp_generic pl2303 mac80211 libchacha20poly1305 libblake2s ipt_REJECT huawei_cdc_ncm curve25519_neon cfg80211 cdc_ncm cdc_ether xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_socket xt_recent xt_quota xt_pkttype xt_physdev xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_ipp2p xt_iface xt_hl xt_helper xt_hashlimit xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_NFQUEUE xt_NETMAP xt_MASQUERADE xt_LOG xt_IPMARK xt_HL xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet usblp ts_fsm ts_bm tcp_hybla tcp_bbr slhc sch_cake r8152 poly1305_arm ntfs3 nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_objref nft_numgen nft_meta_bridge nft_log nft_limit
[ 9726.161727]  nft_hash nft_fwd_netdev nft_dup_netdev nft_ct nft_counter nfnetlink_queue nf_tproxy_ipv6 nf_tproxy_ipv4 nf_tables_set nf_tables nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_rtsp nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_log_ipv4 nf_dup_netdev nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtsp nf_conntrack_pptp nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda nf_conncount macvlan libcurve25519_generic libcrc32c libblake2s_generic ipvlan iptable_raw iptable_nat iptable_mangle iptable_filter ipt_ah ipt_ECN ipheth ip_tables hwmon crc_ccitt compat_xtables compat chacha_neon cdc_wdm br_netfilter asn1_decoder natflow natcap fuse sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact ledtrig_usbport xt_set ip_set_list_set
[ 9726.238469]  ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip6t_NPT ip6t_rt ip6t_mh ip6t_ipv6header ip6t_hbh ip6t_frag ip6t_eui64 ip6t_ah nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos bonding ip6_gre ip_gre gre ifb nat46 ip6_udp_tunnel udp_tunnel sit ip6_tunnel tunnel6 tunnel4 ip_tunnel rpcsec_gss_krb5 auth_rpcgss oid_registry tun vfat fat lockd sunrpc grace autofs4 nls_utf8 nls_iso8859_1 nls_cp437 sha1_generic sha1_arm_neon sha1_arm md5 md4 ghash_generic ghash_arm_ce gf128mul gcm cts cmac ccm arc4 uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl
[ 9726.324009]  sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat mii crc32c_generic
[ 9726.433376] CPU: 2 PID: 7191 Comm: kworker/2:1 Tainted: G        W         5.4.155 #0
[ 9726.442623] Hardware name: Generic DT based system
[ 9726.450444] Workqueue: events_power_efficient gc_worker [nf_conntrack]
[ 9726.455050] [<c030e030>] (unwind_backtrace) from [<c030aa44>] (show_stack+0x10/0x14)
[ 9726.461557] [<c030aa44>] (show_stack) from [<c0841c68>] (dump_stack+0x8c/0xa0)
[ 9726.469454] [<c0841c68>] (dump_stack) from [<c032110c>] (__warn+0xb4/0xd0)
[ 9726.476483] [<c032110c>] (__warn) from [<c0321190>] (warn_slowpath_fmt+0x68/0x78)
[ 9726.483407] [<c0321190>] (warn_slowpath_fmt) from [<bf399a7c>] (nf_conntrack_free+0x88/0x90 [nf_conntrack])
[ 9726.490978] [<bf399a7c>] (nf_conntrack_free [nf_conntrack]) from [<c0761b44>] (nf_conntrack_destroy+0x20/0x28)
[ 9726.500503] [<c0761b44>] (nf_conntrack_destroy) from [<bf39ad54>] (gc_worker+0x228/0x2f4 [nf_conntrack])
[ 9726.510587] [<bf39ad54>] (gc_worker [nf_conntrack]) from [<c0338964>] (process_one_work+0x1d4/0x434)
[ 9726.520153] [<c0338964>] (process_one_work) from [<c0338c28>] (worker_thread+0x64/0x5b8)
[ 9726.529265] [<c0338c28>] (worker_thread) from [<c033e00c>] (kthread+0x130/0x134)
[ 9726.537334] [<c033e00c>] (kthread) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[ 9726.544707] Exception stack(0xcd37bfb0 to 0xcd37bff8)
[ 9726.551735] bfa0:                                     00000000 00000000 00000000 00000000
[ 9726.556865] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 9726.565024] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 9726.573213] ---[ end trace a51d4b5ef580db09 ]---

编译出错

make[2]: Leaving directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/package/kernel/linux'
time: package/kernel/linux/compile#3.09#0.42#3.50
make[2]: Entering directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/package/network/utils/ipset'
make[2]: Leaving directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/package/network/utils/ipset'
time: package/network/utils/ipset/compile#0.13#0.09#0.20
make[2]: Entering directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/feeds/x/natflow'
rm -f /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125/.built
touch /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125/.built_check
make -j1 -C "/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/linux-6.1.75" EXTRA_CFLAGS="-DCONFIG_NATFLOW_PATH -DCONFIG_NATFLOW_URLLOGGER" KCFLAGS="-fmacro-prefix-map=/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi=target-arm_cortex-a9+vfpv3-d16_musl_eabi -fno-caller-saves " HOSTCFLAGS="-O2 -I/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/staging_dir/host/include -I/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/staging_dir/hostpkg/include -I/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Thu Feb 8 12:59:40 2024" KBUILD_BUILD_VERSION="0" KBUILD_HOSTLDFLAGS="-L/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/staging_dir/host/lib" CONFIG_SHELL="bash" V='' cmd_syscalls= KBUILD_EXTRA_SYMBOLS="/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/button-hotplug.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/gpio-button-hotplug.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/mac80211.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/mtd-rw.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/mwlwifi.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/nat46.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/r8152.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/rproxy.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/rtl8821cu.symvers /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/symvers/xtables-addons.symvers" CC="ccache arm-openwrt-linux-muslgnueabi-gcc" KERNELRELEASE=6.1.75 ARCH="arm" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" M="/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125" modules
make[3]: Entering directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/linux-6.1.75'
CC [M] /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125/natflow_user.o
../natflow-20240125/natflow_user.c: In function 'natflow_user_pre_hook':
../natflow-20240125/natflow_user.c:1044:17: error: too few arguments to function 'nf_bridge_get_physindev'
1044 | br_in = nf_bridge_get_physindev(skb);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../natflow-20240125/natflow_user.c:34:
./include/linux/netfilter_bridge.h:59:1: note: declared here
59 | nf_bridge_get_physindev(const struct sk_buff *skb, struct net *net)
| ^~~~~~~~~~~~~~~~~~~~~~~
../natflow-20240125/natflow_user.c: In function 'natflow_user_forward_hook':
../natflow-20240125/natflow_user.c:1300:17: error: too few arguments to function 'nf_bridge_get_physindev'
1300 | br_in = nf_bridge_get_physindev(skb);
| ^~~~~~~~~~~~~~~~~~~~~~~
./include/linux/netfilter_bridge.h:59:1: note: declared here
59 | nf_bridge_get_physindev(const struct sk_buff *skb, struct net *net)
| ^~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:250: /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125/natflow_user.o] Error 1
make[3]: *** [Makefile:2014: /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125] Error 2
make[3]: Leaving directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/linux-6.1.75'
make[2]: *** [Makefile:103: /home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/natflow-20240125/.built] Error 2
make[2]: Leaving directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/feeds/x/natflow'
time: package/feeds/x/natflow/compile#1.06#0.25#1.29
ERROR: package/feeds/x/natflow failed to build.
make[1]: *** [package/Makefile:128: package/feeds/x/natflow/compile] Error 1
make[1]: Leaving directory '/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt'
make: *** [/home/runner/work/Actions-OpenWrt/Actions-OpenWrt/x-wrt/include/toplevel.mk:232: package/natflow/compile] Error 2

我有一些问题想请教

我克隆x-wrt中的com.x-wrt仓库到lede源代码里,选择好相对应的编译选项,编译natflow成功了,虽然hwnat能够正常工作,但是pppoe转发到接口这部分并不工作,我想了解如何处理

流量会经过的路径说明

设备 -> lan-> pppoe -> eth1.41
eth1是猫棒 41是vlan端口

这个是接口流量统计图

image

##内核版本
Linux OpenWrt 5.15.133 #0 SMP Fri Oct 13 05:53:09 2023 aarch64 GNU/Linux

openwrt版本

OpenWrt SNAPSHOT, r0-788fa912

BUG kmalloc-256 (Not tainted): Poison overwritten

[12878.780909] =============================================================================
[12878.789197] BUG kmalloc-256 (Not tainted): Poison overwritten
[12878.795028] -----------------------------------------------------------------------------
[12878.795028] 
[12878.804798] Disabling lock debugging due to kernel taint
[12878.810196] INFO: 0x0000000072ae8987-0x00000000a2dc6058 @offset=24068. First byte 0x8 instead of 0x6b
[12878.819526] INFO: Allocated in natflow_session_init+0xb6/0x170 [natflow] age=6 cpu=26 pid=0
[12878.827979] INFO: Freed in krealloc+0x77/0xb0 age=6 cpu=26 pid=0
[12878.834072] INFO: Slab 0x00000000fea9b965 objects=42 used=42 fp=0x0000000000000000 flags=0x4500000010200
[12878.843657] INFO: Object 0x000000001efe537f @offset=24064 fp=0x000000009297e97f
[12878.843657] 
[12878.852567] Redzone  000000006c736d62: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.862153] Redzone  00000000b311f692: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.871738] Redzone  00000000c3772e82: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.881322] Redzone  000000009ed2fc73: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.890906] Redzone  00000000ab1a71c4: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.900484] Redzone  000000008676c2e9: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.910059] Redzone  00000000b65b5b6b: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.919639] Redzone  00000000e2329e34: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.929221] Redzone  000000004248af49: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.938800] Redzone  00000000198a5754: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.948383] Redzone  00000000d7b55010: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.957961] Redzone  00000000aa9c2e18: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.967546] Redzone  0000000013e490a1: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.977131] Redzone  0000000064db5967: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.986707] Redzone  00000000c13b1130: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12878.996284] Redzone  00000000de62387d: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
[12879.005862] Object   000000001efe537f: 6b 6b 6b 6b 08 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkk.kkkkkkkkkkk
[12879.015445] Object   0000000016b86bf8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.025022] Object   000000005bf9a510: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.034600] Object   00000000e9e9e313: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.044184] Object   000000003cb09558: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.053760] Object   0000000020b9c2e1: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.063339] Object   0000000012f95a78: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.072925] Object   00000000d7c70389: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
[12879.082508] Object   00000000e7415236: 99 50 41 43 c0 34 e7 16 e8 00 00 00 00 00 90 00  .PAC.4..........
[12879.092085] Object   0000000038e5f5d6: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[12879.101670] Object   00000000524ed5fa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[12879.111256] Object   00000000003d305c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[12879.120841] Object   00000000954ca97b: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[12879.130425] Object   0000000087fe85bc: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[12879.140003] Object   00000000d1ca28af: 00 00 00 00 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b  ........kkkkkkkk
[12879.149587] Object   00000000fe6bd2b3: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  kkkkkkkkkkkkkkk.
[12879.167013] Redzone  00000000bd337d03: bb bb bb bb bb bb bb bb                          ........
[12879.175897] Padding  000000003a79e3e3: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.185477] Padding  00000000d0fcd5f0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.195062] Padding  00000000327fee67: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.204646] Padding  000000007630a71b: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.214224] Padding  00000000fdae7dca: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.223808] Padding  0000000008125106: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.233384] Padding  00000000984d994b: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.242961] Padding  00000000e77c1e24: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.252537] Padding  00000000ccb86a85: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.262115] Padding  0000000002cf0423: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.271699] Padding  0000000043753b2c: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.281277] Padding  000000008709568c: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
[12879.290862] CPU: 6 PID: 0 Comm: swapper/6 Kdump: loaded Tainted: G    B             5.10.112 #0
[12879.299667] Hardware name: Inspur SA5112M4/YZMB-00370-102, BIOS 4.1.10 09/26/2016
[12879.307245] Call Trace:
[12879.309773]  <IRQ>
[12879.311875]  dump_stack+0x70/0x8b
[12879.315273]  print_trailer+0x18c/0x195
[12879.319102]  check_bytes_and_report.cold+0x6f/0x87
[12879.323977]  check_object+0x23c/0x290
[12879.327726]  ? natflow_session_init+0xb6/0x170 [natflow]
[12879.333119]  alloc_debug_processing+0x119/0x180
[12879.337729]  ___slab_alloc.constprop.0+0x4ac/0x4f0
[12879.342601]  ? natflow_session_init+0xb6/0x170 [natflow]
[12879.347993]  ? init_conntrack.constprop.0+0x157/0x2e0 [nf_conntrack]
[12879.354433]  ? natflow_session_init+0xb6/0x170 [natflow]
[12879.359829]  __kmalloc_track_caller+0x1b1/0x280
[12879.364438]  krealloc+0x4f/0xb0
[12879.367661]  natflow_session_init+0xb6/0x170 [natflow]
[12879.372882]  natflow_path_pre_ct_in_hook+0x297/0x1eb0 [natflow]
[12879.378884]  nf_hook_slow+0x3f/0xb0
[12879.382457]  __netif_receive_skb_core.constprop.0+0x835/0xc20
[12879.388285]  __netif_receive_skb_one_core+0x2b/0x70
[12879.393246]  process_backlog+0xb2/0x1d0
[12879.397161]  __napi_poll+0x2a/0xe0
[12879.400645]  net_rx_action+0xca/0x1f0
[12879.404393]  __do_softirq+0xbe/0x1f1
[12879.408046]  asm_call_irq_on_stack+0x12/0x20
[12879.412398]  </IRQ>
[12879.414580]  do_softirq_own_stack+0x38/0x50
[12879.418848]  irq_exit_rcu+0x5b/0x90
[12879.422419]  sysvec_call_function_single+0x35/0x80
[12879.427291]  asm_sysvec_call_function_single+0x12/0x20
[12879.432509] RIP: 0010:native_safe_halt+0x13/0x20
[12879.437211] Code: 07 0f 00 2d af 4b 5d 00 f4 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 8b 05 0a 45 c3 00 85 c0 7e 07 0f 00 2d 8f 4b 5d 00 fb f4 <c3> cc cc cc cc cc cc cc cc cc cc cc cc 55 48 89 e5 53 e8 36 4a 6d
[12879.456105] RSP: 0018:ffffc900000f7e48 EFLAGS: 00000246
[12879.461411] RAX: 0000000000000000 RBX: ffff888104610400 RCX: ffff88903f7a5b00
[12879.468623] RDX: ffff88903f780000 RSI: ffff888102e0a800 RDI: ffff888102e0a864
[12879.475843] RBP: ffffc900000f7e50 R08: ffff888104610400 R09: 000000000000017b
[12879.483062] R10: 0000000000000000 R11: 0000000000000178 R12: 0000000000000001
[12879.490283] R13: ffff888102e0a864 R14: ffffffff824c57a0 R15: ffffffff824c5788
[12879.497503]  ? acpi_idle_do_entry+0x48/0x60
[12879.501771]  acpi_idle_enter+0x8c/0xd0
[12879.505602]  cpuidle_enter_state+0x81/0x2c0
[12879.509862]  cpuidle_enter+0x2f/0x40
[12879.513522]  do_idle+0x174/0x1c0
[12879.516829]  cpu_startup_entry+0x1b/0x20
[12879.520837]  start_secondary+0x107/0x130
[12879.524839]  secondary_startup_64_no_verify+0xb0/0xbb
[12879.529971] FIX kmalloc-256: Restoring 0x0000000072ae8987-0x00000000a2dc6058=0x6b
[12879.529971] 
[12879.539046] FIX kmalloc-256: Marking all objects used

编译出错

make[2]: Entering directory '/home/alice/snapshot/package/natflow'
touch /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.prepared_1bcdb06d9bb7de09efd1c5fc51e9c9a1_6664517399ebbbc92a37c5bb081b5c53_check
. /home/alice/snapshot/include/shell.sh; gzip -dc /home/alice/snapshot/dl/natflow-20220503.tar.gz | tar -C /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/. /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503
touch /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.prepared_1bcdb06d9bb7de09efd1c5fc51e9c9a1_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.configured_*
rm -f /home/alice/snapshot/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.natflow_installed
(cd /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/./; if [ -x ./configure ]; then find /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/ -name config.guess | xargs -r chmod u+w; find /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/ -name config.guess | xargs -r -n1 cp --remove-destination /home/alice/snapshot/scripts/config.guess; find /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/ -name config.sub | xargs -r chmod u+w; find /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/ -name config.sub | xargs -r -n1 cp --remove-destination /home/alice/snapshot/scripts/config.sub; AR="arm-openwrt-linux-muslgnueabi-gcc-ar" AS="arm-openwrt-linux-muslgnueabi-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503=natflow-20220503 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=arm-openwrt-linux-muslgnueabi-ld NM="arm-openwrt-linux-muslgnueabi-gcc-nm" CC="arm-openwrt-linux-muslgnueabi-gcc" GCC="arm-openwrt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" RANLIB="arm-openwrt-linux-muslgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-muslgnueabi-strip OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump SIZE=arm-openwrt-linux-muslgnueabi-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503=natflow-20220503 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DCONFIG_NATFLOW_PATH -DCONFIG_NATFLOW_URLLOGGER" CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503=natflow-20220503 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DCONFIG_NATFLOW_PATH -DCONFIG_NATFLOW_URLLOGGER" CPPFLAGS="-I/home/alice/snapshot/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_musl_eabi/usr/include -I/home/alice/snapshot/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_musl_eabi/include/fortify -I/home/alice/snapshot/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_musl_eabi/include " LDFLAGS="-L/home/alice/snapshot/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_musl_eabi/usr/lib -L/home/alice/snapshot/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_musl_eabi/lib -znow -zrelro "   ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.built
touch /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.built_check
make -j1 -C "/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.38" EXTRA_CFLAGS="-DCONFIG_NATFLOW_PATH -DCONFIG_NATFLOW_URLLOGGER" KCFLAGS="-fmacro-prefix-map=/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi=target-arm_cortex-a7+neon-vfpv4_musl_eabi" HOSTCFLAGS="-O2 -I/home/alice/snapshot/staging_dir/host/include -I/home/alice/snapshot/staging_dir/hostpkg/include -I/home/alice/snapshot/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Mon May  9 19:49:50 2022" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/alice/snapshot/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/home/alice/snapshot/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KBUILD_EXTRA_SYMBOLS="/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/symvers/cryptodev-linux.symvers /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/symvers/gpio-button-hotplug.symvers /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/symvers/ksmbd.symvers /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/symvers/jool.symvers" KERNELRELEASE=5.15.38 ARCH="arm" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" M="/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503" modules
make[3]: Entering directory '/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.38'
  CC [M]  /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_main.o
  CC [M]  /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_common.o
  CC [M]  /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_path.o
  CC [M]  /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.o
In file included from ./include/linux/ctype.h:5,
                 from /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:5:
/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c: In function 'userinfo_write':
/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:1919:77: error: passing argument 1 of 'atomic_inc_not_zero' from incompatible pointer type [-Werror=incompatible-pointer-types]
 1919 |                                         if (unlikely(!REFCOUNT_inc_not_zero(&ct->ct_general.use)))
      |                                                                             ^~~~~~~~~~~~~~~~~~~
      |                                                                             |
      |                                                                             refcount_t * {aka struct refcount_struct *}
./include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
   78 | # define unlikely(x)    __builtin_expect(!!(x), 0)
      |                                             ^
In file included from ./include/linux/atomic.h:82,
                 from ./include/asm-generic/bitops/lock.h:5,
                 from ./arch/arm/include/asm/bitops.h:243,
                 from ./include/linux/bitops.h:33,
                 from ./include/linux/kernel.h:12,
                 from ./include/linux/list.h:9,
                 from ./include/linux/kobject.h:19,
                 from ./include/linux/cdev.h:5,
                 from /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:6:
./include/linux/atomic/atomic-instrumented.h:575:31: note: expected 'atomic_t *' but argument is of type 'refcount_t *' {aka 'struct refcount_struct *'}
  575 | atomic_inc_not_zero(atomic_t *v)
      |                     ~~~~~~~~~~^
In file included from ./include/linux/ctype.h:5,
                 from /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:5:
/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c: In function 'userinfo_read':
/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:2079:69: error: passing argument 1 of 'atomic_inc_not_zero' from incompatible pointer type [-Werror=incompatible-pointer-types]
 2079 |                                 if (unlikely(!REFCOUNT_inc_not_zero(&ct->ct_general.use)))
      |                                                                     ^~~~~~~~~~~~~~~~~~~
      |                                                                     |
      |                                                                     refcount_t * {aka struct refcount_struct *}
./include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
   78 | # define unlikely(x)    __builtin_expect(!!(x), 0)
      |                                             ^
In file included from ./include/linux/atomic.h:82,
                 from ./include/asm-generic/bitops/lock.h:5,
                 from ./arch/arm/include/asm/bitops.h:243,
                 from ./include/linux/bitops.h:33,
                 from ./include/linux/kernel.h:12,
                 from ./include/linux/list.h:9,
                 from ./include/linux/kobject.h:19,
                 from ./include/linux/cdev.h:5,
                 from /home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.c:6:
./include/linux/atomic/atomic-instrumented.h:575:31: note: expected 'atomic_t *' but argument is of type 'refcount_t *' {aka 'struct refcount_struct *'}
  575 | atomic_inc_not_zero(atomic_t *v)
      |                     ~~~~~~~~~~^
cc1: some warnings being treated as errors
scripts/Makefile.build:277: recipe for target '/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.o' failed
make[4]: *** [/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/natflow_user.o] Error 1
Makefile:1868: recipe for target '/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503' failed
make[3]: *** [/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503] Error 2
make[3]: Leaving directory '/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.38'
Makefile:92: recipe for target '/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.built' failed
make[2]: *** [/home/alice/snapshot/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/natflow-20220503/.built] Error 2
make[2]: Leaving directory '/home/alice/snapshot/package/natflow'
time: package/natflow/compile#3.21#4.76#8.02
    ERROR: package/natflow failed to build.
package/Makefile:114: recipe for target 'package/natflow/compile' failed
make[1]: *** [package/natflow/compile] Error 1
make[1]: Leaving directory '/home/alice/snapshot'
/home/alice/snapshot/include/toplevel.mk:228: recipe for target 'package/natflow/compile' failed
make: *** [package/natflow/compile] Error 2

就很奇怪,内核到5.15.35为止是正常的,今天试了下5.15.38内核就炸了

Options to work on x86 system

Hi @ptpt52
is this module will work on x86 system with Intel cpu and Intel 10G card ?

if it work how to check how its work i build module and insmod in system .

and how to limit traffic by ip

m.

BUG: scheduling while atomic: insmod

[ 2958.840014] c1 {natflow}:natflow_netdev_event(): catch NETDEV_UP event for dev=sipa_eth0(tso=0,0,hw_csum=0,0), add ingress hook
[ 2958.840149] c1 BUG: scheduling while atomic: insmod/8763/0x00000200
[ 2958.846421] c1 Modules linked in: natflow(O+) pppoe xt_owner xt_CT pppox br_netfilter xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netifac]
[ 2958.846631] c1 CPU: 1 PID: 8763 Comm: insmod Tainted: G        W  O    4.14.98+ #0
[ 2958.846639] c1 Hardware name: Spreadtrum UDX710_4h10 Board (DT)
[ 2958.846647] c1 Call trace:
[ 2958.846691] c1 [<ffffff8008088fa0>] dump_backtrace+0x0/0x3a0
[ 2958.846714] c1 [<ffffff8008089354>] show_stack+0x14/0x20
[ 2958.846746] c1 [<ffffff800888cf20>] dump_stack+0x98/0xb8
[ 2958.846779] c1 [<ffffff80080c94b0>] __schedule_bug+0x58/0x70
[ 2958.846803] c1 [<ffffff80088a021c>] __schedule+0x3e4/0x490
[ 2958.846820] c1 [<ffffff80088a02f4>] schedule+0x2c/0x88
[ 2958.846858] c1 [<ffffff80080fe8cc>] _synchronize_rcu_expedited.constprop.0+0x1ec/0x3a8
[ 2958.846887] c1 [<ffffff80080feaac>] synchronize_sched_expedited+0x24/0x30
[ 2958.846907] c1 [<ffffff80080febbc>] synchronize_rcu_expedited+0xc/0x18
[ 2958.846929] c1 [<ffffff800866b44c>] synchronize_net+0x14/0x28
[ 2958.846959] c1 [<ffffff80086a1550>] nf_register_net_hook+0x180/0x270
[ 2958.847107] c1 [<ffffff80009c0288>] natflow_netdev_event+0x210/0x278 [natflow]
[ 2958.847132] c1 [<ffffff80086697e8>] register_netdevice_notifier+0x190/0x1b8
[ 2958.847260] c1 [<ffffff80009c7e6c>] natflow_path_init+0x64/0xe0 [natflow]
[ 2958.847399] c1 [<ffffff80009e3190>] natflow_init+0x190/0x1000 [natflow]
[ 2958.847419] c1 [<ffffff800808344c>] do_one_initcall+0x4c/0x14c
[ 2958.847454] c1 [<ffffff800811c8b4>] do_init_module+0x54/0x1c0
[ 2958.847475] c1 [<ffffff800811e4dc>] load_module+0x1a24/0x2198
[ 2958.847501] c1 [<ffffff800811ed68>] SyS_init_module+0x118/0x1b0
[ 2958.847517] c1 Exception stack(0xffffff800b733ec0 to 0xffffff800b734000)

fixed via e998146

natflow with mtk proprietary driver

It's works but I have one error at startup related to mtk proprietary driver for mt7615. CPU utilisation is low, packets aren't missing. I guess that everything is fine, right?)

My router:
mt7621 + mt7603 (mt76 driver) + mt7615 (5.1.0.0 mtk driver) + 6.6.30 kernel

[   67.506028] skb len=1514 headroom=66 headlen=1514 tailroom=564
[   67.506028] mac=(66,14) net=(80,-80) trans=0
[   67.506028] shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0))
[   67.506028] csum(0x0 ip_summed=3 complete_sw=0 valid=0 level=1)
[   67.506028] hash(0x8918d8e1 sw=1 l4=1) proto=0x0800 pkttype=0 iif=3
[   67.562665] dev name=rai0 feat=0x0200000000004000
[   67.572030] skb linear:   00000000: d0 9c ae a5 3f 7e 74 9d 79 5b 2a 82 08 00 45 00
[   67.587266] skb linear:   00000010: 05 dc 31 78 40 00 38 06 58 15 05 3d ec 09 c0 a8
[   67.602516] skb linear:   00000020: 01 a0 01 bb b5 fe ab c1 e1 cd b3 ce 9c b5 80 10
[   67.617743] skb linear:   00000030: 00 ed 11 f2 00 00 01 01 08 0a 77 69 81 61 06 78
[   67.632973] skb linear:   00000040: 77 b5 16 03 03 00 4e 02 00 00 4a 03 03 dd ac a2
[   67.648215] skb linear:   00000050: a9 fd a7 77 7c 90 ad 6c 71 a2 19 a4 c8 69 bc 8b
[   67.663449] skb linear:   00000060: 5a 01 d0 8e 4f 87 f6 6c 3e d1 f0 1d 1a 00 c0 30
[   67.678690] skb linear:   00000070: 00 00 22 ff 01 00 01 00 00 00 00 00 00 0b 00 04
[   67.693930] skb linear:   00000080: 03 00 01 02 00 23 00 00 00 10 00 05 00 03 02 68
[   67.709156] skb linear:   00000090: 32 00 17 00 00 16 03 03 0e f9 0b 00 0e f5 00 0e
[   67.724385] skb linear:   000000a0: f2 00 06 45 30 82 06 41 30 82 05 29 a0 03 02 01
[   67.739617] skb linear:   000000b0: 02 02 0c 77 99 7d 46 ab 65 57 1b bf 9c 69 a6 30
[   67.754850] skb linear:   000000c0: 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 50
[   67.770073] skb linear:   000000d0: 31 0b 30 09 06 03 55 04 06 13 02 42 45 31 19 30
[   67.785304] skb linear:   000000e0: 17 06 03 55 04 0a 13 10 47 6c 6f 62 61 6c 53 69
[   67.800535] skb linear:   000000f0: 67 6e 20 6e 76 2d 73 61 31 26 30 24 06 03 55 04
[   67.815768] ------------[ cut here ]------------
[   67.824942] WARNING: CPU: 2 PID: 0 at net/core/dev.c:3328 skb_checksum_help+0x110/0x238
[   67.840905] offset (-66) >= skb_headlen() (1514)
[   67.850099] Modules linked in: pppoe ppp_async pppox ppp_generic nft_fib_inet ipt_REJECT xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_MASQUERADE xt_LOG ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda tcp_bbr slhc nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog mt7615e(O) mt7615_common(O) mt76_connac_lib(O) libcrc32c iptable_nat iptable_mangle iptable_filter ip_tables hwmon crc_ccitt br_netfilter natflow(O) nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ntfs3 xt_set x_tables ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark
[   67.850512]  ip_set_hash_ipmac ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nls_utf8 nls_iso8859_1 nls_cp437 zram zsmalloc sha512_generic sha256_generic libsha256 sha1_generic seqiv sha3_generic jitterentropy_rng drbg md5 crypto_hw_eip93 hmac geniv rng des_generic libdes cmac authencesn authenc mt_wifi(O) mt7603e(O) mt76(O) mac80211(O) cfg80211(O) compat(O) usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_mtk_hcd xhci_hcd sd_mod scsi_mod scsi_common gpio_button_hotplug(O) vfat fat ext4 mbcache jbd2 exfat usbcore nls_base usb_common crc32c_generic
[   68.133238] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G           O       6.6.30 #0
[   68.147979] Stack : 80948490 80087d94 000001af 00000004 00000000 00000000 81813a94 80b10000
[   68.164631]         809d0000 80857efc 81845b90 809d2883 00000000 00000001 81813a40 8188ea40
[   68.181277]         00000000 00000000 80857efc 81813978 ffffefff 00000000 ffffffea 00000000
[   68.197929]         81813984 000001b0 809502f8 ffffffff 80857efc 00000001 81813b40 8057c32c
[   68.214591]         00000009 80896f50 80948490 859a7cc0 00000018 80478fd8 00000008 80b10008
[   68.231294]         ...
[   68.236170] Call Trace:
[   68.241019] [<800078f0>] show_stack+0x50/0xf0
[   68.249717] [<8075a5a4>] dump_stack_lvl+0x60/0x80
[   68.259109] [<8002f930>] __warn+0xb0/0xe4
[   68.267102] [<8002fa98>] warn_slowpath_fmt+0x134/0x198
[   68.277320] [<8057c32c>] skb_checksum_help+0x110/0x238
[   68.287566] [<8057cc88>] validate_xmit_skb.isra.0+0x2d8/0x3a8
[   68.299005] [<8057cd98>] validate_xmit_skb_list+0x40/0x94
[   68.309755] [<805ce990>] sch_direct_xmit+0x344/0x378
[   68.319641] [<8057dd14>] __dev_queue_xmit+0x940/0xd4c
[   68.329698] [<854672c8>] natflow_session_learn+0x11bc/0x9a20 [natflow]
[   68.342710]
[   68.345683] ---[ end trace 0000000000000000 ]---

natflow cpu dead loop

[   39.275979] pppoe-wan: renamed from ppp0
[  356.584030] rcu: INFO: rcu_sched self-detected stall on CPU
[  356.595149] rcu: 	2-....: (1 GPs behind) idle=1ee/1/0x40000004 softirq=6126/6127 fqs=1042 
[  356.611586] 	(t=2103 jiffies g=7817 q=2502)
[  356.619901] NMI backtrace for cpu 2
[  356.626836] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.10.113 #0
[  356.638947] Stack : 809d0000 807d22f8 807d0000 8007bc4c 80840000 8073a5b0 00000000 00000000
[  356.655591]         8140f894 809b0000 80709230 8143ccd8 807d4d87 00000001 8140f838 8f9a0575
[  356.672231]         00000000 00000000 80709230 8140f6d8 ffffefff 00000000 ffffffea 00000000
[  356.688869]         8140f6e4 0000011b 807d99c0 ffffffff 00000000 00000000 00000000 80710000
[  356.705509]         00000000 807d0000 807d0000 807d22f8 00000018 803be648 00000008 809b0008
[  356.722149]         ...
[  356.727014] Call Trace:
[  356.731896] [<800080c0>] show_stack+0x30/0x100
[  356.740740] [<8033bd94>] dump_stack+0x9c/0xcc
[  356.749411] [<803426c8>] nmi_cpu_backtrace+0x104/0x164
[  356.759627] [<8034287c>] nmi_trigger_cpumask_backtrace+0x154/0x184
[  356.771936] [<8008ea7c>] rcu_dump_cpu_stacks+0x128/0x17c
[  356.782504] [<80094dc8>] rcu_sched_clock_irq+0x7bc/0x9a4
[  356.793079] [<8009afc4>] update_process_times+0x78/0xc4
[  356.803490] [<800af7d4>] tick_handle_periodic+0x34/0xd0
[  356.813879] [<8048827c>] gic_compare_interrupt+0x7c/0x9c
[  356.824464] [<80084ac4>] handle_percpu_devid_irq+0xbc/0x19c
[  356.835545] [<8007e5c8>] generic_handle_irq+0x44/0x5c
[  356.845604] [<80358800>] gic_handle_local_int+0x94/0x118
[  356.856166] [<80358894>] gic_irq_dispatch+0x10/0x20
[  356.865864] [<8007e5c8>] generic_handle_irq+0x44/0x5c
[  356.875926] [<806673ec>] do_IRQ+0x1c/0x2c
[  356.883892] [<80358034>] plat_irq_dispatch+0x68/0xf0
[  356.893763] [<80003508>] except_vec_vi_end+0xb8/0xc4
[  356.903706] [<82d45ec0>] natflow_session_learn+0x2780/0x3fac [natflow]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.