lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Feb 2023 07:00:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gregory Price <gourry.memverge@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, linux-doc@...r.kernel.org,
        oleg@...hat.com, avagin@...il.com, peterz@...radead.org,
        luto@...nel.org, krisman@...labora.com, tglx@...utronix.de,
        corbet@....net, shuah@...nel.org,
        Gregory Price <gregory.price@...verge.com>
Subject: Re: [PATCH v11 2/2] ptrace,syscall_user_dispatch: checkpoint/restore
 support for SUD

Hi Gregory,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on shuah-kselftest/fixes]
[also build test WARNING on linus/master tip/core/entry v6.2 next-20230221]
[cannot apply to shuah-kselftest/next]
[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/Gregory-Price/syscall_user_dispatch-helper-function-to-operate-on-given-task/20230222-041959
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git fixes
patch link:    https://lore.kernel.org/r/20230221201740.2236-3-gregory.price%40memverge.com
patch subject: [PATCH v11 2/2] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD
config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20230222/202302220654.bRPCWovm-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/966fb8d2744f50ac8174fe3c5d942112c13c0962
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Gregory-Price/syscall_user_dispatch-helper-function-to-operate-on-given-task/20230222-041959
        git checkout 966fb8d2744f50ac8174fe3c5d942112c13c0962
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/entry/

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

All warnings (new ones prefixed by >>):

   kernel/entry/syscall_user_dispatch.c: In function 'syscall_user_dispatch_get_config':
>> kernel/entry/syscall_user_dispatch.c:133:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     133 |         config.selector = (__u64)sd->selector;
         |                           ^
   kernel/entry/syscall_user_dispatch.c: In function 'syscall_user_dispatch_set_config':
>> kernel/entry/syscall_user_dispatch.c:153:54: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     153 |                                             cfg.len, (void __user*)cfg.selector);
         |                                                      ^


vim +133 kernel/entry/syscall_user_dispatch.c

   117	
   118	int syscall_user_dispatch_get_config(struct task_struct *task, unsigned long size,
   119			                     void __user *data)
   120	{
   121		struct syscall_user_dispatch *sd = &task->syscall_dispatch;
   122		struct ptrace_sud_config config;
   123		if (size != sizeof(struct ptrace_sud_config))
   124			return -EINVAL;
   125	
   126		if (test_task_syscall_work(task, SYSCALL_USER_DISPATCH))
   127			config.mode = PR_SYS_DISPATCH_ON;
   128		else
   129			config.mode = PR_SYS_DISPATCH_OFF;
   130	
   131		config.offset = sd->offset;
   132		config.len = sd->len;
 > 133		config.selector = (__u64)sd->selector;
   134	
   135		if (copy_to_user(data, &config, sizeof(config))) {
   136			return -EFAULT;
   137		}
   138		return 0;
   139	}
   140	
   141	int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long size,
   142			                     void __user *data)
   143	{
   144		int rc;
   145		struct ptrace_sud_config cfg;
   146		if (size != sizeof(struct ptrace_sud_config))
   147			return -EINVAL;
   148	
   149		if (copy_from_user(&cfg, data, sizeof(cfg))) {
   150			return -EFAULT;
   151		}
   152		rc = task_set_syscall_user_dispatch(task, cfg.mode, cfg.offset,
 > 153						    cfg.len, (void __user*)cfg.selector);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ