tree: git://toccata2.tricolour.ca/linux-2.6-rgb.git ghak90-contid.v10.4
head: f35b133bb86541fa01252242812fcb2ca4baa23d
commit: 80794c1061dee5488007857266263cb6430b352f [14/17] fixup! audit: add support for
containerid to network namespaces
config: powerpc64-randconfig-r026-20201114 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9a85643cd357e412cff69067bb5c4840e228c2ab)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git remote add audit-next git://toccata2.tricolour.ca/linux-2.6-rgb.git
git fetch --no-tags audit-next ghak90-contid.v10.4
git checkout 80794c1061dee5488007857266263cb6430b352f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> net/netfilter/xt_AUDIT.c:78:39: warning: variable 'net'
is uninitialized when used here [-Wuninitialized]
record =
audit_log_netns_contid_list(net, context);
^~~
net/netfilter/xt_AUDIT.c:72:17: note: initialize the variable 'net' to silence
this warning
struct net *net;
^
= NULL
net/netfilter/xt_AUDIT.c:131:9: warning: format specifies type 'unsigned char'
but the argument has type 'int' [-Wformat]
XT_AUDIT_TYPE_MAX);
^~~~~~~~~~~~~~~~~
include/linux/printk.h:532:46: note: expanded from macro 'pr_info_ratelimited'
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:512:17: note: expanded from macro 'printk_ratelimited'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/uapi/linux/netfilter/xt_AUDIT.h:25:27: note: expanded from macro
'XT_AUDIT_TYPE_MAX'
#define XT_AUDIT_TYPE_MAX (__XT_AUDIT_TYPE_MAX - 1)
^~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +/net +78 net/netfilter/xt_AUDIT.c
65
66 static unsigned int
67 audit_tg(struct sk_buff *skb, const struct xt_action_param *par)
68 {
69 struct audit_buffer *ab;
70 int fam = -1;
71 struct audit_context *context;
72 struct net *net;
73 int record;
74
75 if (audit_enabled == AUDIT_OFF)
76 goto out;
77 context = audit_alloc_local(GFP_ATOMIC);
78 record = audit_log_netns_contid_list(net, context);
79 ab = audit_log_start(context, GFP_ATOMIC, AUDIT_NETFILTER_PKT);
80 if (ab == NULL)
81 goto errout;
82
83 audit_log_format(ab, "mark=%#x", skb->mark);
84
85 switch (xt_family(par)) {
86 case NFPROTO_BRIDGE:
87 switch (eth_hdr(skb)->h_proto) {
88 case htons(ETH_P_IP):
89 fam = audit_ip4(ab, skb) ? NFPROTO_IPV4 : -1;
90 break;
91 case htons(ETH_P_IPV6):
92 fam = audit_ip6(ab, skb) ? NFPROTO_IPV6 : -1;
93 break;
94 }
95 break;
96 case NFPROTO_IPV4:
97 fam = audit_ip4(ab, skb) ? NFPROTO_IPV4 : -1;
98 break;
99 case NFPROTO_IPV6:
100 fam = audit_ip6(ab, skb) ? NFPROTO_IPV6 : -1;
101 break;
102 }
103
104 if (fam == -1)
105 audit_log_format(ab, " saddr=? daddr=? proto=-1");
106
107 if (record)
108 audit_log_format(ab, " record=%d", record);
109 audit_log_end(ab);
110
111 net = xt_net(par);
112 errout:
113 audit_free_context(context);
114 out:
115 return XT_CONTINUE;
116 }
117
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org