Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp341845rwb; Wed, 18 Jan 2023 18:45:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXvQ92xLj5/jXwrJNkOri6IK4EnQvcvxhAyV0ZG6YtaLYDLCbmSP4S493IY2PXSG5I056dw3 X-Received: by 2002:a17:906:4b53:b0:873:3806:be87 with SMTP id j19-20020a1709064b5300b008733806be87mr8690867ejv.71.1674096300978; Wed, 18 Jan 2023 18:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674096300; cv=none; d=google.com; s=arc-20160816; b=JsrlpJjXyHvYZ0oaJKIni5Lg0op5As48SqA61lI5EqeE/BAdvkZt7jDZkzkXBCCkbS HOeAOt3yaHq8Br5SYePgaIkYqqZYIiw8MHll3FkSTr+Ylbs5uemLwOHPWElP7jB0P02+ +RCw/xRnUVOkgujOMJEC//mAzAeOLv5BDS0KW7DftOfFy/r1RbWSQuFMDnVUSazhyjPi pnqRhX08XqJUlCx23IHHS3tYLDtEJbbpTHjmE7cdsfg8k4+UgVHWOZfsmCCwKEytgcLV uDcvZn385erYdgdae56u+3ha5+FSA/ahcGCzWSFmnjhDR+23NhlLrCkeCcaGGtNCJ88S xbzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PnpDgn3OcpfBck3FXu2eyEJzLXoQeN6JbQlh/ugLsCQ=; b=grN9nRnHJR1Ac/ZFptBZupLCnZ7CxGRAtWsmgA33E6KOjujtrXa1inm7GuKvuBJfaN IiT44s30GqiuOZ1bTVL8IgxC6rPvmYmiKSJMC68i3eOVxTt62Rg77wdm5OQTohlXCQtg hukfxkNGqXKdbaKIHC13ocYtbB3qrT/NYcWjvZAHZbORnjtINUIowZT7urpFHEiJtwvw 5tCkPzDXqLUE3a5jiI92nKLZG/eZGYbyI41qgGIGWBqf2dDZyG1dnyf+GLXv51bMuZyd QROnJq4529C97ajmXujckNU/iFn7hZcTA0UB1BJd8+ARETXJW6ZciLUOH52I3HhHbEOq JXVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fOCGk3bI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a056402354f00b0049e385155f3si2942040edd.100.2023.01.18.18.44.50; Wed, 18 Jan 2023 18:45:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fOCGk3bI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjASCjl (ORCPT + 44 others); Wed, 18 Jan 2023 21:39:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjASCji (ORCPT ); Wed, 18 Jan 2023 21:39:38 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 980FD69B37; Wed, 18 Jan 2023 18:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674095977; x=1705631977; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=G/dmJqT2Xj1iMyfuzcvUrdcL1Qhb/ASAsS90qZQMtJ8=; b=fOCGk3bI+zXZT515dPdiW9FuYQQlrRLMrT3ZuBqjxLJozvdihR5Bv5gn XyEuWDXdXyBMxBnaUC4thUGkZrKw/9/xMwmFdqllHF/EOOxdAkHMNlcNW CiUW/HvdjOe1xPraZyRAmCwZKmcJvZqXAB/fCLBYMdhm5pNw1Z2QP0nSW lXEzgPPC3ZYmCMrB1WyTatpI8n2A9+erZ8KszJgvNGbbtDuIJ5Mc2emXX TY10UWwIyP2SUG+LXaUnSdW5I4VyWPiSloyR99WpbUcZPmAo8cg5uWgCl Sh1l0yyva2hToMKrY7314p4K2f2+fW5jTXznPINkVR8O52iSfD2g4FKpu Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="323857732" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="323857732" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 18:39:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="692253881" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="692253881" Received: from lkp-server01.sh.intel.com (HELO 5646d64e7320) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 18 Jan 2023 18:39:32 -0800 Received: from kbuild by 5646d64e7320 with local (Exim 4.96) (envelope-from ) id 1pIKpq-0000yo-0g; Thu, 19 Jan 2023 02:39:26 +0000 Date: Thu, 19 Jan 2023 10:39:08 +0800 From: kernel test robot To: Gregory Price , 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 Subject: Re: [PATCH 3/3] ptrace,syscall_user_dispatch: add a getter/setter for sud configuration Message-ID: <202301191010.U5yAKr05-lkp@intel.com> References: <20230118201055.147228-4-gregory.price@memverge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118201055.147228-4-gregory.price@memverge.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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