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>] [day] [month] [year] [list]
Message-ID: <202103111645.ROUrqFfr-lkp@intel.com>
Date:   Thu, 11 Mar 2021 16:15:52 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sudeep Holla <sudeep.holla@....com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved
 register 'R7'

Hi Sudeep,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: 66d90f6ecee755e9c19a119c9255e80091165498 firmware: arm_scmi: Enable building as a single module
date:   6 months ago
config: arm-randconfig-r005-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=66d90f6ecee755e9c19a119c9255e80091165498
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 66d90f6ecee755e9c19a119c9255e80091165498
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

>> drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
           arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
           ^
   include/linux/arm-smccc.h:396:4: note: expanded from macro 'arm_smccc_1_1_invoke'
                           arm_smccc_1_1_smc(__VA_ARGS__);                 \
                           ^
   include/linux/arm-smccc.h:343:48: note: expanded from macro 'arm_smccc_1_1_smc'
   #define arm_smccc_1_1_smc(...)  __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
                                                   ^
   include/linux/arm-smccc.h:220:24: note: expanded from macro 'SMCCC_SMC_INST'
   #define SMCCC_SMC_INST  __SMC(0)
                           ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm/include/asm/opcodes.h:210:2: note: expanded from macro '__inst_arm_thumb32'
           __inst_thumb32(thumb_opcode)
           ^
   arch/arm/include/asm/opcodes.h:200:27: note: expanded from macro '__inst_thumb32'
   #define __inst_thumb32(x) ___inst_thumb32(                              \
                             ^
   arch/arm/include/asm/opcodes.h:225:2: note: expanded from macro '___inst_thumb32'
           ".short " __stringify(first) ", " __stringify(second) "\n\t"
           ^
>> drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:393:4: note: expanded from macro 'arm_smccc_1_1_invoke'
                           arm_smccc_1_1_hvc(__VA_ARGS__);                 \
                           ^
   include/linux/arm-smccc.h:359:48: note: expanded from macro 'arm_smccc_1_1_hvc'
   #define arm_smccc_1_1_hvc(...)  __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
                                                   ^
   include/linux/arm-smccc.h:221:24: note: expanded from macro 'SMCCC_HVC_INST'
   #define SMCCC_HVC_INST  __HVC(0)
                           ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   arch/arm/include/asm/opcodes.h:210:2: note: expanded from macro '__inst_arm_thumb32'
           __inst_thumb32(thumb_opcode)
           ^
   arch/arm/include/asm/opcodes.h:200:27: note: expanded from macro '__inst_thumb32'
   #define __inst_thumb32(x) ___inst_thumb32(                              \
                             ^
   arch/arm/include/asm/opcodes.h:225:2: note: expanded from macro '___inst_thumb32'
           ".short " __stringify(first) ", " __stringify(second) "\n\t"
           ^
>> drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:399:4: note: expanded from macro 'arm_smccc_1_1_invoke'
                           __fail_smccc_1_1(__VA_ARGS__);                  \
                           ^
   include/linux/arm-smccc.h:369:8: note: expanded from macro '__fail_smccc_1_1'
                   asm ("" __constraints(__count_args(__VA_ARGS__)));      \
                        ^
   3 errors generated.


vim +/R7 +113 drivers/firmware/arm_scmi/smc.c

1dc6558062dadf Peng Fan     2020-03-08  102  
1dc6558062dadf Peng Fan     2020-03-08  103  static int smc_send_message(struct scmi_chan_info *cinfo,
1dc6558062dadf Peng Fan     2020-03-08  104  			    struct scmi_xfer *xfer)
1dc6558062dadf Peng Fan     2020-03-08  105  {
1dc6558062dadf Peng Fan     2020-03-08  106  	struct scmi_smc *scmi_info = cinfo->transport_info;
1dc6558062dadf Peng Fan     2020-03-08  107  	struct arm_smccc_res res;
1dc6558062dadf Peng Fan     2020-03-08  108  
18988265b87615 Sudeep Holla 2020-03-27  109  	mutex_lock(&scmi_info->shmem_lock);
1dc6558062dadf Peng Fan     2020-03-08  110  
1dc6558062dadf Peng Fan     2020-03-08  111  	shmem_tx_prepare(scmi_info->shmem, xfer);
1dc6558062dadf Peng Fan     2020-03-08  112  
1dc6558062dadf Peng Fan     2020-03-08 @113  	arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
1dc6558062dadf Peng Fan     2020-03-08  114  	scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem));
1dc6558062dadf Peng Fan     2020-03-08  115  
18988265b87615 Sudeep Holla 2020-03-27  116  	mutex_unlock(&scmi_info->shmem_lock);
1dc6558062dadf Peng Fan     2020-03-08  117  
f7199cf489027a Sudeep Holla 2020-04-17  118  	/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
f7199cf489027a Sudeep Holla 2020-04-17  119  	if (res.a0)
f7199cf489027a Sudeep Holla 2020-04-17  120  		return -EOPNOTSUPP;
f7199cf489027a Sudeep Holla 2020-04-17  121  	return 0;
1dc6558062dadf Peng Fan     2020-03-08  122  }
1dc6558062dadf Peng Fan     2020-03-08  123  

:::::: The code at line 113 was first introduced by commit
:::::: 1dc6558062dadfabd2fb3bd885fa6e92ec7196f2 firmware: arm_scmi: Add smc/hvc transport

:::::: TO: Peng Fan <peng.fan@....com>
:::::: CC: Sudeep Holla <sudeep.holla@....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" (38509 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ