Skip to contentSkip to conversation

drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:35:16: sparse: sparse: not a function list_add_valid_or_report

PATCH kernel test robot 1 participant 1 message Nov 28

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:35:16: sparse: sparse: not a function list_add_valid_or_report" ::::::

BCC: [email protected]
CC: [email protected]
TO: [email protected]

Hi Mostafa,

First bad commit (maybe != root cause):

tree:   https://android.googlesource.com/kernel/common android17-6.18
head:   531718cea1e32dd7cc6c91731f0f6a07c8aae153
commit: 5e05ef6d02e170f7200fb3a5b56acd2993b20633 [9/9] ANDROID: drivers/arm-smmu-v3-kvm: Modularize driver

:::::: branch date: 11 hours ago
:::::: commit date: 12 months ago
config: arm64-randconfig-r2300-20261127 (https://download.01.org/0day-ci/archive/20261128/[email protected]/config)
compiler: aarch64-linux-gcc (GCC) 15.3.0
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261128/[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/r/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:35:16: sparse: sparse: not a function list_add_valid_or_report
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:40:16: sparse: sparse: not a function list_del_entry_valid_or_report
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:410:15: sparse: sparse: cast to restricted __le64
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:410:15: sparse: sparse: restricted __le64 degrades to integer
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:410:15: sparse: sparse: restricted __le64 degrades to integer
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:411:14: sparse: sparse: cast to restricted __le64
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:411:14: sparse: sparse: restricted __le64 degrades to integer
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:411:14: sparse: sparse: restricted __le64 degrades to integer
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:426:22: sparse: sparse: invalid assignment: |=
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:428:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 @@     got unsigned long long @@
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:438:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le64 @@     got unsigned long long @@
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:440:22: sparse: sparse: invalid assignment: |=
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:456:40: sparse: sparse: restricted __le64 degrades to integer
   drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:459:25: sparse: sparse: restricted __le64 degrades to integer
>> drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c:612:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *base @@     got void * @@

vim +35 drivers/iommu/arm/arm-smmu-v3/pkvm/nested/arm-smmu-v3.c

6056d88e71d977 Mostafa Saleh 2023-08-17  29  
6056d88e71d977 Mostafa Saleh 2023-08-17  30  #ifdef CONFIG_LIST_HARDENED
6056d88e71d977 Mostafa Saleh 2023-08-17  31  bool __list_add_valid_or_report(struct list_head *new,
6056d88e71d977 Mostafa Saleh 2023-08-17  32  				struct list_head *prev,
6056d88e71d977 Mostafa Saleh 2023-08-17  33  				struct list_head *next)
6056d88e71d977 Mostafa Saleh 2023-08-17  34  {
6056d88e71d977 Mostafa Saleh 2023-08-17 @35  	return CALL_FROM_OPS(list_add_valid_or_report, new, prev, next);
6056d88e71d977 Mostafa Saleh 2023-08-17  36  }
6056d88e71d977 Mostafa Saleh 2023-08-17  37  
6056d88e71d977 Mostafa Saleh 2023-08-17  38  bool __list_del_entry_valid_or_report(struct list_head *entry)
6056d88e71d977 Mostafa Saleh 2023-08-17  39  {
6056d88e71d977 Mostafa Saleh 2023-08-17 @40  	return CALL_FROM_OPS(list_del_entry_valid_or_report, entry);
6056d88e71d977 Mostafa Saleh 2023-08-17  41  }
6056d88e71d977 Mostafa Saleh 2023-08-17  42  #endif

6056d88e71d977 Mostafa Saleh 2023-08-17 43

:::::: The code at line 35 was first introduced by commit
:::::: 6056d88e71d977020974d7b4af860cbc0ecc6276 ANDROID: iommu/arm-smmu-v3-kvm: Support EL2 compiling as a module

:::::: TO: Mostafa Saleh <[email protected]>
:::::: CC: Mostafa Saleh <[email protected]>

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