代码编织梦想


 

================================================================================

```

selftests/bpf: Fix error: undeclared identifier 'NF_NAT_MANIP_SRC'

commit 472caa69183f("netfilter: nat: un-export nf_nat_used_tuple")

introduce NF_NAT_MANIP_SRC/DST enum in include/net/netfilter/nf_nat.h,

and commit b06b45e82b59("selftests/bpf: add tests for bpf_ct_set_nat_info

kfunc") use NF_NAT_MANIP_SRC/DST in test_bpf_nf.c.

In bpf kself-test config (tools/testing/selftests/bpf/config) nf_nat

is compiled as built-in, this issue occurs just if it is compiled as

module. We could use BPF CO-RE and ___suffix rule to avoid this.

How to reproduce the error:

$ make -C tools/testing/selftests/bpf/

...

CLNG-BPF [test_maps] test_bpf_nf.bpf.o

error: use of undeclared identifier 'NF_NAT_MANIP_SRC'

bpf_ct_set_nat_info(ct, &saddr, sport, NF_NAT_MANIP_SRC);

^

error: use of undeclared identifier 'NF_NAT_MANIP_DST'

bpf_ct_set_nat_info(ct, &daddr, dport, NF_NAT_MANIP_DST);

^

2 errors generated.

```

V2: use BPF CO-RE and ___suffix rule to avoid this error.

https://lore.kernel.org/lkml/tencent_E1424259BD97672AD1AF00A3468858065E08@qq.com/

V1: https://lore.kernel.org/lkml/tencent_29D7ABD1744417031AA1B52C914B61158E07@qq.com/


 

================================================================================

The motivation for this patch is to eliminate the compilation warning,

maybe one day we will compile the kernel with "-Werror -Wall", at which

point this compilation warning will turn into a compilation error, we

should fix this error in advance.

================================================================================

# TODO

https://lore.kernel.org/lkml/CAEf4BzY0dsog-_1v9Phskt2YzyavL_fNsSi2hUvGZboggDqM2w@mail.gmail.com/


 

It does break CI ([0]). We could use BPF CO-RE and ___suffix rule to

avoid this. But we can also say that selftests/bpf/config{,<arch>} has

to be used by bots that want to build BPF selftests.

[0] https://github.com/kernel-patches/bpf/actions/runs/3446651033/jobs/5752592868

```

Subject: Re: [PATCH bpf-next] selftests/bpf: Fix error undeclared identifier 'NF_NAT_MANIP_SRC'

Thank you all for your replies, my config:

$ grep NETFILTER config

CONFIG_NETFILTER=y

...

CONFIG_NETFILTER_XT_MARK=m

CONFIG_NETFILTER_XT_NAT=m

...

CONFIG_NETFILTER_XT_MATCH_TCPMSS=m

Link: https://github.com/kernel-patches/bpf/actions/runs/3446651033/jobs/5752592868

```


 

================================================================================

https://lore.kernel.org/lkml/20221111173855.108360-1-sj@kernel.org/


 

```

```

releases/gcc-10.1.0 OK

commit d14c547abd484d3540b692bb8048c4a6efe92c8b

Author: Martin Sebor <msebor@redhat.com>

Date: Fri Aug 28 13:13:28 2020 -0600

Add -Wstringop-overread for reading past the end by string functions.

gcc-11.1.0

gcc/gcc/testsuite/gcc.dg/pragma-diag-10.c


 

================================================================================

enum nf_inet_hooks {

NF_INET_PRE_ROUTING = 0,

NF_INET_LOCAL_IN = 1,

NF_INET_FORWARD = 2,

NF_INET_LOCAL_OUT = 3,

NF_INET_POST_ROUTING = 4,

NF_INET_NUMHOOKS = 5,

NF_INET_INGRESS = 5,

};

enum nf_nat_manip_type {

NF_NAT_MANIP_SRC,

NF_NAT_MANIP_DST

};


 

================================================================================

```

docs/zh_CN: Update zh_CN/arm64/elf_hwcaps.rst

Add updates from the Documentation/arm64/elf_hwcaps.rst, and synchronize

the changes of commit 5d8505fd039c("arm64: Fix the documented event stream

frequency").

```


 

================================================================================

```

$ make -C tools/testing/selftests/bpf/

CLNG-BPF [test_maps] test_kfunc_dynptr_param.bpf.o

error: variable has incomplete type 'struct bpf_dynptr'

struct bpf_dynptr ptr;

^

bpf_helper_defs.h:42:8: note: forward declaration of 'struct bpf_dynptr'

struct bpf_dynptr;

^

error: variable has incomplete type 'struct bpf_dynptr'

struct bpf_dynptr ptr;

^

bpf_helper_defs.h:42:8: note: forward declaration of 'struct bpf_dynptr'

struct bpf_dynptr;

^

2 errors generated.

```

```

[rongtao@RT-PC linux]$ make -C tools/testing/selftests/bpf/

make: Entering directory '/home/sd/Git/linux/tools/testing/selftests/bpf'

CLNG-BPF [test_maps] test_kfunc_dynptr_param.bpf.o

progs/test_kfunc_dynptr_param.c:40:20: error: variable has incomplete type 'struct bpf_dynptr'

struct bpf_dynptr ptr;

^

/home/sd/Git/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helper_defs.h:42:8: note: forward declaration of 'struct bpf_dynptr'

struct bpf_dynptr;

^

progs/test_kfunc_dynptr_param.c:69:20: error: variable has incomplete type 'struct bpf_dynptr'

struct bpf_dynptr ptr;

^

/home/sd/Git/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helper_defs.h:42:8: note: forward declaration of 'struct bpf_dynptr'

struct bpf_dynptr;

^

2 errors generated.

```

enum nf_nat_manip_type


 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/Rong_Toa/article/details/127914204

ogg-00446的解决方法:_anjianshangren0505的博客-爱代码爱编程_ogg-00446

ERROR OGG-00446:Could not find archived log for sequence 501 thread 1 under default destinations… 因归档日志删除导致抽取进程中

安全防护工具之:clamav_chongke5244的博客-爱代码爱编程

安全防护工具之:ClamAV 2018年10月02日 00:49:35 neo_will_mvp 阅读数 359  版权声明:精心研究,潜心学习,本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_33468857/article/details/82920832 ClamAV是一个C语言开

【Oracle】RMAN备份失败报错RMAN-03002,RMAN-06091-爱代码爱编程

RMAN备份脚本执行失败,报错如下: RMAN-03002: failure of delete command at 12/30/2013 13:51:36 RMAN-06091: no channel allocated for maintenance (of an appropriate type) 或者是: RMAN-03002: failure

记一次rman恢复:ORA-03002,ORA-06026-爱代码爱编程

1.拷贝数据到测试恢复环境: 2.rman下恢复: set ORACLE_SID EASDBA2 rman target / startup nomount force; (可在sqlplus下;也可以在rman 下执行) restore controlfile from 'E:\backup\rman22\DBA_CON_C-1326376453-20

oracle 添加归档日志文件_【Oracle】归档日志管理-设置归档日志路径以及归档日志冗余...-爱代码爱编程

一般情况下,数据库安装时选择的是默认NOARCHIVELOG模式。如果要开启ARCHIVELOG模式,则需要为归档日志路径设置初始化参数。 归档日志路径可以配置一个也可以配置多个。路径可以是本地路径,如本地文件系统,ASM磁盘组;也可以是远程路径,如备份数据库。设置多个归档日志路径,可以对归档日志做冗余,即使有一个目标盘损坏,也可以保证归档日志是可用

oracle rman 00571,oracle 备份失败 RMAN-03002,RMAN-00569,RMAN-00571等处理方法-爱代码爱编程

备份失败 1、备份失败信息: :39:52] 备份 200.3-oracle 数据 开始执行... [11:39:54] NICEGAIN-SW741B 开始分析备份数据源,请稍候 ... [11:39:54] Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produ

oracle-11g-redo损坏 非归档测试恢复-爱代码爱编程

数据库版本:11.2.0.4 1、删除oracle所有的redolog日志,强制启动oracle数据库,可能造成数据丢失: ===删除所有redolog [oracle@yictdbtest1 trade] r m

磁盘组add disk,报错:ORA-15041 thrown in ARB0 for group number-爱代码爱编程

磁盘组add disk,报错:ORA-15041 thrown in ARB0 for group number 故障现象问题分析解决方法解决过程遗留问题参考 在ASM中,每一个文件的extent都均匀的分布在它所在磁盘组的所有磁盘上,无论是在文件第一次创建或是文件创建之后的重新resize都是如此,这也意味着我们始终能保持磁盘组中的每一个磁盘

2022工作中遇到的问题二-爱代码爱编程

1、双向绑定没有生效 下拉框有A、B、C三个选项,但是选了B之后显示的还是A,其实v-model中选中的值已经变成了B,但显示没变。 问题原因:v-model绑定的属性queryParams.xxx,queryParams是data中声明的属性,xxx在初始化的时候并没有写在data中,而vue不能检测对象属性的增加或删除,也就没办法监听到xxx这个属

【Percona-Toolkit】系列之pt-archiver数据归档清理神器-爱代码爱编程

题外话 时隔半年,我终于又回来开始写percona-tookit系列了,之前有点忙,也有点偷懒,这次一定认真写下去。好不废话上今天的主角pt-archiver 工具简介 pt-archiver usage: 1.归档A库数据到B库做备份 2.安全删除数据,不影响数据库性能,(但是不会回收碎片空) 3.导出数据文件,方便load data回去 4.合并

ISO/IEC 27002:2022中文版-爱代码爱编程

ISO/IEC 27002:2022 信息安全,网络安全与隐私保护 ——信息安全控制试译交流版 说明 2022年2月,国际标准化组织发布更新发布了信息安全、网络安全和隐私保护——信息安全控制(ISO/IEC 27002:2022),以作为组织根据信息安全管理体系认证标准定制和实施信息安全控制措施的指南。 新标准的更新变化为新环境下网络安全、数据安全治