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 1F263C54E5C for ; Fri, 8 Mar 2024 10:54:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 721866B036D; Fri, 8 Mar 2024 05:54:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D02E6B036E; Fri, 8 Mar 2024 05:54:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 598706B036F; Fri, 8 Mar 2024 05:54:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4991F6B036D for ; Fri, 8 Mar 2024 05:54:59 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E67F84162C for ; Fri, 8 Mar 2024 10:54:58 +0000 (UTC) X-FDA: 81873564276.05.70059E2 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by imf22.hostedemail.com (Postfix) with ESMTP id 740A4C000E for ; Fri, 8 Mar 2024 10:54:56 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ehSVVw7E; spf=pass (imf22.hostedemail.com: domain of lkp@intel.com designates 192.198.163.17 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709895297; a=rsa-sha256; cv=none; b=OLyvpT7+tNTMyx2W/0lfDuO5zRPKpr4Q7BFE1Egj0bfE4PmA+vQfh31Fdcu2l71+Vnm0Xh UWUZ/k1TMB0xHZyHcZpvHTrSPpBUytpvC8x7OHkYMDAwvbI+QHDOntVka/PNDc87XTU2k1 obEYU6ShRNKlr6HSWGEJWyiwHPQJfH8= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ehSVVw7E; spf=pass (imf22.hostedemail.com: domain of lkp@intel.com designates 192.198.163.17 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709895297; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=huM2It+w7QItUBbwKqQE2EpxTI1kcSMAl6HX8xTiXGc=; b=lI/NoZt8S37g6oq4jj9G2raW10m/LcH10wKHv1nYtZieX2zTqidGY1CZuyZUT1Di7LJk5X 7bGBGFSCzBSlsMNGGr0p8SyMqX6EOhPWo+od/X0gd1Q6Ek7r509YKI96vpilCnT+e251Qh AL+LuRjF9SgtoJfinJZeRuU+6tveQWA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709895296; x=1741431296; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=j1ynKLY5env5mTcwYEWX+LZc3E3rIOPqHmFvLqb/PaU=; b=ehSVVw7EHKj0v6ZB3CRzz4WD1UukwsB1kk5VFEEymqOetHqsAemeJ+nt K6fDaaWmM9TB0Dll1n24OsM4oQwU4s3dx3oyizeyyuAvZfJ8OYmymgEY5 evl2+k9JDde//sC0CDoE/9Fcq3Wc7OxJNO5kUfOQLW8Hih52RPx/6OIBj J9eO66i2DcSBilEAgJGvPKdYV4nxJX8GX/wqMpZHU/UBNehnTBYmm6yMM uLEGWXtp901UAjU+O5Re/eU53wfy+Jf8six+eOaDDR4CH33BlF3dFMuQt 9km+BwqZq8hjXYnfargV05/vBD2ZV0mdjBm/FdM0OiKR1oKaaFb2FfeMn g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4479456" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4479456" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 02:54:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10874781" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by orviesa007.jf.intel.com with ESMTP; 08 Mar 2024 02:54:49 -0800 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1riXsD-0006JH-1g; Fri, 08 Mar 2024 10:54:45 +0000 Date: Fri, 8 Mar 2024 18:54:22 +0800 From: kernel test robot To: Steven Rostedt , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Linux Memory Management List , Vincent Donnefort , Joel Fernandes , Daniel Bristot de Oliveira , Ingo Molnar , Peter Zijlstra , suleiman@google.com, Thomas Gleixner , Vineeth Pillai , Youssef Esmat , Beau Belgrave , Alexander Graf , Baoquan He , Borislav Petkov , "Paul E. McKenney" , David Howells Subject: Re: [PATCH 5/8] ring-buffer: Add ring_buffer_meta data Message-ID: <202403081843.QYKJKYk4-lkp@intel.com> References: <20240306020006.100449500@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240306020006.100449500@goodmis.org> X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 740A4C000E X-Stat-Signature: eszf4jwfoq5f7gnx1ikxr6tgzu9de8t3 X-Rspam-User: X-HE-Tag: 1709895296-63405 X-HE-Meta: U2FsdGVkX19KhZFpjg1BmmPsKutEmsgace2CME0Nibj3KMYtSFebK4VbtatPxnOzML1Hh+Ufbf+0eBlWqQv3QAHguOQHfeg/J9r4K53q9pr+YaT0jGxfLRGE4gkOnKiJREJKXL1xcTSe2rSW28y754TRrOCq6xnDN2+Qj1zBiAiyuNc+NlEHTsYs9wjMvZ1NEf9g1irQHRtmh2j5UUKdwzaCIxJkiGvvBydDQAeElSYgIke6sjmIHT6vI9yem9FiBXWPftGsUG9iluRDlRmaVdoPPKqSSmT6hYKbw/olkdgd6noG6//rQWZIf6+bE9A5b5JHHNfRcabAiu1i6EEWXVvXvQQylMpPEQ6y3o1r4NnzQII24LC/GgPELCZdLVNzYLxq3PO+NWMv6wsYPCs/TTeArSHBgBKwkuxw5DkNBxQyd/G7Ai2H/5l1cPdthbLACSvqNN9ypDi46wxfh0WnWn/95EtgktvpAPEK6jlOSuu3yKC2NA+JeZudgxRf+MKEcYGj8H3QCQ8UMEfxyHYw3LtwNAlg4t1wJcr1OP+YBsxSgvn8HDJ46IOVRqXJzRNaDYY3P0dd7oX2SfoNP3TiaACmWUptT6YP8cvKTNASLFQncMHWSGnRIjkAORnrZWH0jgNj6UGaU6KN+lJulsAInn2xIXQDqy9OJ7k/2XbR9iP3f72QvDJCF2IOTpJBBzw85gQe7UEp/jy5kCTt9Pcoh7K+yuh9+1YLYhLaCbKCt+x1TKoxnnJhW09b8/uf2LrLSNO4sBpxYzIFzv+1hOxJNxGY+WUe3Wci6ItCbOkn/8KNzWj5NyjYcH3ogN4bB5NMUyYhpahcnnYGDJ6GLxMCmaNkbWtfa3dWvR3Bn5uzE9yM70aRxejC80w0khBkG3XkRRyOau7ZAV4= 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: List-Subscribe: List-Unsubscribe: Hi Steven, kernel test robot noticed the following build errors: [auto build test ERROR on next-20240305] [cannot apply to tip/x86/core akpm-mm/mm-everything linus/master v6.8-rc7 v6.8-rc6 v6.8-rc5 v6.8-rc7] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Steven-Rostedt/ring-buffer-Allow-mapped-field-to-be-set-without-mapping/20240306-100047 base: next-20240305 patch link: https://lore.kernel.org/r/20240306020006.100449500%40goodmis.org patch subject: [PATCH 5/8] ring-buffer: Add ring_buffer_meta data config: s390-defconfig (https://download.01.org/0day-ci/archive/20240308/202403081843.QYKJKYk4-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240308/202403081843.QYKJKYk4-lkp@intel.com/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 | Closes: https://lore.kernel.org/oe-kbuild-all/202403081843.QYKJKYk4-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/trace/ring_buffer.c:8: In file included from include/linux/trace_events.h:6: In file included from include/linux/ring_buffer.h:5: In file included from include/linux/mm.h:2208: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/trace/ring_buffer.c:8: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:62: In file included from include/linux/security.h:35: include/linux/bpf.h:736:48: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 736 | ARG_PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:737:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 737 | ARG_PTR_TO_MEM_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:738:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 738 | ARG_PTR_TO_CTX_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_CTX, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:739:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 739 | ARG_PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:740:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 740 | ARG_PTR_TO_STACK_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_STACK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ include/linux/bpf.h:741:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 741 | ARG_PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | ARG_PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:745:38: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 745 | ARG_PTR_TO_UNINIT_MEM = MEM_UNINIT | ARG_PTR_TO_MEM, | ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:747:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_arg_type') [-Wenum-enum-conversion] 747 | ARG_PTR_TO_FIXED_SIZE_MEM = MEM_FIXED_SIZE | ARG_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:770:48: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 770 | RET_PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:771:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 771 | RET_PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:772:47: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 772 | RET_PTR_TO_TCP_SOCK_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_TCP_SOCK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:773:50: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 773 | RET_PTR_TO_SOCK_COMMON_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_SOCK_COMMON, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:775:49: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 775 | RET_PTR_TO_DYNPTR_MEM_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_MEM, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ include/linux/bpf.h:776:45: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 776 | RET_PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | RET_PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:777:43: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_return_type') [-Wenum-enum-conversion] 777 | RET_PTR_TO_BTF_ID_TRUSTED = PTR_TRUSTED | RET_PTR_TO_BTF_ID, | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ include/linux/bpf.h:888:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 888 | PTR_TO_MAP_VALUE_OR_NULL = PTR_MAYBE_NULL | PTR_TO_MAP_VALUE, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ include/linux/bpf.h:889:42: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 889 | PTR_TO_SOCKET_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCKET, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ include/linux/bpf.h:890:46: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 890 | PTR_TO_SOCK_COMMON_OR_NULL = PTR_MAYBE_NULL | PTR_TO_SOCK_COMMON, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ include/linux/bpf.h:891:44: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 891 | PTR_TO_TCP_SOCK_OR_NULL = PTR_MAYBE_NULL | PTR_TO_TCP_SOCK, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ include/linux/bpf.h:892:42: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion] 892 | PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | PTR_TO_BTF_ID, | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ >> kernel/trace/ring_buffer.c:3224:24: error: incompatible pointer to integer conversion assigning to 'unsigned long' from 'struct buffer_data_page *' [-Wint-conversion] 3224 | meta->commit_buffer = cpu_buffer->commit_page->page; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 warnings and 1 error generated. vim +3224 kernel/trace/ring_buffer.c 3192 3193 static __always_inline void 3194 rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer) 3195 { 3196 unsigned long max_count; 3197 3198 /* 3199 * We only race with interrupts and NMIs on this CPU. 3200 * If we own the commit event, then we can commit 3201 * all others that interrupted us, since the interruptions 3202 * are in stack format (they finish before they come 3203 * back to us). This allows us to do a simple loop to 3204 * assign the commit to the tail. 3205 */ 3206 again: 3207 max_count = cpu_buffer->nr_pages * 100; 3208 3209 while (cpu_buffer->commit_page != READ_ONCE(cpu_buffer->tail_page)) { 3210 if (RB_WARN_ON(cpu_buffer, !(--max_count))) 3211 return; 3212 if (RB_WARN_ON(cpu_buffer, 3213 rb_is_reader_page(cpu_buffer->tail_page))) 3214 return; 3215 /* 3216 * No need for a memory barrier here, as the update 3217 * of the tail_page did it for this page. 3218 */ 3219 local_set(&cpu_buffer->commit_page->page->commit, 3220 rb_page_write(cpu_buffer->commit_page)); 3221 rb_inc_page(&cpu_buffer->commit_page); 3222 if (cpu_buffer->ring_meta) { 3223 struct ring_buffer_meta *meta = cpu_buffer->ring_meta; > 3224 meta->commit_buffer = cpu_buffer->commit_page->page; 3225 } 3226 /* add barrier to keep gcc from optimizing too much */ 3227 barrier(); 3228 } 3229 while (rb_commit_index(cpu_buffer) != 3230 rb_page_write(cpu_buffer->commit_page)) { 3231 3232 /* Make sure the readers see the content of what is committed. */ 3233 smp_wmb(); 3234 local_set(&cpu_buffer->commit_page->page->commit, 3235 rb_page_write(cpu_buffer->commit_page)); 3236 RB_WARN_ON(cpu_buffer, 3237 local_read(&cpu_buffer->commit_page->page->commit) & 3238 ~RB_WRITE_MASK); 3239 barrier(); 3240 } 3241 3242 /* again, keep gcc from optimizing */ 3243 barrier(); 3244 3245 /* 3246 * If an interrupt came in just after the first while loop 3247 * and pushed the tail page forward, we will be left with 3248 * a dangling commit that will never go forward. 3249 */ 3250 if (unlikely(cpu_buffer->commit_page != READ_ONCE(cpu_buffer->tail_page))) 3251 goto again; 3252 } 3253 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki