[ti:ti-linux-5.10.y 6282/6417] include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared

From: kernel test robot
Date: Thu Jul 22 2021 - 00:02:07 EST


Hi WingMan,

FYI, the error/warning still remains.

tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.10.y
head: 4c2eade9f722838b0e457650368cba1c6c7483c2
commit: e355bf097bb11257afeadf6665e51f224eeb93a7 [6282/6417] net: packet: Pass on redundant net info in packet_recvmsg
config: parisc-randconfig-c003-20210720 (attached as .config)
compiler: hppa-linux-gcc (GCC) 10.3.0
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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-linux-5.10.y
git checkout e355bf097bb11257afeadf6665e51f224eeb93a7
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from drivers/net/loopback.c:47:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from kernel/audit.c:53:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
kernel/audit.c: In function 'audit_log_vformat':
kernel/audit.c:1923:2: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1923 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args);
| ^~~
kernel/audit.c:1932:3: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1932 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2);
| ^~~
--
In file included from fs/io_uring.c:64:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
fs/io_uring.c: In function 'io_prep_async_work':
fs/io_uring.c:1431:22: warning: variable 'id' set but not used [-Wunused-but-set-variable]
1431 | struct io_identity *id;
| ^~
--
In file included from security/tomoyo/common.h:35,
from security/tomoyo/audit.c:8:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
security/tomoyo/audit.c: In function 'tomoyo_init_log':
security/tomoyo/audit.c:290:2: warning: function 'tomoyo_init_log' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
290 | vsnprintf(buf + pos, len - pos, fmt, args);
| ^~~~~~~~~
--
In file included from security/tomoyo/common.h:35,
from security/tomoyo/common.c:11:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
security/tomoyo/common.c: In function 'tomoyo_addprintf':
security/tomoyo/common.c:202:2: warning: function 'tomoyo_addprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
202 | vsnprintf(buffer + pos, len - pos - 1, fmt, args);
| ^~~~~~~~~
--
In file included from include/linux/tcp.h:19,
from include/linux/ipv6.h:87,
from include/net/ipv6.h:12,
from include/rdma/ib_verbs.h:24,
from include/linux/lsm_audit.h:25,
from security/apparmor/include/audit.h:16,
from security/apparmor/policy_unpack.c:22:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
In file included from security/apparmor/policy_unpack.c:1237:
security/apparmor/policy_unpack_test.c: At top level:
security/apparmor/policy_unpack_test.c:51:16: warning: no previous prototype for 'build_aa_ext_struct' [-Wmissing-prototypes]
51 | struct aa_ext *build_aa_ext_struct(struct policy_unpack_fixture *puf,
| ^~~~~~~~~~~~~~~~~~~
--
In file included from include/net/cls_cgroup.h:14,
from net/socket.c:95:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
net/socket.c: In function '__sys_getsockopt':
net/socket.c:2155:6: warning: variable 'max_optlen' set but not used [-Wunused-but-set-variable]
2155 | int max_optlen;
| ^~~~~~~~~~
--
In file included from include/trace/events/sock.h:8,
from net/core/net-traces.c:33:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/trace/define_trace.h:102,
from include/trace/events/neigh.h:255,
from net/core/net-traces.c:50:
include/trace/events/neigh.h: In function 'trace_event_raw_event_neigh_create':
include/trace/events/neigh.h:42:20: warning: variable 'pin6' set but not used [-Wunused-but-set-variable]
42 | struct in6_addr *pin6;
| ^~~~
include/trace/trace_events.h:695:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
695 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/neigh.h:23:1: note: in expansion of macro 'TRACE_EVENT'
23 | TRACE_EVENT(neigh_create,
| ^~~~~~~~~~~
include/trace/events/neigh.h:41:2: note: in expansion of macro 'TP_fast_assign'
41 | TP_fast_assign(
| ^~~~~~~~~~~~~~
--
In file included from net/nfc/nci/../nfc.h:14,
from net/nfc/nci/hci.c:13:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
net/nfc/nci/hci.c: In function 'nci_hci_resp_received':
net/nfc/nci/hci.c:369:5: warning: variable 'status' set but not used [-Wunused-but-set-variable]
369 | u8 status = result;
| ^~~~~~
--
In file included from include/linux/tcp.h:19,
from include/linux/ipv6.h:87,
from include/net/addrconf.h:50,
from lib/vsprintf.c:40:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
lib/vsprintf.c: In function 'va_format':
lib/vsprintf.c:1663:2: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1663 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
| ^~~
--
In file included from net/bridge/br_netlink_tunnel.c:14:
include/net/sock.h: In function 'sock_recv_redundant_info':
>> include/net/sock.h:2523:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2523 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2523:29: note: each undeclared identifier is reported only once for each function it appears in
net/bridge/br_netlink_tunnel.c: At top level:
net/bridge/br_netlink_tunnel.c:29:6: warning: no previous prototype for 'vlan_tunid_inrange' [-Wmissing-prototypes]
29 | bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr,
| ^~~~~~~~~~~~~~~~~~
net/bridge/br_netlink_tunnel.c:196:5: warning: no previous prototype for 'br_vlan_tunnel_info' [-Wmissing-prototypes]
196 | int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd,
| ^~~~~~~~~~~~~~~~~~~


vim +/SCM_REDUNDANT +2523 include/net/sock.h

2514
2515 DECLARE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
2516 static inline void sock_recv_redundant_info(struct msghdr *msg, struct sock *sk,
2517 struct sk_buff *skb)
2518 {
2519 struct skb_redundant_info *sred;
2520
2521 sred = skb_redinfo(skb);
2522 if (sred->lsdu_size)
> 2523 put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
2524 }
2525

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip