lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Jun 2021 20:08:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     Marc Zyngier <maz@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>
Subject: arch/arm64/include/asm/cpufeature.h:273:2: warning: initialized
 field overwritten

Hi Marc,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   007b350a58754a93ca9fe50c498cc27780171153
commit: ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late
date:   10 months ago
config: arm64-buildonly-randconfig-r002-20210630 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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/torvalds/linux.git/commit/?id=ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

   arch/arm64/kernel/cpu_errata.c:295:13: warning: no previous prototype for 'arm64_update_smccc_conduit' [-Wmissing-prototypes]
     295 | void __init arm64_update_smccc_conduit(struct alt_instr *alt,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:317:13: warning: no previous prototype for 'arm64_enable_wa2_handling' [-Wmissing-prototypes]
     317 | void __init arm64_enable_wa2_handling(struct alt_instr *alt,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: warning: initialized field overwritten [-Woverride-init]
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:506:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     506 |  ERRATA_MIDR_RANGE(m, var, r_min, var, r_max)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:747:3: note: in expansion of macro 'ERRATA_MIDR_REV_RANGE'
     747 |   ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
         |   ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: note: (near initialization for 'erratum_843419_list[0].matches')
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:506:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     506 |  ERRATA_MIDR_RANGE(m, var, r_min, var, r_max)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:747:3: note: in expansion of macro 'ERRATA_MIDR_REV_RANGE'
     747 |   ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
         |   ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: warning: initialized field overwritten [-Woverride-init]
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:510:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     510 |  ERRATA_MIDR_RANGE(model, var, rev, var, rev)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:753:3: note: in expansion of macro 'ERRATA_MIDR_REV'
     753 |   ERRATA_MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
         |   ^~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: note: (near initialization for 'erratum_843419_list[1].matches')
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:510:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     510 |  ERRATA_MIDR_RANGE(model, var, rev, var, rev)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:753:3: note: in expansion of macro 'ERRATA_MIDR_REV'
     753 |   ERRATA_MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
         |   ^~~~~~~~~~~~~~~
   In file included from arch/arm64/include/asm/ptrace.h:11,
                    from arch/arm64/include/asm/irqflags.h:10,
                    from include/linux/irqflags.h:16,
                    from include/linux/rcupdate.h:26,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/arm64/kernel/cpu_errata.c:10:
>> arch/arm64/include/asm/cpufeature.h:273:2: warning: initialized field overwritten [-Woverride-init]
     273 |  (ARM64_CPUCAP_SCOPE_LOCAL_CPU  | \
         |  ^
   arch/arm64/kernel/cpu_errata.c:918:11: note: in expansion of macro 'ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE'
     918 |   .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/include/asm/cpufeature.h:273:2: note: (near initialization for 'arm64_errata[9].type')
     273 |  (ARM64_CPUCAP_SCOPE_LOCAL_CPU  | \
         |  ^
   arch/arm64/kernel/cpu_errata.c:918:11: note: in expansion of macro 'ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE'
     918 |   .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:942:14: warning: initialized field overwritten [-Woverride-init]
     942 |   .matches = needs_tx2_tvm_workaround,
         |              ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:942:14: note: (near initialization for 'arm64_errata[11].matches')


vim +273 arch/arm64/include/asm/cpufeature.h

5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  249  
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  250  /*
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  251   * CPU errata workarounds that need to be enabled at boot time if one or
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  252   * more CPUs in the system requires it. When one of these capabilities
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  253   * has been enabled, it is safe to allow any CPU to boot that doesn't
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  254   * require the workaround. However, it is not safe if a "late" CPU
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  255   * requires a workaround and the system hasn't enabled it already.
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  256   */
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  257  #define ARM64_CPUCAP_LOCAL_CPU_ERRATUM		\
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  258  	(ARM64_CPUCAP_SCOPE_LOCAL_CPU | ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU)
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  259  /*
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  260   * CPU feature detected at boot time based on system-wide value of a
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  261   * feature. It is safe for a late CPU to have this feature even though
ca7f686ac9fe87 Will Deacon      2018-06-15  262   * the system hasn't enabled it, although the feature will not be used
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  263   * by Linux in this case. If the system has enabled this feature already,
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  264   * then every late CPU must have it.
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  265   */
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  266  #define ARM64_CPUCAP_SYSTEM_FEATURE	\
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  267  	(ARM64_CPUCAP_SCOPE_SYSTEM | ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU)
5c137714dd8cae Suzuki K Poulose 2018-03-26  268  /*
5c137714dd8cae Suzuki K Poulose 2018-03-26  269   * CPU feature detected at boot time based on feature of one or more CPUs.
5c137714dd8cae Suzuki K Poulose 2018-03-26  270   * All possible conflicts for a late CPU are ignored.
5c137714dd8cae Suzuki K Poulose 2018-03-26  271   */
5c137714dd8cae Suzuki K Poulose 2018-03-26  272  #define ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE		\
5c137714dd8cae Suzuki K Poulose 2018-03-26 @273  	(ARM64_CPUCAP_SCOPE_LOCAL_CPU		|	\
5c137714dd8cae Suzuki K Poulose 2018-03-26  274  	 ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU	|	\
5c137714dd8cae Suzuki K Poulose 2018-03-26  275  	 ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU)
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  276  

:::::: The code at line 273 was first introduced by commit
:::::: 5c137714dd8cae464dbd5f028c07af149e6d09fc arm64: capabilities: Introduce weak features based on local CPU

:::::: TO: Suzuki K Poulose <suzuki.poulose@....com>
:::::: CC: Will Deacon <will.deacon@....com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (29645 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ