tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b3e8831fccd1999bb3d13b324fce51dcf3d41841 commit: d549e609b8685eb101a4653249ef7e3fe8bb3e99 [20368/22178] binder: use userspace pointer as base of buffer space config: x86_64-randconfig-123-20240424 (https://download.01.org/0day-ci/archive/20240424/202404241104.lionv8rg-lkp@i...) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240424/202404241104.lionv8rg-lkp@i...)
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 lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202404241104.lionv8rg-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/android/binder_alloc_selftest.c:109:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *page_addr @@ got void [noderef] asn:1 *user_data @@
drivers/android/binder_alloc_selftest.c:109:19: sparse: expected void *page_addr drivers/android/binder_alloc_selftest.c:109:19: sparse: got void [noderef] asn:1 *user_data drivers/android/binder_alloc_selftest.c:111:41: sparse: sparse: subtraction of different types can't work (different address spaces) drivers/android/binder_alloc_selftest.c:85: warning: Enum value 'LOOP_END' not described in enum 'buf_end_align_type'
vim +109 drivers/android/binder_alloc_selftest.c
100 101 static bool check_buffer_pages_allocated(struct binder_alloc *alloc, 102 struct binder_buffer *buffer, 103 size_t size) 104 { 105 void *page_addr, *end; 106 int page_index; 107 108 end = (void *)PAGE_ALIGN((uintptr_t)buffer->user_data + size);
109 page_addr = buffer->user_data;
110 for (; page_addr < end; page_addr += PAGE_SIZE) { 111 page_index = (page_addr - alloc->buffer) / PAGE_SIZE; 112 if (!alloc->pages[page_index].page_ptr || 113 !list_empty(&alloc->pages[page_index].lru)) { 114 pr_err("expect alloc but is %s at page index %d\n", 115 alloc->pages[page_index].page_ptr ? 116 "lru" : "free", page_index); 117 return false; 118 } 119 } 120 return true; 121 } 122