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 75CF4C433EF for ; Thu, 24 Feb 2022 13:59:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C38858D0002; Thu, 24 Feb 2022 08:59:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE7788D0001; Thu, 24 Feb 2022 08:59:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAF7C8D0002; Thu, 24 Feb 2022 08:59:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 9681B8D0001 for ; Thu, 24 Feb 2022 08:59:28 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 799466166D for ; Thu, 24 Feb 2022 13:59:28 +0000 (UTC) X-FDA: 79177830816.03.C8EA881 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf31.hostedemail.com (Postfix) with ESMTP id 27E6920002 for ; Thu, 24 Feb 2022 13:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645711167; x=1677247167; h=date:from:to:cc:subject:message-id:mime-version; bh=6ahx4LiC72YkraULW8w0bt51LnYJC5SIHINOKVH2/3A=; b=JDw+Cn4wSZd1d1E+bfNawcNouU+XNxsmmdWyKWpSHEBxIzyg8nx3+UKe PszNuy1u/4d/SuiBIfp7oR++YFYtBo2ebsS4v39sXNBereDZTwxKPc9sJ QICY/4gxG61p+o9MkN2Wr3MpHdpPPaLWSVna/tRcppMlvatmR+IIjGlsR T+Dy5JV++GF95Y+QcXSphtcTNr6MfkWz0BqavKAk7XiE9pzXnu6hwkEAq NbPGrfjV6yIFA+wx5UkNSGCBEQzo6etUDRxnr1f1hNR8P52XYglmKX2y/ FLCGW4ucapDROyjeZh3GCPKV38VhhhOO9RtDc5mBSnDbRUEqNrZ85efCq A==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="239633682" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="239633682" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 05:59:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="639727346" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 24 Feb 2022 05:59:24 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nNEeR-00039j-C4; Thu, 24 Feb 2022 13:59:23 +0000 Date: Thu, 24 Feb 2022 21:58:31 +0800 From: kernel test robot To: Arnd Bergmann Cc: kbuild-all@lists.01.org, Linux Memory Management List , Christoph Hellwig Subject: [linux-next:master 6403/7915] arch/nios2/kernel/misaligned.c:111:42: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202202242127.1y1iPi0I-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 27E6920002 X-Stat-Signature: 64qm54es5q7fosoqxfz8ktf4zg4ej14w Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=JDw+Cn4w; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf31.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.20) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1645711166-7207 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: Hi Arnd, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d4a0ae62a277377de396850ed4b709b6bd9b7326 commit: ec7ef42b3b2cb57268afc55637d28b3aefb1df30 [6403/7915] nios2: drop access_ok() check from __put_user() config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20220224/202202242127.1y1iPi0I-lkp@intel.com/config) compiler: nios2-linux-gcc (GCC) 11.2.0 reproduce: 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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ec7ef42b3b2cb57268afc55637d28b3aefb1df30 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 ec7ef42b3b2cb57268afc55637d28b3aefb1df30 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash arch/nios2/kernel/ fs/fat/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/nios2/kernel/misaligned.c:98:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:98:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:98:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:99:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:99:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:99:34: sparse: got unsigned char [usertype] * >> arch/nios2/kernel/misaligned.c:111:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:111:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:111:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:112:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:112:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:112:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:116:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:116:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:116:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:117:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:117:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:117:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:133:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:133:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:133:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:134:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:134:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:134:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:135:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:135:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:135:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:136:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned char [usertype] *__pu_ptr @@ arch/nios2/kernel/misaligned.c:136:42: sparse: expected void [noderef] __user *to arch/nios2/kernel/misaligned.c:136:42: sparse: got unsigned char [usertype] *__pu_ptr arch/nios2/kernel/misaligned.c:140:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:140:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:140:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:141:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:141:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:141:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:142:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:142:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:142:34: sparse: got unsigned char [usertype] * arch/nios2/kernel/misaligned.c:143:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const [noderef] __user *__gu_ptr @@ got unsigned char [usertype] * @@ arch/nios2/kernel/misaligned.c:143:34: sparse: expected unsigned char const [noderef] __user *__gu_ptr arch/nios2/kernel/misaligned.c:143:34: sparse: got unsigned char [usertype] * -- >> fs/fat/dir.c:759:1: sparse: sparse: invalid initializer vim +111 arch/nios2/kernel/misaligned.c 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 62 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 63 /* 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 64 * (mis)alignment handler 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 65 */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 66 asmlinkage void handle_unaligned_c(struct pt_regs *fp, int cause) 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 67 { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 68 u32 isn, addr, val; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 69 int in_kernel; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 70 u8 a, b, d0, d1, d2, d3; db5a7e55468147 Bernd Weiberg 2015-09-04 71 s16 imm16; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 72 unsigned int fault; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 73 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 74 /* back up one instruction */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 75 fp->ea -= 4; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 76 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 77 if (fixup_exception(fp)) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 78 return; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 79 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 80 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 81 in_kernel = !user_mode(fp); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 82 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 83 isn = *(unsigned long *)(fp->ea); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 84 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 85 fault = 0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 86 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 87 /* do fixup if in kernel or mode turned on */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 88 if (in_kernel || (ma_usermode & UM_FIXUP)) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 89 /* decompose instruction */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 90 a = (isn >> 27) & 0x1f; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 91 b = (isn >> 22) & 0x1f; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 92 imm16 = (isn >> 6) & 0xffff; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 93 addr = get_reg_val(fp, a) + imm16; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 94 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 95 /* do fixup to saved registers */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 96 switch (isn & 0x3f) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 97 case INST_LDHU: 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 98 fault |= __get_user(d0, (u8 *)(addr+0)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 99 fault |= __get_user(d1, (u8 *)(addr+1)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 100 val = (d1 << 8) | d0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 101 put_reg_val(fp, b, val); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 102 break; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 103 case INST_STH: 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 104 val = get_reg_val(fp, b); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 105 d1 = val >> 8; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 106 d0 = val >> 0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 107 if (in_kernel) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 108 *(u8 *)(addr+0) = d0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 109 *(u8 *)(addr+1) = d1; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 110 } else { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 @111 fault |= __put_user(d0, (u8 *)(addr+0)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 112 fault |= __put_user(d1, (u8 *)(addr+1)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 113 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 114 break; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 115 case INST_LDH: 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 116 fault |= __get_user(d0, (u8 *)(addr+0)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 117 fault |= __get_user(d1, (u8 *)(addr+1)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 118 val = (short)((d1 << 8) | d0); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 119 put_reg_val(fp, b, val); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 120 break; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 121 case INST_STW: 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 122 val = get_reg_val(fp, b); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 123 d3 = val >> 24; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 124 d2 = val >> 16; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 125 d1 = val >> 8; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 126 d0 = val >> 0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 127 if (in_kernel) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 128 *(u8 *)(addr+0) = d0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 129 *(u8 *)(addr+1) = d1; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 130 *(u8 *)(addr+2) = d2; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 131 *(u8 *)(addr+3) = d3; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 132 } else { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 133 fault |= __put_user(d0, (u8 *)(addr+0)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 134 fault |= __put_user(d1, (u8 *)(addr+1)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 135 fault |= __put_user(d2, (u8 *)(addr+2)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 136 fault |= __put_user(d3, (u8 *)(addr+3)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 137 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 138 break; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 139 case INST_LDW: 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 140 fault |= __get_user(d0, (u8 *)(addr+0)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 141 fault |= __get_user(d1, (u8 *)(addr+1)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 142 fault |= __get_user(d2, (u8 *)(addr+2)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 143 fault |= __get_user(d3, (u8 *)(addr+3)); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 144 val = (d3 << 24) | (d2 << 16) | (d1 << 8) | d0; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 145 put_reg_val(fp, b, val); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 146 break; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 147 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 148 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 149 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 150 addr = RDCTL(CTL_BADADDR); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 151 cause >>= 2; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 152 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 153 if (fault) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 154 if (in_kernel) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 155 pr_err("fault during kernel misaligned fixup @ %#lx; addr 0x%08x; isn=0x%08x\n", 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 156 fp->ea, (unsigned int)addr, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 157 (unsigned int)isn); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 158 } else { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 159 pr_err("fault during user misaligned fixup @ %#lx; isn=%08x addr=0x%08x sp=0x%08lx pid=%d\n", 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 160 fp->ea, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 161 (unsigned int)isn, addr, fp->sp, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 162 current->pid); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 163 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 164 _exception(SIGSEGV, fp, SEGV_MAPERR, fp->ea); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 165 return; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 166 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 167 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 168 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 169 /* 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 170 * kernel mode - 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 171 * note exception and skip bad instruction (return) 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 172 */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 173 if (in_kernel) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 174 fp->ea += 4; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 175 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 176 if (ma_usermode & KM_WARN) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 177 pr_err("kernel unaligned access @ %#lx; BADADDR 0x%08x; cause=%d, isn=0x%08x\n", 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 178 fp->ea, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 179 (unsigned int)addr, cause, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 180 (unsigned int)isn); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 181 /* show_regs(fp); */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 182 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 183 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 184 return; 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 185 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 186 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 187 /* 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 188 * user mode - 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 189 * possibly warn, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 190 * possibly send SIGBUS signal to process 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 191 */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 192 if (ma_usermode & UM_WARN) { 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 193 pr_err("user unaligned access @ %#lx; isn=0x%08lx ea=0x%08lx ra=0x%08lx sp=0x%08lx\n", 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 194 (unsigned long)addr, (unsigned long)isn, 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 195 fp->ea, fp->ra, fp->sp); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 196 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 197 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 198 if (ma_usermode & UM_SIGNAL) 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 199 _exception(SIGBUS, fp, BUS_ADRALN, fp->ea); 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 200 else 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 201 fp->ea += 4; /* else advance */ 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 202 } 82ed08dd1b0e0e Ley Foon Tan 2014-11-06 203 :::::: The code at line 111 was first introduced by commit :::::: 82ed08dd1b0e0e0728f9188f66795c49dffe437d nios2: Exception handling :::::: TO: Ley Foon Tan :::::: CC: Ley Foon Tan --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org