linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [mingo-tip:sched/headers 2360/2579] include/linux/signal.h:97:11: error: array index 3 is past the end of the array (which contains 2 elements)
Date: Thu, 21 Apr 2022 14:41:51 +0800	[thread overview]
Message-ID: <202204210229.ZtiUn30E-lkp@intel.com> (raw)

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   49e1ec6c70a6eb4b7de9250a455b8b63eb42afbe
commit: e43870d97c8fb5c656b4592457df87ac2ee05f7a [2360/2579] headers/deps: mm: Optimize <linux/mm_api.h> dependencies, remove <linux/mmzone_api.h> dependency
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220421/202204210229.ZtiUn30E-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=e43870d97c8fb5c656b4592457df87ac2ee05f7a
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout e43870d97c8fb5c656b4592457df87ac2ee05f7a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/x86/kvm/vmx/nested.c:9:
   In file included from include/linux/pgtable_api.h:15:
   In file included from include/linux/mmzone_api.h:33:
   In file included from arch/x86/include/asm/highmem.h:26:
   In file included from arch/x86/include/asm/tlbflush.h:5:
   In file included from include/linux/mm_api.h:393:
   include/linux/huge_mm.h:207:10: error: implicit declaration of function 'pmd_none' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return !pmd_none(pmd) && !pmd_present(pmd);
                   ^
   include/linux/huge_mm.h:207:28: error: implicit declaration of function 'pmd_present' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return !pmd_none(pmd) && !pmd_present(pmd);
                                     ^
   include/linux/huge_mm.h:214:27: error: implicit declaration of function 'pmd_trans_huge' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (is_swap_pmd(*pmd) || pmd_trans_huge(*pmd) || pmd_devmap(*pmd))
                                    ^
   include/linux/huge_mm.h:214:51: error: implicit declaration of function 'pmd_devmap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (is_swap_pmd(*pmd) || pmd_trans_huge(*pmd) || pmd_devmap(*pmd))
                                                            ^
   include/linux/huge_mm.h:222:6: error: implicit declaration of function 'pud_trans_huge' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (pud_trans_huge(*pud) || pud_devmap(*pud))
               ^
   include/linux/huge_mm.h:222:30: error: implicit declaration of function 'pud_devmap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (pud_trans_huge(*pud) || pud_devmap(*pud))
                                       ^
   include/linux/huge_mm.h:254:37: error: implicit declaration of function 'pmd_pfn' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd) && pmd_present(pmd);
                                              ^
   include/linux/huge_mm.h:254:53: error: implicit declaration of function 'pmd_present' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd) && pmd_present(pmd);
                                                              ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   In file included from include/linux/pgtable_api.h:19:
   arch/x86/include/asm/pgtable.h:209:29: error: static declaration of 'pmd_pfn' follows non-static declaration
   static inline unsigned long pmd_pfn(pmd_t pmd)
                               ^
   include/linux/huge_mm.h:254:37: note: previous implicit declaration is here
           return READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd) && pmd_present(pmd);
                                              ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   In file included from include/linux/pgtable_api.h:19:
   arch/x86/include/asm/pgtable.h:250:19: error: static declaration of 'pmd_trans_huge' follows non-static declaration
   static inline int pmd_trans_huge(pmd_t pmd)
                     ^
   include/linux/huge_mm.h:214:27: note: previous implicit declaration is here
           if (is_swap_pmd(*pmd) || pmd_trans_huge(*pmd) || pmd_devmap(*pmd))
                                    ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   In file included from include/linux/pgtable_api.h:19:
   arch/x86/include/asm/pgtable.h:744:19: error: static declaration of 'pmd_present' follows non-static declaration
   static inline int pmd_present(pmd_t pmd)
                     ^
   include/linux/huge_mm.h:207:28: note: previous implicit declaration is here
           return !pmd_none(pmd) && !pmd_present(pmd);
                                     ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   In file included from include/linux/pgtable_api.h:19:
   arch/x86/include/asm/pgtable.h:773:19: error: static declaration of 'pmd_none' follows non-static declaration
   static inline int pmd_none(pmd_t pmd)
                     ^
   include/linux/huge_mm.h:207:10: note: previous implicit declaration is here
           return !pmd_none(pmd) && !pmd_present(pmd);
                   ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   include/linux/pgtable_api.h:1201:19: error: static declaration of 'pmd_devmap' follows non-static declaration
   static inline int pmd_devmap(pmd_t pmd)
                     ^
   include/linux/huge_mm.h:214:51: note: previous implicit declaration is here
           if (is_swap_pmd(*pmd) || pmd_trans_huge(*pmd) || pmd_devmap(*pmd))
                                                            ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   include/linux/pgtable_api.h:1205:19: error: static declaration of 'pud_devmap' follows non-static declaration
   static inline int pud_devmap(pud_t pud)
                     ^
   include/linux/huge_mm.h:222:30: note: previous implicit declaration is here
           if (pud_trans_huge(*pud) || pud_devmap(*pud))
                                       ^
   In file included from arch/x86/kvm/vmx/nested.c:9:
   include/linux/pgtable_api.h:1218:19: error: static declaration of 'pud_trans_huge' follows non-static declaration
   static inline int pud_trans_huge(pud_t pud)
                     ^
   include/linux/huge_mm.h:222:6: note: previous implicit declaration is here
           if (pud_trans_huge(*pud) || pud_devmap(*pud))
               ^
   In file included from arch/x86/kvm/vmx/nested.c:25:
   In file included from arch/x86/kvm/cpuid.h:5:
   In file included from arch/x86/kvm/x86.h:5:
   In file included from include/linux/kvm_host.h:17:
>> include/linux/signal.h:97:11: error: array index 3 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds]
                   return (set->sig[3] | set->sig[2] |
                           ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from arch/x86/kvm/vmx/nested.c:25:
   In file included from arch/x86/kvm/cpuid.h:5:
   In file included from arch/x86/kvm/x86.h:5:
   In file included from include/linux/kvm_host.h:17:
   include/linux/signal.h:97:25: error: array index 2 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds]
                   return (set->sig[3] | set->sig[2] |
                                         ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from arch/x86/kvm/vmx/nested.c:25:
   In file included from arch/x86/kvm/cpuid.h:5:
   In file included from arch/x86/kvm/x86.h:5:
   In file included from include/linux/kvm_host.h:17:
   include/linux/signal.h:113:11: error: array index 3 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds]
                   return  (set1->sig[3] == set2->sig[3]) &&
                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   In file included from arch/x86/kvm/vmx/nested.c:25:
   In file included from arch/x86/kvm/cpuid.h:5:
   In file included from arch/x86/kvm/x86.h:5:
   In file included from include/linux/kvm_host.h:17:
   include/linux/signal.h:113:27: error: array index 3 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds]
                   return  (set1->sig[3] == set2->sig[3]) &&
                                            ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
           unsigned long sig[_NSIG_WORDS];
           ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.


vim +97 include/linux/signal.h

^1da177e4c3f41 Linus Torvalds  2005-04-16   92  
71fabd5e483530 George Anzinger 2006-01-08   93  static inline int sigisemptyset(sigset_t *set)
71fabd5e483530 George Anzinger 2006-01-08   94  {
71fabd5e483530 George Anzinger 2006-01-08   95  	switch (_NSIG_WORDS) {
71fabd5e483530 George Anzinger 2006-01-08   96  	case 4:
71fabd5e483530 George Anzinger 2006-01-08  @97  		return (set->sig[3] | set->sig[2] |
71fabd5e483530 George Anzinger 2006-01-08   98  			set->sig[1] | set->sig[0]) == 0;
71fabd5e483530 George Anzinger 2006-01-08   99  	case 2:
71fabd5e483530 George Anzinger 2006-01-08  100  		return (set->sig[1] | set->sig[0]) == 0;
71fabd5e483530 George Anzinger 2006-01-08  101  	case 1:
71fabd5e483530 George Anzinger 2006-01-08  102  		return set->sig[0] == 0;
71fabd5e483530 George Anzinger 2006-01-08  103  	default:
1c3bea0e71892e Oleg Nesterov   2014-10-13  104  		BUILD_BUG();
71fabd5e483530 George Anzinger 2006-01-08  105  		return 0;
71fabd5e483530 George Anzinger 2006-01-08  106  	}
71fabd5e483530 George Anzinger 2006-01-08  107  }
71fabd5e483530 George Anzinger 2006-01-08  108  

:::::: The code at line 97 was first introduced by commit
:::::: 71fabd5e4835309b4feca6209122ce56c595c461 [PATCH] sigaction should clear all signals on SIG_IGN, not just < 32

:::::: TO: George Anzinger <george@mvista.com>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-21  6:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202204210229.ZtiUn30E-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).