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 E66A6CDB47E for ; Wed, 18 Oct 2023 11:38:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 883BF8D0154; Wed, 18 Oct 2023 07:38:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8315F8D0016; Wed, 18 Oct 2023 07:38:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D51C8D0154; Wed, 18 Oct 2023 07:38:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 59EFC8D0016 for ; Wed, 18 Oct 2023 07:38:18 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 194091A12F6 for ; Wed, 18 Oct 2023 11:38:18 +0000 (UTC) X-FDA: 81358383876.16.6F8FE03 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by imf29.hostedemail.com (Postfix) with ESMTP id 39BC412000B for ; Wed, 18 Oct 2023 11:38:15 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="kliio2/G"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of edumazet@google.com designates 209.85.208.46 as permitted sender) smtp.mailfrom=edumazet@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697629096; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=STTsMbTBgObpgELyLV78+gcE/8OGGsU57S4LliLB9Kw=; b=LDEN9buS/Vs8cGoz0Y7m3D73uqKsPymQuDbixear8oqFxHi8oS+NIR4BMznhKUFj1z4kZ3 rfNK6OZDhH2DG2C87NdCaKakR/w5gbaylLEoAcJCcR+WBhdLCNEL3LPOzQiLV9Ymwg58Mq LdNQ45gjkH9VI9lndWY5e+ttguEcVzU= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="kliio2/G"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of edumazet@google.com designates 209.85.208.46 as permitted sender) smtp.mailfrom=edumazet@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697629096; a=rsa-sha256; cv=none; b=r+/X+ApOlqXzwhi4MA9+p/AQ0Kg4kDRmripIaVsrpa8R2zcSisQSZC8QoRVNgVBt60N8z6 ivBRqDh7CmQz6lJVuX0JGvXC3Q1o8zm4gcBIPe20muMh3yckt9W8UZNu5q2OZ9vH7H1ZkI EAFf6XxdGilYQaVJ20LfppOj1ihCOrU= Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-51e24210395so9501a12.0 for ; Wed, 18 Oct 2023 04:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697629095; x=1698233895; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=STTsMbTBgObpgELyLV78+gcE/8OGGsU57S4LliLB9Kw=; b=kliio2/G67fQAaJDb6SQ7B8iSwueFrE9Ebci534NQdXRsYKjMg3mHWxXDsddngB4RF Zz28dYuNtRW4Rz6TSQILsQwGmJ9X9Iic0l2Tnakm1tKfi2rFG9WncnsCLNcRh7lW3fqB 8bas71gAUEmDKEeMEYNmaPvbsvI1h+HR3EDN5ZftwDabNARNhDyj4HHCLVmGAP14ITGK TVG3YLE5Uypa7dUGau3A8B0ketIstrIFDbpdp6RFY24w7+mQIiFxjGrkDzNyv2Pq4OP+ raJDvUFoD9RbaHVDSTDF7fZk5vgJj32WR0pgGx34rURC1YwNul0mB9Ppinc8v5Oqa2z3 e2Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697629095; x=1698233895; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=STTsMbTBgObpgELyLV78+gcE/8OGGsU57S4LliLB9Kw=; b=gPer2n3lBe+z5condyQi0tC1y4DR+tBI3okt7euSL0sKHiorNWljek/JhN44V5CzKO viHDg36bQoR0YTA7n/+iEhOLVV2bNTptIXSJRoCdO1Zk4bYdc5JkgGIzN3s1V/W3EQ89 1QJtUGPAxoEJkjztyaiEdrgTKGwJJjnuNdUpSUBXABw0ZtQPuE/dcam8SAYrjFCQUZiR YjCMgAd+ffN92gmgdAjGgypGSLYcuNtor+9l97WfFGRhaOM7ddksSfDu34wKMhJEbpC1 O+GtTFxKJT0cRu+w4RN2K9YTivuJudxlAA5eltnV10XtmtXV/qhBWdEvEgH28y+/mtQu a1SQ== X-Gm-Message-State: AOJu0YyJYsg0qtZ9dPT/r+0NuTU1aE/pP58HPhJRmKy2GnvZ/5BD0T/P HaIKWS4FT0LFwpsq++IKoyB1MTKONYjaLPROMnCaXpBs6/+NixPdU64= X-Google-Smtp-Source: AGHT+IHwq4M8H0UkofKAF/TVzR3Jad70qARCpa9At1fuSuTdH+L4pAXvFz8M9hj4k+RlrzYZvH3tJ3K86NKruAecKtE= X-Received: by 2002:a50:ab17:0:b0:53f:2694:c3d4 with SMTP id s23-20020a50ab17000000b0053f2694c3d4mr113577edc.4.1697629094350; Wed, 18 Oct 2023 04:38:14 -0700 (PDT) MIME-Version: 1.0 References: <202310181854.pKtHd7fD-lkp@intel.com> In-Reply-To: <202310181854.pKtHd7fD-lkp@intel.com> From: Eric Dumazet Date: Wed, 18 Oct 2023 13:38:00 +0200 Message-ID: Subject: Re: [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[]'} To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Paolo Abeni , David Ahern Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 39BC412000B X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: pgb8uz4gqhx3zz8zeuiz5w5e1mk81nne X-HE-Tag: 1697629095-949211 X-HE-Meta: U2FsdGVkX180pspgRE3juNfBrNCyJQnk7JYAAXH3VjatLXvonQiS9ZrnJwL1ELykvqBIeh3Lo4nJ6D+VKoFXoGq07gsXgPalP/JVVHhVkvscF6X4YA7CzdWpwdojLuBmztm6rqur2D3gjfsKj628vM3yKlSe5uF+r0hjQbFQnkeAEnGSZr7vFd6bu0YlBiw59KU0fKSDGj0MdLt2Sr5LR8yycRozyLWZ2zTekkDX0qxhS+Uoo+uXfM6KIPyC+WCvULln+JajYXF0UdGfc8B65nLpntVplSibBFLJFI+aMRBiwfqCbqyzQ4vn/teXmweRyH/MrDzrw2CDOti93jPnmJwwe+rPGedP2Ibaec9d22coynJUysINqkrYY6kYFFrdKVSHGyEp3V0CAx/2zfn/wRMA/zVNvG7Zn1T6zp651eBEV5eD3YRejI13knbulEVgcG/0lcVD7rdaN6AJ7Lz+zOOYz5T8Xn45ePsdKGi5kmBV7Lg0/bdtyYtb00XyXy9+BStIYtwJ37gcSSfz/9CzpLdg+QNKnLdZPNRkOVZkMg7l4DqonLjY5rCsAbVo8yTfckjaNvtB3hdeJTikJ/fPHXTjnJ5kbKKTLcuf11/lwQsOtU7LcnXijGZzvuZbUCkWKTFq5jhwspygK1Lnl9P4LrS64IsTRIa6Ql97NGbwU8PCJp3W1FYpFhChlDDGCnn8UR3AcLSsyhlSFkEkrPW2W0V0DaNkWttAKnQQu3rOwSoswsT+XKlPP5LyP0a4Hz3ENL2qTeeUXK8HX9NEU03t8s+SiFhL8HrhfUJYTjSsHz6SpgGE+GwcHdoEjInFm8vLX2pCjqWUm9XEF3C8hWS5BC9UYE7VKA94bZrwfhCDd4cnkaEaZKN9ZYIF8ZcyU5+vKWZDuiJw4YKVeQA+cVFjPKztRyzwlT0F8OzBT749WiolZcdbyknM/Z8RQQ4sjUyUFNJ4KNZ2y1KlMkahxb+ POSa8Om4 Ef59bd7bQmIi22OqQ5QjxWzn9JOreGIjd6NfnsMEQ/f/l6bmvlN24RPfUGN95vg02tjwInSzzk8YyrN5lMz61vjj0VZV1JF027070isSkuj/gHsxaktu9N4GzNWTeQubSNvYW5oLq6U3ivbPe9luoBFVyRI2O7AdOVDRrHxW/rYJ/a6H9wIFtRbAL7SqfaXExay7tVPfFRII2FqyRYM+ylnd3DwoKB//OZam/ZebJbO9vNe7X9xESvi2bhlZYMfpuxLZtcg8N8nOIAWURqIiORpS+ee/BRvMmqGZVdygggjgzHGdP6fXzFaX9FTN6B//w9oYoNx1V513/EtMGo8Ef8V39cCBQhUK8MM57QniA9gyCf6SemOJ7SaR2tYTMCAN4Bjgk7CBo/vA14ISM7svEh1P6b1iKMB140z1sXVPx8Ly4cbqMy2HeQuZ1LA== 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: On Wed, Oct 18, 2023 at 1:01=E2=80=AFPM kernel test robot w= rote: > > Hi Eric, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: 2dac75696c6da3c848daa118a729827541c89d33 > commit: fa17a6d8a5bd0cd7565b613cb804242cd0f6b7ab [5136/13299] ipv6: lockl= ess 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=3D1 build): (https://download.01.org/0day-ci/archi= ve/20231018/202310181854.pKtHd7fD-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new vers= ion 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/ > I have no idea why this compiler is not happy. I would probably contact a compiler maintainer perhaps ? > 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:2= 325:4, > inlined from 'xs_tcp_setup_socket' at net/sunrpc/xprtsock.c:2405:1= 1: > >> include/asm-generic/rwonce.h:44:26: warning: array subscript 0 is outs= ide array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=3D] > 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_type= of(x) *)&(x)) > | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~ > include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WR= ITE_ONCE' > 55 | *(volatile typeof(x) *)&(x) =3D (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) & prefma= sk) | 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:2= 325:4, > inlined from 'xs_tcp_setup_socket' at net/sunrpc/xprtsock.c:2405:1= 1: > include/asm-generic/rwonce.h:55:37: warning: array subscript 0 is outs= ide array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=3D] > 55 | *(volatile typeof(x) *)&(x) =3D (val); = \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRIT= E_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 outs= ide array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=3D] > 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_type= of(x) *)&(x)) > | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~ > include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WR= ITE_ONCE' > 55 | *(volatile typeof(x) *)&(x) =3D (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) & prefma= sk) | 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 outs= ide array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=3D] > 55 | *(volatile typeof(x) *)&(x) =3D (val); = \ > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/asm-generic/rwonce.h:61:9: note: in expansion of macro '__WRIT= E_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 ac= cesses 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 sp= lit into 2x32-bit accesses for a 32-bit quantity > e506ea451254ab Will Deacon 2019-10-15 33 * (e.g. a virtual address) an= d a strong prevailing wind. > e506ea451254ab Will Deacon 2019-10-15 34 */ > e506ea451254ab Will Deacon 2019-10-15 35 #define compiletime_assert_rwo= nce_type(t) \ > e506ea451254ab Will Deacon 2019-10-15 36 compiletime_assert(__nati= ve_word(t) || sizeof(t) =3D=3D sizeof(long long), \ > e506ea451254ab Will Deacon 2019-10-15 37 "Unsupported acce= ss 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 o= f READ_ONCE() if you do not require any > 3c9184109e78ea Will Deacon 2019-10-30 41 * atomicity. Note that this m= ay 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,W= RITE}_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