From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42742C0015E for ; Thu, 15 Jun 2023 11:43:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 997B68E0001; Thu, 15 Jun 2023 07:43:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 947886B0074; Thu, 15 Jun 2023 07:43:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8366D8E0001; Thu, 15 Jun 2023 07:43:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 73B9E6B0072 for ; Thu, 15 Jun 2023 07:43:25 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 490A1160C04 for ; Thu, 15 Jun 2023 11:43:25 +0000 (UTC) X-FDA: 80904796770.16.0EA84FE Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf29.hostedemail.com (Postfix) with ESMTP id DCE98120012 for ; Thu, 15 Jun 2023 11:43:21 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=brmg9yBN; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686829402; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=SfRLeV8Vs+3v6VGi/GW6cnVOqA1OWqty493g6DNY1bA=; b=Qvox2jxuexOiyju5sfatSrFbB0UqxzfHjUOmf9gK75jrDWpfOclNsWu8YBa328dYuNws7O iHTMVNROiQ/CvmhXfXChrcTDiUfFmCJAL2sh8WRLAs+Yj103JKiK4VqPzU2iwDBmwUaGQL 78EGRVACMhT/hHE2qgoZF27rKaHhSQQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686829402; a=rsa-sha256; cv=none; b=JqqiAJ0Z8inZpxA7t10k+SHQ7jf89ikBTgK3S4nksXET4s60cEzUZI4OPEJZA0x9Io4H5y 89aFAFZ0tve1GRMhVrQ06LMGI4uz0HEH5C58hfexp21d4grZ5xr4TgE3xKq0NwU7dU9Xr1 ZDDA2QlzPx9Uiv+TktjIsBCWiUC3bgo= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=brmg9yBN; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686829402; x=1718365402; h=date:from:to:cc:subject:message-id:mime-version; bh=8qWuFG48VzWSQ+RP20O2d6cvC9yxcsb/6CEju6hHO1o=; b=brmg9yBNQNhL1Olv5WsT+FWwwFxS41m7PXYZip4f4VqxXo2XnSqJC33k UHC9pxixsD2awdJ704HuxcoIQUub3mJV8xnVvJuQWGqSwliiSx1lD4eFo nn6dm6U7SnKh2AuE+OWbYCIMu9cCcgzmry7krAh1QS5eXxrFtC9HU5QbC 3/aK7bL+7uAOZBtoRepVGUO6vqutDk9xY8V6qEpXEzTULdArCmhE4wj1E 7zrfvvY9Cp5aNa/KpxYaQNhhXsDEfwuHQn2wBn+anWqFAz2uAMuzI7Yev C78oroti7jUUVNInUoSuQturlhWqGqqGtR5jTBqIf1S96AMD9npMtgPWW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="445255917" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="445255917" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 04:38:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="706626648" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="706626648" Received: from lkp-server02.sh.intel.com (HELO d59cacf64e9e) ([10.239.97.151]) by orsmga007.jf.intel.com with ESMTP; 15 Jun 2023 04:38:03 -0700 Received: from kbuild by d59cacf64e9e with local (Exim 4.96) (envelope-from ) id 1q9lHf-0001ol-1b; Thu, 15 Jun 2023 11:37:19 +0000 Date: Thu, 15 Jun 2023 19:36:33 +0800 From: kernel test robot To: Guo Ren Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Palmer Dabbelt , Greentime Hu , Andy Chiu , Conor Dooley Subject: [linux-next:master 6420/10326] arch/riscv/kernel/signal.c:94:16: sparse: sparse: incorrect type in initializer (different address spaces) Message-ID: <202306151954.Rsz6HP7h-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: 44inc1tbxcxbm9kp7ped9w9ca73o9bw6 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: DCE98120012 X-Rspam-User: X-HE-Tag: 1686829401-758561 X-HE-Meta: U2FsdGVkX18ctu8mq1f3Z3bi6U0sQm2QVocE8Gd2N4uwphzy/UmepMED0gg9glx4XLIO5k3AzEGuhChiAOFqZ0mOOFsfAbAssoEBmlUFMy8258fU13Fzl39epH1y4+dinA2pu3w4mrOr1ZgQlMUhNXf0GI8kubtPuTnmeb7G0hL33FFYKArUqfRJzyT+PTwqcYnL+yLFl17fZjz7yHSW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PQG0vTcwqct8N+Ded1eeLtGr24jX3CQu0zkGb/Vc38UCE7JXJQX7P+dGDD9d1jQb6kWhsSkJCub50H5Q9vxQbombYAGgx032vPQ665fbJrD/NgLJN/G2OM0PnW6i1+YPxLTZMJQoHCxLr/wkYHjL2ZHqovnTjq8/7MZKXCRP8EFSQtE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 925294c9aa184801cc0a451b69a18dd0fe7d847d commit: fa8e7cce55da3569259dc270801885c420eb50fe [6420/10326] riscv: Enable Vector code to be built config: riscv-randconfig-s031-20230611 (https://download.01.org/0day-ci/archive/20230615/202306151954.Rsz6HP7h-lkp@intel.com/config) compiler: riscv64-linux-gcc (GCC) 12.3.0 reproduce: mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fa8e7cce55da3569259dc270801885c420eb50fe git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout fa8e7cce55da3569259dc270801885c420eb50fe # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/ If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202306151954.Rsz6HP7h-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) WARNING: invalid argument to '-march': '_zihintpause' >> arch/riscv/kernel/signal.c:94:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void *__val @@ got void [noderef] __user *[assigned] datap @@ arch/riscv/kernel/signal.c:94:16: sparse: expected void *__val arch/riscv/kernel/signal.c:94:16: sparse: got void [noderef] __user *[assigned] datap vim +94 arch/riscv/kernel/signal.c 8ee0b41898fa26 Greentime Hu 2023-06-05 72 8ee0b41898fa26 Greentime Hu 2023-06-05 73 static long save_v_state(struct pt_regs *regs, void __user **sc_vec) 8ee0b41898fa26 Greentime Hu 2023-06-05 74 { 8ee0b41898fa26 Greentime Hu 2023-06-05 75 struct __riscv_ctx_hdr __user *hdr; 8ee0b41898fa26 Greentime Hu 2023-06-05 76 struct __sc_riscv_v_state __user *state; 8ee0b41898fa26 Greentime Hu 2023-06-05 77 void __user *datap; 8ee0b41898fa26 Greentime Hu 2023-06-05 78 long err; 8ee0b41898fa26 Greentime Hu 2023-06-05 79 8ee0b41898fa26 Greentime Hu 2023-06-05 80 hdr = *sc_vec; 8ee0b41898fa26 Greentime Hu 2023-06-05 81 /* Place state to the user's signal context space after the hdr */ 8ee0b41898fa26 Greentime Hu 2023-06-05 82 state = (struct __sc_riscv_v_state __user *)(hdr + 1); 8ee0b41898fa26 Greentime Hu 2023-06-05 83 /* Point datap right after the end of __sc_riscv_v_state */ 8ee0b41898fa26 Greentime Hu 2023-06-05 84 datap = state + 1; 8ee0b41898fa26 Greentime Hu 2023-06-05 85 8ee0b41898fa26 Greentime Hu 2023-06-05 86 /* datap is designed to be 16 byte aligned for better performance */ 8ee0b41898fa26 Greentime Hu 2023-06-05 87 WARN_ON(unlikely(!IS_ALIGNED((unsigned long)datap, 16))); 8ee0b41898fa26 Greentime Hu 2023-06-05 88 8ee0b41898fa26 Greentime Hu 2023-06-05 89 riscv_v_vstate_save(current, regs); 8ee0b41898fa26 Greentime Hu 2023-06-05 90 /* Copy everything of vstate but datap. */ 8ee0b41898fa26 Greentime Hu 2023-06-05 91 err = __copy_to_user(&state->v_state, ¤t->thread.vstate, 8ee0b41898fa26 Greentime Hu 2023-06-05 92 offsetof(struct __riscv_v_ext_state, datap)); 8ee0b41898fa26 Greentime Hu 2023-06-05 93 /* Copy the pointer datap itself. */ 8ee0b41898fa26 Greentime Hu 2023-06-05 @94 err |= __put_user(datap, &state->v_state.datap); 8ee0b41898fa26 Greentime Hu 2023-06-05 95 /* Copy the whole vector content to user space datap. */ 8ee0b41898fa26 Greentime Hu 2023-06-05 96 err |= __copy_to_user(datap, current->thread.vstate.datap, riscv_v_vsize); 8ee0b41898fa26 Greentime Hu 2023-06-05 97 /* Copy magic to the user space after saving all vector conetext */ 8ee0b41898fa26 Greentime Hu 2023-06-05 98 err |= __put_user(RISCV_V_MAGIC, &hdr->magic); 8ee0b41898fa26 Greentime Hu 2023-06-05 99 err |= __put_user(riscv_v_sc_size, &hdr->size); 8ee0b41898fa26 Greentime Hu 2023-06-05 100 if (unlikely(err)) 8ee0b41898fa26 Greentime Hu 2023-06-05 101 return err; 8ee0b41898fa26 Greentime Hu 2023-06-05 102 8ee0b41898fa26 Greentime Hu 2023-06-05 103 /* Only progress the sv_vec if everything has done successfully */ 8ee0b41898fa26 Greentime Hu 2023-06-05 104 *sc_vec += riscv_v_sc_size; 8ee0b41898fa26 Greentime Hu 2023-06-05 105 return 0; 8ee0b41898fa26 Greentime Hu 2023-06-05 106 } 8ee0b41898fa26 Greentime Hu 2023-06-05 107 :::::: The code at line 94 was first introduced by commit :::::: 8ee0b41898fa26f66e32237f179b6989c65600d6 riscv: signal: Add sigcontext save/restore for vector :::::: TO: Greentime Hu :::::: CC: Palmer Dabbelt -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki