CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Balbir Singh <[email protected]> CC: [email protected], [email protected]
Hi Balbir, I love your patch! Perhaps something to improve: [auto build test WARNING on kvm/linux-next] [also build test WARNING on linus/master v5.7-rc1 next-20200413] [cannot apply to tip/auto-latest tip/x86/mm tip/x86/core] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Balbir-Singh/Optionally-flush-L1D-on-context-switch/20200408-192153 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next :::::: branch date: 5 days ago :::::: commit date: 5 days ago If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <[email protected]> cppcheck warnings: (new ones prefixed by >>) >> arch/x86/kernel/l1d_flush.c:25:26: warning: 'l1d_flush_pages' is of type >> 'void *'. When using void pointers in calculations, the behaviour is >> undefined. [arithOperationsOnVoidPointer] memset(l1d_flush_pages + i * PAGE_SIZE, i + 1, ^ # https://github.com/0day-ci/linux/commit/01f030960171a1eb6e3183aa69d002464fdb4194 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 01f030960171a1eb6e3183aa69d002464fdb4194 vim +25 arch/x86/kernel/l1d_flush.c 01f030960171a1 Balbir Singh 2020-04-08 3 01f030960171a1 Balbir Singh 2020-04-08 4 void *alloc_l1d_flush_pages(void) 01f030960171a1 Balbir Singh 2020-04-08 5 { 01f030960171a1 Balbir Singh 2020-04-08 6 struct page *page; 01f030960171a1 Balbir Singh 2020-04-08 7 void *l1d_flush_pages = NULL; 01f030960171a1 Balbir Singh 2020-04-08 8 int i; 01f030960171a1 Balbir Singh 2020-04-08 9 01f030960171a1 Balbir Singh 2020-04-08 10 /* 01f030960171a1 Balbir Singh 2020-04-08 11 * This allocation for l1d_flush_pages is not tied to a VM/task's 01f030960171a1 Balbir Singh 2020-04-08 12 * lifetime and so should not be charged to a memcg. 01f030960171a1 Balbir Singh 2020-04-08 13 */ 01f030960171a1 Balbir Singh 2020-04-08 14 page = alloc_pages(GFP_KERNEL, L1D_CACHE_ORDER); 01f030960171a1 Balbir Singh 2020-04-08 15 if (!page) 01f030960171a1 Balbir Singh 2020-04-08 16 return NULL; 01f030960171a1 Balbir Singh 2020-04-08 17 l1d_flush_pages = page_address(page); 01f030960171a1 Balbir Singh 2020-04-08 18 01f030960171a1 Balbir Singh 2020-04-08 19 /* 01f030960171a1 Balbir Singh 2020-04-08 20 * Initialize each page with a different pattern in 01f030960171a1 Balbir Singh 2020-04-08 21 * order to protect against KSM in the nested 01f030960171a1 Balbir Singh 2020-04-08 22 * virtualization case. 01f030960171a1 Balbir Singh 2020-04-08 23 */ 01f030960171a1 Balbir Singh 2020-04-08 24 for (i = 0; i < 1u << L1D_CACHE_ORDER; ++i) { 01f030960171a1 Balbir Singh 2020-04-08 @25 memset(l1d_flush_pages + i * PAGE_SIZE, i + 1, 01f030960171a1 Balbir Singh 2020-04-08 26 PAGE_SIZE); 01f030960171a1 Balbir Singh 2020-04-08 27 } 01f030960171a1 Balbir Singh 2020-04-08 28 return l1d_flush_pages; 01f030960171a1 Balbir Singh 2020-04-08 29 } 01f030960171a1 Balbir Singh 2020-04-08 30 EXPORT_SYMBOL_GPL(alloc_l1d_flush_pages); 01f030960171a1 Balbir Singh 2020-04-08 31 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
