Re: [PATCH 6/9] select: Extract common code into do_sys_ppoll()

From: kbuild test robot
Date: Mon Sep 09 2019 - 15:49:32 EST


Hi Dmitry,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc8 next-20190904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/restart_block-Prepare-the-ground-for-dumping-timeout/20190909-182945
config: i386-randconfig-a003-201936 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

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

All errors (new ones prefixed by >>):

fs/select.c: In function 'do_sys_ppoll':
>> fs/select.c:1089:3: error: implicit declaration of function 'set_compat_user_sigmask' [-Werror=implicit-function-declaration]
ret = set_compat_user_sigmask(sigmask, sigsetsize);
^
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 2 include/asm-generic/bitops-instrumented.h:test_bit
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_inc
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc
Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_inc
Cyclomatic Complexity 1 include/linux/time64.h:timespec64_sub
Cyclomatic Complexity 3 include/linux/time64.h:timespec64_valid
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 68 include/asm-generic/getorder.h:get_order
Cyclomatic Complexity 1 include/linux/thread_info.h:test_ti_thread_flag
Cyclomatic Complexity 1 include/linux/thread_info.h:check_object_size
Cyclomatic Complexity 2 include/linux/thread_info.h:copy_overflow
Cyclomatic Complexity 4 include/linux/thread_info.h:check_copy_size
Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:preempt_count
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_sub
Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_lock
Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_unlock
Cyclomatic Complexity 2 include/linux/ktime.h:ktime_set
Cyclomatic Complexity 1 include/linux/ktime.h:timespec64_to_ktime
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_unlock
Cyclomatic Complexity 1 include/linux/wait.h:init_waitqueue_func_entry
Cyclomatic Complexity 1 include/linux/sched.h:task_nice
Cyclomatic Complexity 1 include/linux/sched.h:task_thread_info
Cyclomatic Complexity 1 include/linux/sched.h:test_tsk_thread_flag
Cyclomatic Complexity 1 include/linux/sched.h:need_resched
Cyclomatic Complexity 1 arch/x86/include/asm/smap.h:clac
Cyclomatic Complexity 1 arch/x86/include/asm/smap.h:stac
Cyclomatic Complexity 3 arch/x86/include/asm/uaccess.h:__chk_range_not_ok
Cyclomatic Complexity 1 arch/x86/include/asm/uaccess_32.h:raw_copy_to_user
Cyclomatic Complexity 1 include/linux/uaccess.h:__copy_to_user
Cyclomatic Complexity 2 include/linux/uaccess.h:copy_from_user
Cyclomatic Complexity 2 include/linux/uaccess.h:copy_to_user
Cyclomatic Complexity 1 include/linux/uaccess.h:pagefault_disabled
Cyclomatic Complexity 1 include/linux/sched/signal.h:signal_pending
Cyclomatic Complexity 2 include/linux/sched/signal.h:test_and_clear_restore_sigmask
Cyclomatic Complexity 2 include/linux/sched/signal.h:restore_saved_sigmask
Cyclomatic Complexity 3 include/linux/sched/signal.h:restore_saved_sigmask_unless
Cyclomatic Complexity 1 include/linux/sched/signal.h:task_rlimit
Cyclomatic Complexity 1 include/linux/sched/signal.h:rlimit
Cyclomatic Complexity 2 include/linux/sched/rt.h:rt_prio
Cyclomatic Complexity 1 include/linux/sched/rt.h:rt_task
Cyclomatic Complexity 1 include/linux/fs.h:get_file
Cyclomatic Complexity 8 include/linux/overflow.h:__ab_c_size
Cyclomatic Complexity 1 include/linux/mm.h:kvmalloc
Cyclomatic Complexity 1 include/linux/poll.h:init_poll_funcptr
Cyclomatic Complexity 2 include/linux/poll.h:vfs_poll
Cyclomatic Complexity 1 include/linux/poll.h:mangle_poll
Cyclomatic Complexity 1 include/linux/poll.h:demangle_poll
Cyclomatic Complexity 2 include/linux/file.h:fdput
Cyclomatic Complexity 1 include/linux/file.h:__to_fd
Cyclomatic Complexity 1 include/linux/file.h:fdget
Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_type
Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 4 include/linux/slab.h:kmalloc
Cyclomatic Complexity 1 include/linux/compat.h:in_compat_syscall
Cyclomatic Complexity 1 include/linux/sched/clock.h:local_clock
Cyclomatic Complexity 1 include/net/busy_poll.h:net_busy_loop_on
Cyclomatic Complexity 1 include/net/busy_poll.h:busy_loop_current_time
Cyclomatic Complexity 5 include/net/busy_poll.h:busy_loop_timeout
Cyclomatic Complexity 4 fs/select.c:__estimate_accuracy
Cyclomatic Complexity 3 fs/select.c:get_fd_set
Cyclomatic Complexity 2 fs/select.c:set_fd_set
Cyclomatic Complexity 1 fs/select.c:zero_fd_set
Cyclomatic Complexity 9 fs/select.c:max_select_fd
Cyclomatic Complexity 3 fs/select.c:wait_key_set
Cyclomatic Complexity 1 fs/select.c:__do_sys_select
Cyclomatic Complexity 1 fs/select.c:__se_sys_select
Cyclomatic Complexity 16 fs/select.c:__do_sys_pselect6
Cyclomatic Complexity 1 fs/select.c:__se_sys_pselect6
Cyclomatic Complexity 16 fs/select.c:__do_sys_pselect6_time32
Cyclomatic Complexity 1 fs/select.c:__se_sys_pselect6_time32
Cyclomatic Complexity 2 fs/select.c:__do_sys_old_select
Cyclomatic Complexity 1 fs/select.c:__se_sys_old_select
Cyclomatic Complexity 4 fs/select.c:do_pollfd
Cyclomatic Complexity 4 fs/select.c:__do_sys_poll
Cyclomatic Complexity 1 fs/select.c:__se_sys_poll
Cyclomatic Complexity 1 fs/select.c:__do_sys_ppoll
Cyclomatic Complexity 1 fs/select.c:__se_sys_ppoll
Cyclomatic Complexity 1 fs/select.c:__do_sys_ppoll_time32
Cyclomatic Complexity 1 fs/select.c:__se_sys_ppoll_time32
Cyclomatic Complexity 1 fs/select.c:__pollwake
Cyclomatic Complexity 3 fs/select.c:pollwake
Cyclomatic Complexity 5 fs/select.c:poll_get_entry

vim +/set_compat_user_sigmask +1089 fs/select.c

1058
1059 static int do_sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
1060 void __user *tsp, const void __user *sigmask,
1061 size_t sigsetsize, enum poll_time_type pt_type)
1062 {
1063 struct timespec64 ts, end_time, *to = NULL;
1064 int ret;
1065
1066 if (tsp) {
1067 switch (pt_type) {
1068 case PT_TIMESPEC:
1069 if (get_timespec64(&ts, tsp))
1070 return -EFAULT;
1071 break;
1072 case PT_OLD_TIMESPEC:
1073 if (get_old_timespec32(&ts, tsp))
1074 return -EFAULT;
1075 break;
1076 default:
1077 WARN_ON_ONCE(1);
1078 return -ENOSYS;
1079 }
1080
1081 to = &end_time;
1082 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1083 return -EINVAL;
1084 }
1085
1086 if (!in_compat_syscall())
1087 ret = set_user_sigmask(sigmask, sigsetsize);
1088 else
> 1089 ret = set_compat_user_sigmask(sigmask, sigsetsize);
1090
1091 if (ret)
1092 return ret;
1093
1094 ret = do_sys_poll(ufds, nfds, to);
1095 return poll_select_finish(&end_time, tsp, pt_type, ret);
1096 }
1097

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip