All of lore.kernel.org
 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-doc@vger.kernel.org,
	oleg@redhat.com, avagin@gmail.com, peterz@infradead.org,
	luto@kernel.org, krisman@collabora.com, tglx@linutronix.de,
	corbet@lwn.net, shuah@kernel.org,
	Gregory Price <gregory.price@memverge.com>
Subject: Re: [PATCH v11 2/2] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD
Date: Wed, 22 Feb 2023 07:00:22 +0800	[thread overview]
Message-ID: <202302220654.bRPCWovm-lkp@intel.com> (raw)
In-Reply-To: <20230221201740.2236-3-gregory.price@memverge.com>

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@intel.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

  reply	other threads:[~2023-02-21 23:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 20:17 [PATCH v11 0/2] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-02-21 20:17 ` [PATCH v11 1/2] syscall_user_dispatch: helper function to operate on given task Gregory Price
2023-02-21 20:17 ` [PATCH v11 2/2] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD Gregory Price
2023-02-21 23:00   ` kernel test robot [this message]
2023-02-22 12:48   ` Oleg Nesterov
2023-02-22 15:24     ` Gregory Price
2023-02-23 12:30       ` Oleg Nesterov
2023-02-23 15:31         ` Gregory Price
2023-02-23 18:37           ` Oleg Nesterov
2023-02-24  8:17   ` Andrei Vagin
2023-02-24 16:02     ` 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=202302220654.bRPCWovm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=avagin@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gourry.memverge@gmail.com \
    --cc=gregory.price@memverge.com \
    --cc=krisman@collabora.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.