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 8960FCDB482 for ; Wed, 18 Oct 2023 11:01:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 220BF8D014D; Wed, 18 Oct 2023 07:01:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AAB58D0016; Wed, 18 Oct 2023 07:01:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04A278D014D; Wed, 18 Oct 2023 07:01:14 -0400 (EDT) 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 E24C68D0016 for ; Wed, 18 Oct 2023 07:01:14 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B501F1CC0EA for ; Wed, 18 Oct 2023 11:01:14 +0000 (UTC) X-FDA: 81358290468.07.9C968E0 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by imf10.hostedemail.com (Postfix) with ESMTP id 96A7CC000E for ; Wed, 18 Oct 2023 11:01:12 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Ckm9GJTg; spf=pass (imf10.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 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=1697626872; 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: references:dkim-signature; bh=bSgAqijttrS+LodWQHqJFZWA2j6wytCdBj+AAb3PrDI=; b=TiDpCUBVTuvjdmLtSCdQjD1kBwqly5BYLV1tc9C/3akDmVED791rHwtRuybXrGW6RUMyVV 5fxhup9MLAiMitQP5NqBEGWFZqmfc8uYSAQZL+vshIOM1VLFQ5i3MTSKa5+4tjicH9h/MK LpTx1DTTtvGsKcYeuvplgPn7jlqYgv8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697626872; a=rsa-sha256; cv=none; b=X2K1+ZYlMKwGbwwwhUsy7qPjBCQTLOhD7Cxb+7cP3lTXu2TrSUltkPrlnYFREcgTRzvJGr j8clWdBlk24UEsdklAfF276i9d6XDzInqAKdxc2ebeAgKcEBwQRXlzjLjyEFCqkt69M3Bf 0G5nuuL76qHl2S/GC++FpbMazmY2lwI= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Ckm9GJTg; spf=pass (imf10.hostedemail.com: domain of lkp@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697626872; x=1729162872; h=date:from:to:cc:subject:message-id:mime-version; bh=b7hfNspF9ey+2tGUTcWz1QyeYYFPkrt3Dt1lwu5N8Ig=; b=Ckm9GJTg6kLvvwFfIieh+uwUcrZAL1NUp5yWhVbGLheUBz8frWPRzZIe ovx0338uHBTHHFCiYwsKMCXDA1q0fFKu8M01zNdc5Luw0243eiUZdpjTe Fa8Z/rtfATiMJMZMoTZkFVb/7sT2fwyN3iJvQg7GQ+TJjtXTvMd25XmVd tIL6/KPmAD/m1Lbkx12URsVaoe6zE0/CondjPMr36ixHYVeDwNp0ht24h ZrRJkzyXwh2keMxMlbidy4J6I/xYXQ6683+V5Xs7IICUg16IW7q+3dgLt bdfaZMyQsxl+Cz2gSwTV6aXhA7ULPAqWuSGiiTya9rdZohQdKLDrhJY5j w==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="452457521" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="452457521" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 04:01:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="847236161" X-IronPort-AV: E=Sophos;i="6.03,234,1694761200"; d="scan'208";a="847236161" Received: from lkp-server01.sh.intel.com (HELO 8917679a5d3e) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 18 Oct 2023 04:00:35 -0700 Received: from kbuild by 8917679a5d3e with local (Exim 4.96) (envelope-from ) id 1qt4Hx-0000Gf-0E; Wed, 18 Oct 2023 11:00:33 +0000 Date: Wed, 18 Oct 2023 18:59:33 +0800 From: kernel test robot To: Eric Dumazet Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Paolo Abeni , David Ahern Subject: [linux-next:master 5136/13299] include/asm-generic/rwonce.h:44:26: warning: array subscript 0 is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} Message-ID: <202310181854.pKtHd7fD-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 96A7CC000E X-Rspam-User: X-Stat-Signature: 9dt7ts55rnbq3mdiex413ar1t13i774i X-Rspamd-Server: rspam03 X-HE-Tag: 1697626872-840796 X-HE-Meta: U2FsdGVkX19m6KcNpyLY2Ocl6QuzGLeuPwkr+VAzJb6mw2H6rudd7jO09QaKetWXwHQiv3KDf+paHYRRo5B59KaEGegTuHUyt3OxNEASQ7vJq7uHkIKV3wo0mPhBeGbvHkBZL6kaECgOQSonBViJSVYZrhDzqiVa+tu/vjrzzTiu5/vAWc/8YbSCwKa1OtRpwBR6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Nx+xhiA1Z7lnkZsUIlhScJfgMI8G7VCt9Ehe1rnt2Ocp9ey9cF/fY02TVhKAnkdnKi 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: Hi Eric, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 2dac75696c6da3c848daa118a729827541c89d33 commit: fa17a6d8a5bd0cd7565b613cb804242cd0f6b7ab [5136/13299] ipv6: lockless IPV6_ADDR_PREFERENCES implementation config: alpha-defconfig (https://download.01.org/0day-ci/archive/20231018/202310181854.pKtHd7fD-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310181854.pKtHd7fD-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/202310181854.pKtHd7fD-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/alpha/include/asm/rwonce.h:33, from include/linux/compiler.h:246, from include/linux/string.h:5, from net/sunrpc/xprtsock.c:23: In function 'ip6_sock_set_addr_preferences', inlined from 'xs_tcp_finish_connecting' at net/sunrpc/xprtsock.c:2325:4, inlined from 'xs_tcp_setup_socket' at net/sunrpc/xprtsock.c:2405:11: >> include/asm-generic/rwonce.h:44:26: warning: array subscript 0 is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^~~ include/net/ipv6.h:1365:9: note: in expansion of macro 'WRITE_ONCE' 1365 | WRITE_ONCE(inet6_sk(sk)->srcprefs, | ^~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/net/ipv6.h:1366:21: note: in expansion of macro 'READ_ONCE' 1366 | (READ_ONCE(inet6_sk(sk)->srcprefs) & prefmask) | pref); | ^~~~~~~~~ In function 'xs_tcp_setup_socket': cc1: note: source object is likely at address zero In function 'ip6_sock_set_addr_preferences', inlined from 'xs_tcp_finish_connecting' at net/sunrpc/xprtsock.c:2325:4, inlined from 'xs_tcp_setup_socket' at net/sunrpc/xprtsock.c:2405:11: include/asm-generic/rwonce.h:55:37: warning: array subscript 0 is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=] 55 | *(volatile typeof(x) *)&(x) = (val); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRITE_ONCE' 61 | __WRITE_ONCE(x, val); \ | ^~~~~~~~~~~~ include/net/ipv6.h:1365:9: note: in expansion of macro 'WRITE_ONCE' 1365 | WRITE_ONCE(inet6_sk(sk)->srcprefs, | ^~~~~~~~~~ In function 'xs_tcp_setup_socket': cc1: note: source object is likely at address zero In function 'ip6_sock_set_addr_preferences', inlined from 'xs_tcp_tls_finish_connecting' at net/sunrpc/xprtsock.c:2478:4: >> include/asm-generic/rwonce.h:44:26: warning: array subscript 0 is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=] 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^~~ include/net/ipv6.h:1365:9: note: in expansion of macro 'WRITE_ONCE' 1365 | WRITE_ONCE(inet6_sk(sk)->srcprefs, | ^~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/net/ipv6.h:1366:21: note: in expansion of macro 'READ_ONCE' 1366 | (READ_ONCE(inet6_sk(sk)->srcprefs) & prefmask) | pref); | ^~~~~~~~~ In function 'xs_tcp_tls_finish_connecting': cc1: note: source object is likely at address zero In function 'ip6_sock_set_addr_preferences', inlined from 'xs_tcp_tls_finish_connecting' at net/sunrpc/xprtsock.c:2478:4: include/asm-generic/rwonce.h:55:37: warning: array subscript 0 is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=] 55 | *(volatile typeof(x) *)&(x) = (val); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRITE_ONCE' 61 | __WRITE_ONCE(x, val); \ | ^~~~~~~~~~~~ include/net/ipv6.h:1365:9: note: in expansion of macro 'WRITE_ONCE' 1365 | WRITE_ONCE(inet6_sk(sk)->srcprefs, | ^~~~~~~~~~ In function 'xs_tcp_tls_finish_connecting': cc1: note: source object is likely at address zero vim +44 include/asm-generic/rwonce.h e506ea451254ab Will Deacon 2019-10-15 28 e506ea451254ab Will Deacon 2019-10-15 29 /* e506ea451254ab Will Deacon 2019-10-15 30 * Yes, this permits 64-bit accesses on 32-bit architectures. These will e506ea451254ab Will Deacon 2019-10-15 31 * actually be atomic in some cases (namely Armv7 + LPAE), but for others we e506ea451254ab Will Deacon 2019-10-15 32 * rely on the access being split into 2x32-bit accesses for a 32-bit quantity e506ea451254ab Will Deacon 2019-10-15 33 * (e.g. a virtual address) and a strong prevailing wind. e506ea451254ab Will Deacon 2019-10-15 34 */ e506ea451254ab Will Deacon 2019-10-15 35 #define compiletime_assert_rwonce_type(t) \ e506ea451254ab Will Deacon 2019-10-15 36 compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ e506ea451254ab Will Deacon 2019-10-15 37 "Unsupported access size for {READ,WRITE}_ONCE().") e506ea451254ab Will Deacon 2019-10-15 38 e506ea451254ab Will Deacon 2019-10-15 39 /* e506ea451254ab Will Deacon 2019-10-15 40 * Use __READ_ONCE() instead of READ_ONCE() if you do not require any 3c9184109e78ea Will Deacon 2019-10-30 41 * atomicity. Note that this may result in tears! e506ea451254ab Will Deacon 2019-10-15 42 */ b78b331a3f5c07 Will Deacon 2019-10-15 43 #ifndef __READ_ONCE e506ea451254ab Will Deacon 2019-10-15 @44 #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) b78b331a3f5c07 Will Deacon 2019-10-15 45 #endif e506ea451254ab Will Deacon 2019-10-15 46 :::::: The code at line 44 was first introduced by commit :::::: e506ea451254ab17e0bf918ca36232fec2a9b10c compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h :::::: TO: Will Deacon :::::: CC: Will Deacon -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki