Skip to contentSkip to conversation

arch/arm/mm/alignment.c:799:25: sparse: sparse: incorrect type in argument 1 (different address spaces)

PATCH kernel test robot 1 participant 1 message Nov 19

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git armnommu
head:   956b02be1acd82a724269d0fc12ed4fe0f940172
commit: 956b02be1acd82a724269d0fc12ed4fe0f940172 [3/3] ARM: versatile: support configuring versatile machine for no-MMU
config: arm-randconfig-r2307-20261119 (https://download.01.org/0day-ci/archive/20261119/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> arch/arm/mm/alignment.c:799:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int [usertype] *ip @@
   arch/arm/mm/alignment.c:799:25: sparse:     expected void const volatile [noderef] __user *ptr
   arch/arm/mm/alignment.c:799:25: sparse:     got unsigned int [usertype] *ip
>> arch/arm/mm/alignment.c:814:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned short [usertype] *ip @@

arch/arm/mm/alignment.c:814:25: sparse: expected void const volatile [noderef] __user *ptr
arch/arm/mm/alignment.c:814:25: sparse: got unsigned short [usertype] *ip

vim +799 arch/arm/mm/alignment.c

c2860d43f5dfab George G. Davis   2009-06-04  792  
1bb9fb0a147f9d Russell King      2019-09-06  793  static int alignment_get_arm(struct pt_regs *regs, u32 *ip, u32 *inst)
67e15fa5b487ad Russell King      2019-08-31  794  {
67e15fa5b487ad Russell King      2019-08-31  795  	u32 instr = 0;
67e15fa5b487ad Russell King      2019-08-31  796  	int fault;
67e15fa5b487ad Russell King      2019-08-31  797  
67e15fa5b487ad Russell King      2019-08-31  798  	if (user_mode(regs))
67e15fa5b487ad Russell King      2019-08-31 @799  		fault = get_user(instr, ip);
67e15fa5b487ad Russell King      2019-08-31  800  	else
25f12ae45fc193 Christoph Hellwig 2020-06-17  801  		fault = get_kernel_nofault(instr, ip);
67e15fa5b487ad Russell King      2019-08-31  802  
67e15fa5b487ad Russell King      2019-08-31  803  	*inst = __mem_to_opcode_arm(instr);
67e15fa5b487ad Russell King      2019-08-31  804  
67e15fa5b487ad Russell King      2019-08-31  805  	return fault;
67e15fa5b487ad Russell King      2019-08-31  806  }
67e15fa5b487ad Russell King      2019-08-31  807  
67e15fa5b487ad Russell King      2019-08-31  808  static int alignment_get_thumb(struct pt_regs *regs, u16 *ip, u16 *inst)
67e15fa5b487ad Russell King      2019-08-31  809  {
67e15fa5b487ad Russell King      2019-08-31  810  	u16 instr = 0;
67e15fa5b487ad Russell King      2019-08-31  811  	int fault;
67e15fa5b487ad Russell King      2019-08-31  812  
67e15fa5b487ad Russell King      2019-08-31  813  	if (user_mode(regs))
67e15fa5b487ad Russell King      2019-08-31 @814  		fault = get_user(instr, ip);
67e15fa5b487ad Russell King      2019-08-31  815  	else
25f12ae45fc193 Christoph Hellwig 2020-06-17  816  		fault = get_kernel_nofault(instr, ip);
67e15fa5b487ad Russell King      2019-08-31  817  
67e15fa5b487ad Russell King      2019-08-31  818  	*inst = __mem_to_opcode_thumb16(instr);
67e15fa5b487ad Russell King      2019-08-31  819  
67e15fa5b487ad Russell King      2019-08-31  820  	return fault;
67e15fa5b487ad Russell King      2019-08-31  821  }
67e15fa5b487ad Russell King      2019-08-31  822  

:::::: The code at line 799 was first introduced by commit
:::::: 67e15fa5b487adb9b78a92789eeff2d6ec8f5cee ARM: mm: fix alignment handler faults under memory pressure

:::::: TO: Russell King <[email protected]> :::::: CC: Russell King <[email protected]>

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki