tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8
commit: 4c559f15efcc43b996f4da528cd7f9483aaca36d [11986/12912] netfilter:
nf_conntrack_pptp: prevent buffer overflows in debug code
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 4c559f15efcc43b996f4da528cd7f9483aaca36d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from net/openvswitch/conntrack.c:25:
In file included from include/net/netfilter/nf_nat.h:7:
> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning:
'const' type qualifier on return type has no effect [-Wignored-qualifiers]
extern const char *const pptp_msg_name(u_int16_t msg);
^~~~~~
1 warning generated.
--
In file included from net/ipv4/netfilter/nf_nat_h323.c:16:
In file included from include/net/netfilter/nf_nat.h:7:
> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning:
'const' type qualifier on return type has no effect [-Wignored-qualifiers]
extern const char *const pptp_msg_name(u_int16_t msg);
^~~~~~
net/ipv4/netfilter/nf_nat_h323.c:160:16: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
&addr.ip, ntohs(port),
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/netfilter/nf_nat_h323.c:162:6: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/netfilter/nf_nat_h323.c:267:4: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(rtp_exp->tuple.src.u.udp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/netfilter/nf_nat_h323.c:269:4: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(rtp_exp->tuple.dst.u.udp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro
'__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/netfilter/nf_nat_h323.c:272:4: warning: format specifies type 'unsigned
short' but the argument has type 'int' [-Wformat]
ntohs(rtcp_exp->tuple.src.u.udp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro
'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro
'_dynamic_func_call'
--
In file included from net/ipv4/netfilter/nf_nat_snmp_basic_main.c:43:
In file included from include/net/netfilter/nf_nat.h:7:
> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning:
'const' type qualifier on return type has no effect [-Wignored-qualifiers]
extern const char *const pptp_msg_name(u_int16_t msg);
^~~~~~
net/ipv4/netfilter/nf_nat_snmp_basic_main.c:47:10: fatal error:
'nf_nat_snmp_basic.asn1.h' file not found
#include "nf_nat_snmp_basic.asn1.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from net/netfilter/nf_conntrack_pptp.c:36:
> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning:
'const' type qualifier on return type has no effect [-Wignored-qualifiers]
extern const char *const pptp_msg_name(u_int16_t msg);
^~~~~~
> net/netfilter/nf_conntrack_pptp.c:94:13: warning: 'const'
type qualifier on return type has no effect [-Wignored-qualifiers]
const char *const
pptp_msg_name(u_int16_t msg)
^~~~~~
2 warnings generated.
vim +/const +13 include/linux/netfilter/nf_conntrack_pptp.h
12
13 extern const char *const pptp_msg_name(u_int16_t msg);
14
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org