tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 
main
head:   5bed8d585aa1db1651745173a66e32df82a5cb05
commit: fa17a6d8a5bd0cd7565b613cb804242cd0f6b7ab [4/22] ipv6: lockless 
IPV6_ADDR_PREFERENCES implementation
config: nios2-randconfig-002-20230920 
(https://download.01.org/0day-ci/archive/20230920/202309200607.ec7wvsd1-...@intel.com/config)
compiler: nios2-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20230920/202309200607.ec7wvsd1-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202309200607.ec7wvsd1-...@intel.com/

All warnings (new ones prefixed by >>):

   In file included from ./arch/nios2/include/generated/asm/rwonce.h:1,
                    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_tls_finish_connecting' at 
net/sunrpc/xprtsock.c:2478:4,
       inlined from 'xs_tcp_tls_setup_socket' at net/sunrpc/xprtsock.c:2681: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_tls_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,
       inlined from 'xs_tcp_tls_setup_socket' at net/sunrpc/xprtsock.c:2681: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_tls_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: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


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 <w...@kernel.org>
:::::: CC: Will Deacon <w...@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to