lkml.org 
[lkml]   [2022]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jsarha:topic/cros-sof-v4.19 110/6555] net/netfilter/xt_qtaguid.c:1835:27: warning: function 'prdebug_full_state_locked' might be a candidate for 'gnu_printf' format attribute
tree:   https://github.com/jsarha/linux topic/cros-sof-v4.19
head: d7a3e91d8d16d1ef8653deec5a1fffc4de034a0c
commit: fe6bc43a5e8411303b6096e8976d87ae052926fd [110/6555] ANDROID: netfilter: xt_qtaguid: fix the deadlock when enable DDEBUG
config: sh-randconfig-r005-20220608 (https://download.01.org/0day-ci/archive/20220609/202206090347.2RtNCOCc-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.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
# https://github.com/jsarha/linux/commit/fe6bc43a5e8411303b6096e8976d87ae052926fd
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/cros-sof-v4.19
git checkout fe6bc43a5e8411303b6096e8976d87ae052926fd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash net/netfilter/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

1812 | MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
| ^~~~~~~~
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
45 | # define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:115:9: note: in expansion of macro 'likely'
115 | likely(descriptor.flags & _DPRINTK_FLAGS_PRINT)
| ^~~~~~
include/linux/dynamic_debug.h:126:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid_internal.h:44:25: note: in expansion of macro 'pr_debug'
44 | pr_debug(__VA_ARGS__); \
| ^~~~~~~~
net/netfilter/xt_qtaguid_internal.h:52:23: note: in expansion of macro 'MSK_DEBUG'
52 | #define MT_DEBUG(...) MSK_DEBUG(MDEBUG_MASK, __VA_ARGS__)
| ^~~~~~~~~
net/netfilter/xt_qtaguid.c:1812:9: note: in expansion of macro 'MT_DEBUG'
1812 | MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid_internal.h:44:25: note: in expansion of macro 'pr_debug'
44 | pr_debug(__VA_ARGS__); \
| ^~~~~~~~
net/netfilter/xt_qtaguid_internal.h:52:23: note: in expansion of macro 'MSK_DEBUG'
52 | #define MT_DEBUG(...) MSK_DEBUG(MDEBUG_MASK, __VA_ARGS__)
| ^~~~~~~~~
net/netfilter/xt_qtaguid.c:1812:9: note: in expansion of macro 'MT_DEBUG'
1812 | MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
| ^~~~~~~~
In file included from include/linux/printk.h:336,
from include/linux/kernel.h:14,
from include/linux/bitmap.h:10,
from include/linux/inetdevice.h:7,
from net/netfilter/xt_qtaguid.c:18:
net/netfilter/xt_qtaguid.c:1812:47: error: 'struct xt_action_param' has no member named 'hooknum'
1812 | MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
| ^~
include/linux/dynamic_debug.h:128:38: note: in definition of macro 'dynamic_pr_debug'
128 | ##__VA_ARGS__); \
| ^~~~~~~~~~~
net/netfilter/xt_qtaguid_internal.h:44:25: note: in expansion of macro 'pr_debug'
44 | pr_debug(__VA_ARGS__); \
| ^~~~~~~~
net/netfilter/xt_qtaguid_internal.h:52:23: note: in expansion of macro 'MSK_DEBUG'
52 | #define MT_DEBUG(...) MSK_DEBUG(MDEBUG_MASK, __VA_ARGS__)
| ^~~~~~~~~
net/netfilter/xt_qtaguid.c:1812:9: note: in expansion of macro 'MT_DEBUG'
1812 | MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
| ^~~~~~~~
In file included from include/linux/file.h:9,
from net/netfilter/xt_qtaguid.c:17:
net/netfilter/xt_qtaguid.c: In function 'prdebug_full_state_locked':
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
net/netfilter/xt_qtaguid.c:1827:9: note: in expansion of macro 'if'
1827 | if (!unlikely(qtaguid_debug_mask & DDEBUG_MASK))
| ^~
include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1827:14: note: in expansion of macro 'unlikely'
1827 | if (!unlikely(qtaguid_debug_mask & DDEBUG_MASK))
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
net/netfilter/xt_qtaguid.c:1827:9: note: in expansion of macro 'if'
1827 | if (!unlikely(qtaguid_debug_mask & DDEBUG_MASK))
| ^~
>> net/netfilter/xt_qtaguid.c:1835:27: warning: function 'prdebug_full_state_locked' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1835 | fmt_buff, args);
| ^~~~~~~~
In file included from include/linux/file.h:9,
from net/netfilter/xt_qtaguid.c:17:
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
45 | # define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:115:9: note: in expansion of macro 'likely'
115 | likely(descriptor.flags & _DPRINTK_FLAGS_PRINT)
| ^~~~~~
include/linux/dynamic_debug.h:126:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1837:9: note: in expansion of macro 'pr_debug'
1837 | pr_debug("%s", buff);
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1837:9: note: in expansion of macro 'pr_debug'
1837 | pr_debug("%s", buff);
| ^~~~~~~~
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/compiler.h:45:26: note: in expansion of macro '__branch_check__'
45 | # define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:115:9: note: in expansion of macro 'likely'
115 | likely(descriptor.flags & _DPRINTK_FLAGS_PRINT)
| ^~~~~~
include/linux/dynamic_debug.h:126:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1853:9: note: in expansion of macro 'pr_debug'
1853 | pr_debug("qtaguid: %s(): }\n", __func__);
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \
| ^~~~~~~
include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
56 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
| ^~~~~~~~~~
include/linux/dynamic_debug.h:126:9: note: in expansion of macro 'if'
126 | if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
| ^~
include/linux/printk.h:340:9: note: in expansion of macro 'dynamic_pr_debug'
340 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1853:9: note: in expansion of macro 'pr_debug'
1853 | pr_debug("qtaguid: %s(): }\n", __func__);
| ^~~~~~~~
net/netfilter/xt_qtaguid.c: In function 'qtaguid_ctrl_proc_start':
include/linux/compiler.h:25:39: warning: ignoring attribute 'section ("_ftrace_annotated_branch")' because it conflicts with previous 'section ("_ftrace_branch")' [-Wattributes]
25 | static struct ftrace_likely_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:30: note: in definition of macro '__trace_if'
69 | ______r = !!(cond); \
| ^~~~
net/netfilter/xt_qtaguid.c:1895:9: note: in expansion of macro 'if'
1895 | if (unlikely(module_passive))
| ^~
include/linux/compiler.h:48:26: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
net/netfilter/xt_qtaguid.c:1895:13: note: in expansion of macro 'unlikely'
1895 | if (unlikely(module_passive))
| ^~~~~~~~
include/linux/compiler.h:64:25: note: previous declaration here
64 | ______f = { \


vim +1835 net/netfilter/xt_qtaguid.c

cead6bffca84b2 JP Abgrall 2011-06-20 1815
cead6bffca84b2 JP Abgrall 2011-06-20 1816 #ifdef DDEBUG
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1817 /*
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1818 * This function is not in xt_qtaguid_print.c because of locks visibility.
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1819 * The lock of sock_tag_list must be aquired before calling this function
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1820 */
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1821 static void prdebug_full_state_locked(int indent_level, const char *fmt, ...)
cead6bffca84b2 JP Abgrall 2011-06-20 1822 {
cead6bffca84b2 JP Abgrall 2011-06-20 1823 va_list args;
cead6bffca84b2 JP Abgrall 2011-06-20 1824 char *fmt_buff;
cead6bffca84b2 JP Abgrall 2011-06-20 1825 char *buff;
cead6bffca84b2 JP Abgrall 2011-06-20 1826
cead6bffca84b2 JP Abgrall 2011-06-20 @1827 if (!unlikely(qtaguid_debug_mask & DDEBUG_MASK))
cead6bffca84b2 JP Abgrall 2011-06-20 1828 return;
cead6bffca84b2 JP Abgrall 2011-06-20 1829
cead6bffca84b2 JP Abgrall 2011-06-20 1830 fmt_buff = kasprintf(GFP_ATOMIC,
cead6bffca84b2 JP Abgrall 2011-06-20 1831 "qtaguid: %s(): %s {\n", __func__, fmt);
cead6bffca84b2 JP Abgrall 2011-06-20 1832 BUG_ON(!fmt_buff);
cead6bffca84b2 JP Abgrall 2011-06-20 1833 va_start(args, fmt);
cead6bffca84b2 JP Abgrall 2011-06-20 1834 buff = kvasprintf(GFP_ATOMIC,
cead6bffca84b2 JP Abgrall 2011-06-20 @1835 fmt_buff, args);
cead6bffca84b2 JP Abgrall 2011-06-20 1836 BUG_ON(!buff);
cead6bffca84b2 JP Abgrall 2011-06-20 1837 pr_debug("%s", buff);
cead6bffca84b2 JP Abgrall 2011-06-20 1838 kfree(fmt_buff);
cead6bffca84b2 JP Abgrall 2011-06-20 1839 kfree(buff);
cead6bffca84b2 JP Abgrall 2011-06-20 1840 va_end(args);
cead6bffca84b2 JP Abgrall 2011-06-20 1841
cead6bffca84b2 JP Abgrall 2011-06-20 1842 prdebug_sock_tag_tree(indent_level, &sock_tag_tree);
cead6bffca84b2 JP Abgrall 2011-06-20 1843
cead6bffca84b2 JP Abgrall 2011-06-20 1844 spin_lock_bh(&uid_tag_data_tree_lock);
cead6bffca84b2 JP Abgrall 2011-06-20 1845 prdebug_uid_tag_data_tree(indent_level, &uid_tag_data_tree);
cead6bffca84b2 JP Abgrall 2011-06-20 1846 prdebug_proc_qtu_data_tree(indent_level, &proc_qtu_data_tree);
cead6bffca84b2 JP Abgrall 2011-06-20 1847 spin_unlock_bh(&uid_tag_data_tree_lock);
cead6bffca84b2 JP Abgrall 2011-06-20 1848
cead6bffca84b2 JP Abgrall 2011-06-20 1849 spin_lock_bh(&iface_stat_list_lock);
cead6bffca84b2 JP Abgrall 2011-06-20 1850 prdebug_iface_stat_list(indent_level, &iface_stat_list);
cead6bffca84b2 JP Abgrall 2011-06-20 1851 spin_unlock_bh(&iface_stat_list_lock);
cead6bffca84b2 JP Abgrall 2011-06-20 1852
cead6bffca84b2 JP Abgrall 2011-06-20 1853 pr_debug("qtaguid: %s(): }\n", __func__);
cead6bffca84b2 JP Abgrall 2011-06-20 1854 }
cead6bffca84b2 JP Abgrall 2011-06-20 1855 #else
fe6bc43a5e8411 Chenbo Feng 2017-03-23 1856 static void prdebug_full_state_locked(int indent_level, const char *fmt, ...) {}
cead6bffca84b2 JP Abgrall 2011-06-20 1857 #endif
cead6bffca84b2 JP Abgrall 2011-06-20 1858

:::::: The code at line 1835 was first introduced by commit
:::::: cead6bffca84b298691c58da076022a82af7e6be ANDROID: netfilter: xt_qtaguid: add qtaguid matching module

:::::: TO: JP Abgrall <jpa@google.com>
:::::: CC: Guenter Roeck <groeck@chromium.org>

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-06-08 21:37    [W:0.085 / U:2.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site