[PATCH net 3/4] security: add sctp_assoc_established hook
kernel test robot
lkp at intel.com
Sun Oct 24 18:45:40 UTC 2021
Hi Xin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Xin-Long/security-fixups-for-the-security-hooks-in-sctp/20211022-143827
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 397430b50a363d8b7bdda00522123f82df6adc5e
config: hexagon-buildonly-randconfig-r006-20211024 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a709787cd988aaca847995bd08cc9348c9c6c956)
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/0day-ci/linux/commit/32fba59611e67404b515f7864aa67a3abd2f7978
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Long/security-fixups-for-the-security-hooks-in-sctp/20211022-143827
git checkout 32fba59611e67404b515f7864aa67a3abd2f7978
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
In file included from fs/open.c:19:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
1 error generated.
--
In file included from fs/pipe.c:17:
In file included from include/linux/pseudo_fs.h:4:
In file included from include/linux/fs_context.h:14:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
fs/pipe.c:755:15: warning: no previous prototype for function 'account_pipe_buffers' [-Wmissing-prototypes]
unsigned long account_pipe_buffers(struct user_struct *user,
^
fs/pipe.c:755:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long account_pipe_buffers(struct user_struct *user,
^
static
fs/pipe.c:761:6: warning: no previous prototype for function 'too_many_pipe_buffers_soft' [-Wmissing-prototypes]
bool too_many_pipe_buffers_soft(unsigned long user_bufs)
^
fs/pipe.c:761:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool too_many_pipe_buffers_soft(unsigned long user_bufs)
^
static
fs/pipe.c:768:6: warning: no previous prototype for function 'too_many_pipe_buffers_hard' [-Wmissing-prototypes]
bool too_many_pipe_buffers_hard(unsigned long user_bufs)
^
fs/pipe.c:768:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool too_many_pipe_buffers_hard(unsigned long user_bufs)
^
static
fs/pipe.c:775:6: warning: no previous prototype for function 'pipe_is_unprivileged_user' [-Wmissing-prototypes]
bool pipe_is_unprivileged_user(void)
^
fs/pipe.c:775:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool pipe_is_unprivileged_user(void)
^
static
fs/pipe.c:1245:5: warning: no previous prototype for function 'pipe_resize_ring' [-Wmissing-prototypes]
int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots)
^
fs/pipe.c:1245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots)
^
static
5 warnings and 1 error generated.
--
In file included from fs/d_path.c:2:
In file included from include/linux/syscalls.h:87:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:59:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
fs/d_path.c:320:7: warning: no previous prototype for function 'simple_dname' [-Wmissing-prototypes]
char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
^
fs/d_path.c:320:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
^
static
1 warning and 1 error generated.
--
In file included from fs/statfs.c:2:
In file included from include/linux/syscalls.h:87:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:59:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
>> fs/statfs.c:131:3: warning: 'memcpy' will always overflow; destination buffer has size 64, but size argument is 88 [-Wfortify-source]
memcpy(&buf, st, sizeof(*st));
^
1 warning and 1 error generated.
--
In file included from ipc/msg.c:33:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
>> ipc/msg.c:496:20: warning: implicit conversion from 'int' to 'unsigned short' changes value from 32768000 to 0 [-Wconstant-conversion]
msginfo->msgseg = MSGSEG;
~ ^~~~~~
include/uapi/linux/msg.h:87:38: note: expanded from macro 'MSGSEG'
#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
^~~~~~~~
include/uapi/linux/msg.h:86:36: note: expanded from macro '__MSGSEG'
#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */
~~~~~~~~~~~~~~~~~^~~~~~~~
1 warning and 1 error generated.
--
In file included from kernel/printk/printk.c:34:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
kernel/printk/printk.c:175:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
kernel/printk/printk.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
static
1 warning and 1 error generated.
--
In file included from fs/afs/dir.c:16:
In file included from fs/afs/internal.h:25:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:45:
In file included from include/uapi/linux/neighbour.h:6:
In file included from include/linux/netlink.h:9:
In file included from include/net/scm.h:8:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
fs/afs/dir.c:164:11: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(dbuf->blocks[tmp].hdr.magic));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
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)) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/char/mem.c:25:
In file included from include/linux/shmem_fs.h:11:
In file included from include/linux/fs_parser.h:11:
In file included from include/linux/fs_context.h:14:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
drivers/char/mem.c:95:13: warning: no previous prototype for function 'unxlate_dev_mem_ptr' [-Wmissing-prototypes]
void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
^
drivers/char/mem.c:94:29: note: expanded from macro 'unxlate_dev_mem_ptr'
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
^
drivers/char/mem.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
^
static
1 warning and 1 error generated.
--
In file included from drivers/char/random.c:335:
In file included from include/linux/syscalls.h:87:
In file included from include/trace/syscall.h:7:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:59:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
>> drivers/char/random.c:1257:41: warning: shift count >= width of type [-Wshift-count-overflow]
c_high = (sizeof(cycles) > 4) ? cycles >> 32 : 0;
^ ~~
drivers/char/random.c:1258:35: warning: shift count >= width of type [-Wshift-count-overflow]
j_high = (sizeof(now) > 4) ? now >> 32 : 0;
^ ~~
drivers/char/random.c:2272:6: warning: no previous prototype for function 'add_hwgenerator_randomness' [-Wmissing-prototypes]
void add_hwgenerator_randomness(const char *buffer, size_t count,
^
drivers/char/random.c:2272:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void add_hwgenerator_randomness(const char *buffer, size_t count,
^
static
3 warnings and 1 error generated.
--
In file included from fs/cifs/ioctl.c:16:
In file included from fs/cifs/cifspdu.h:12:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:45:
In file included from include/uapi/linux/neighbour.h:6:
In file included from include/linux/netlink.h:9:
In file included from include/net/scm.h:8:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
fs/cifs/ioctl.c:324:10: warning: variable 'caps' set but not used [-Wunused-but-set-variable]
__u64 caps;
^
1 warning and 1 error generated.
--
In file included from fs/kernfs/file.c:19:
In file included from fs/kernfs/kernfs-internal.h:20:
In file included from include/linux/fs_context.h:14:
>> include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
fs/kernfs/file.c:128:15: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return NULL + !*ppos;
~~~~ ^
1 warning and 1 error generated.
vim +/security_sctp_assoc_established +1651 include/linux/security.h
1647
1648 static inline void security_sctp_assoc_established(struct sctp_association *asoc,
1649 struct sk_buff *skb)
1650 {
> 1651 return 0;
1652 }
1653 #endif /* CONFIG_SECURITY_NETWORK */
1654
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the Linux-security-module-archive
mailing list