linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gregory Price <gourry.memverge@gmail.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
	krisman@collabora.com, tglx@linutronix.de, luto@kernel.org,
	oleg@redhat.com, peterz@infradead.org, ebiederm@xmission.com,
	akpm@linux-foundation.org, adobriyan@gmail.com, corbet@lwn.net,
	shuah@kernel.org, Gregory Price <gregory.price@memverge.com>
Subject: Re: [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration
Date: Thu, 19 Jan 2023 10:39:08 +0800	[thread overview]
Message-ID: <202301191010.U5yAKr05-lkp@intel.com> (raw)
In-Reply-To: <20230118201055.147228-4-gregory.price@memverge.com>

Hi Gregory,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.2-rc4 next-20230118]
[cannot apply to tip/core/entry]
[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/ptrace-syscall_user_dispatch-Implement-Syscall-User-Dispatch-Suspension/20230119-041259
patch link:    https://lore.kernel.org/r/20230118201055.147228-4-gregory.price%40memverge.com
patch subject: [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20230119/202301191010.U5yAKr05-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/bd6833b41ed48c444c09346f695efe229deec2e9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Gregory-Price/ptrace-syscall_user_dispatch-Implement-Syscall-User-Dispatch-Suspension/20230119-041259
        git checkout bd6833b41ed48c444c09346f695efe229deec2e9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/entry/

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

sparse warnings: (new ones prefixed by >>)
>> kernel/entry/syscall_user_dispatch.c:128:33: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected signed char [usertype] *[assigned] selector @@     got char [noderef] __user *selector @@
   kernel/entry/syscall_user_dispatch.c:128:33: sparse:     expected signed char [usertype] *[assigned] selector
   kernel/entry/syscall_user_dispatch.c:128:33: sparse:     got char [noderef] __user *selector
>> kernel/entry/syscall_user_dispatch.c:156:31: sparse: sparse: incorrect type in argument 4 (different address spaces) @@     expected char [noderef] __user *selector @@     got signed char [usertype] *[addressable] selector @@
   kernel/entry/syscall_user_dispatch.c:156:31: sparse:     expected char [noderef] __user *selector
   kernel/entry/syscall_user_dispatch.c:156:31: sparse:     got signed char [usertype] *[addressable] selector

vim +128 kernel/entry/syscall_user_dispatch.c

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

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

  parent reply	other threads:[~2023-01-19  2:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 20:10 [PATCH v2 0/3] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-01-18 20:10 ` [PATCH 1/3] ptrace,syscall_user_dispatch: Implement Syscall User Dispatch Suspension Gregory Price
2023-01-20 10:23   ` Peter Zijlstra
2023-01-20 10:49     ` Damien Le Moal
2023-01-18 20:10 ` [PATCH 2/3] fs/proc/array: Add Syscall User Dispatch to proc status Gregory Price
2023-01-18 20:10 ` [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration Gregory Price
2023-01-18 23:43   ` kernel test robot
2023-01-19  1:06   ` kernel test robot
2023-01-19  1:16   ` kernel test robot
2023-01-19  2:39   ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-23  3:29 [PATCH v5 0/3] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-01-23  3:29 ` [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration Gregory Price
2023-01-23 15:41   ` Oleg Nesterov
2023-01-23 18:12     ` Gregory Price
2023-01-23 19:52       ` Oleg Nesterov
2023-01-24 15:59         ` Gregory Price
2023-01-24 16:43           ` Oleg Nesterov
2023-01-24 16:54             ` Gregory Price
2023-01-24 17:58               ` Andrei Vagin
2023-01-24 21:39                 ` Gregory Price
2023-01-24  2:51   ` Andrei Vagin
2023-01-24  3:30     ` Gregory Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301191010.U5yAKr05-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=ebiederm@xmission.com \
    --cc=gourry.memverge@gmail.com \
    --cc=gregory.price@memverge.com \
    --cc=krisman@collabora.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).