Re: [PATCH v4] netfilter: nfnetlink_queue: enable classid socket info retrieval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eric,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on horms-ipvs/master]
[also build test ERROR on linus/master v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Sage/netfilter-nfnetlink_queue-enable-classid-socket-info-retrieval/20230326-102636
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
patch link:    https://lore.kernel.org/r/20230326022449.92668-1-eric_sage%40apple.com
patch subject: [PATCH v4] netfilter: nfnetlink_queue: enable classid socket info retrieval
config: m68k-defconfig (https://download.01.org/0day-ci/archive/20230326/202303261230.0O0Nxzgo-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 12.1.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
        # https://github.com/intel-lab-lkp/linux/commit/fea5f85f8e567b36d6ec0091654a910e282bac4e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Eric-Sage/netfilter-nfnetlink_queue-enable-classid-socket-info-retrieval/20230326-102636
        git checkout fea5f85f8e567b36d6ec0091654a910e282bac4e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303261230.0O0Nxzgo-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   net/netfilter/nfnetlink_queue.c: In function 'nfqnl_build_packet_message':
>> net/netfilter/nfnetlink_queue.c:423:56: error: expected ';' before 'tstamp'
     423 |                 + nla_total_size(sizeof(u_int32_t))     /* cap_len */
         |                                                    ^~~~~
         |                                                        ;
   ......
     428 |         tstamp = skb_tstamp_cond(entskb, false);
         |         ~~~~~~                                      


vim +423 net/netfilter/nfnetlink_queue.c

   387	
   388	static struct sk_buff *
   389	nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,
   390				   struct nf_queue_entry *entry,
   391				   __be32 **packet_id_ptr)
   392	{
   393		size_t size;
   394		size_t data_len = 0, cap_len = 0;
   395		unsigned int hlen = 0;
   396		struct sk_buff *skb;
   397		struct nlattr *nla;
   398		struct nfqnl_msg_packet_hdr *pmsg;
   399		struct nlmsghdr *nlh;
   400		struct sk_buff *entskb = entry->skb;
   401		struct net_device *indev;
   402		struct net_device *outdev;
   403		struct nf_conn *ct = NULL;
   404		enum ip_conntrack_info ctinfo = 0;
   405		const struct nfnl_ct_hook *nfnl_ct;
   406		bool csum_verify;
   407		char *secdata = NULL;
   408		u32 seclen = 0;
   409		ktime_t tstamp;
   410	
   411		size = nlmsg_total_size(sizeof(struct nfgenmsg))
   412			+ nla_total_size(sizeof(struct nfqnl_msg_packet_hdr))
   413			+ nla_total_size(sizeof(u_int32_t))	/* ifindex */
   414			+ nla_total_size(sizeof(u_int32_t))	/* ifindex */
   415	#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
   416			+ nla_total_size(sizeof(u_int32_t))	/* ifindex */
   417			+ nla_total_size(sizeof(u_int32_t))	/* ifindex */
   418	#endif
   419			+ nla_total_size(sizeof(u_int32_t))	/* mark */
   420			+ nla_total_size(sizeof(u_int32_t))	/* priority */
   421			+ nla_total_size(sizeof(struct nfqnl_msg_packet_hw))
   422			+ nla_total_size(sizeof(u_int32_t))	/* skbinfo */
 > 423			+ nla_total_size(sizeof(u_int32_t))	/* cap_len */
   424	#if IS_ENABLED(CONFIG_CGROUP_NET_CLASSID)
   425			+ nla_total_size(sizeof(u_int32_t));	/* classid */
   426	#endif
   427	
   428		tstamp = skb_tstamp_cond(entskb, false);
   429		if (tstamp)
   430			size += nla_total_size(sizeof(struct nfqnl_msg_packet_timestamp));
   431	
   432		size += nfqnl_get_bridge_size(entry);
   433	
   434		if (entry->state.hook <= NF_INET_FORWARD ||
   435		   (entry->state.hook == NF_INET_POST_ROUTING && entskb->sk == NULL))
   436			csum_verify = !skb_csum_unnecessary(entskb);
   437		else
   438			csum_verify = false;
   439	
   440		outdev = entry->state.out;
   441	
   442		switch ((enum nfqnl_config_mode)READ_ONCE(queue->copy_mode)) {
   443		case NFQNL_COPY_META:
   444		case NFQNL_COPY_NONE:
   445			break;
   446	
   447		case NFQNL_COPY_PACKET:
   448			if (!(queue->flags & NFQA_CFG_F_GSO) &&
   449			    entskb->ip_summed == CHECKSUM_PARTIAL &&
   450			    skb_checksum_help(entskb))
   451				return NULL;
   452	
   453			data_len = READ_ONCE(queue->copy_range);
   454			if (data_len > entskb->len)
   455				data_len = entskb->len;
   456	
   457			hlen = skb_zerocopy_headlen(entskb);
   458			hlen = min_t(unsigned int, hlen, data_len);
   459			size += sizeof(struct nlattr) + hlen;
   460			cap_len = entskb->len;
   461			break;
   462		}
   463	
   464		nfnl_ct = rcu_dereference(nfnl_ct_hook);
   465	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux