* Re: [PATCH V5 5/5] crypto: ccp - Add SEV_INIT_EX support
[not found] <20211203144642.3460447-6-pgonda@google.com>
@ 2021-12-03 21:25 ` kernel test robot
2021-12-04 3:13 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-03 21:25 UTC (permalink / raw)
To: Peter Gonda, thomas.lendacky
Cc: llvm, kbuild-all, David Rientjes, Peter Gonda, Marc Orr,
Brijesh Singh, Joerg Roedel, Herbert Xu, John Allen,
Paolo Bonzini, linux-crypto
Hi Peter,
I love your patch! Perhaps something to improve:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master kvm/queue linus/master v5.16-rc3 next-20211203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Peter-Gonda/Add-SEV_INIT_EX-support/20211203-224846
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: x86_64-randconfig-c007-20211203 (https://download.01.org/0day-ci/archive/20211204/202112040513.JRZWd1LU-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d30fcadf07ee552f20156ea90be2fdb54cb9cb08)
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://github.com/0day-ci/linux/commit/32a279c228e30c47be88442fe20f890203854d9c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peter-Gonda/Add-SEV_INIT_EX-support/20211203-224846
git checkout 32a279c228e30c47be88442fe20f890203854d9c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/crypto/ccp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/crypto/ccp/sev-dev.c:179:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:179:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:215:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:215:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
>> drivers/crypto/ccp/sev-dev.c:224:4: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
PTR_ERR(fp));
^~~~~~~~~~~
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/crypto/ccp/sev-dev.c:244:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:244:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:1250:15: warning: unused variable 'tmr_page' [-Wunused-variable]
struct page *tmr_page;
^
2 warnings and 6 errors generated.
vim +224 drivers/crypto/ccp/sev-dev.c
207
208 static void sev_write_init_ex_file(void)
209 {
210 struct sev_device *sev = psp_master->sev_data;
211 struct file *fp;
212 loff_t offset = 0;
213 ssize_t nwrite;
214
215 lockdep_assert_held(sev_cmd_mutex);
216
217 if (!sev_init_ex_buffer)
218 return;
219
220 fp = filp_open(init_ex_path, O_CREAT | O_WRONLY, 0600);
221 if (IS_ERR(fp)) {
222 dev_err(sev->dev,
223 "SEV: could not open file for write, error %d\n",
> 224 PTR_ERR(fp));
225 return;
226 }
227
228 nwrite = kernel_write(fp, sev_init_ex_buffer, NV_LENGTH, &offset);
229 vfs_fsync(fp, 0);
230 filp_close(fp, NULL);
231
232 if (nwrite != NV_LENGTH) {
233 dev_err(sev->dev,
234 "SEV: failed to write %u bytes to non volatile memory area, ret %ld\n",
235 NV_LENGTH, nwrite);
236 return;
237 }
238
239 dev_dbg(sev->dev, "SEV: write successful to NV file\n");
240 }
241
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V5 5/5] crypto: ccp - Add SEV_INIT_EX support
[not found] <20211203144642.3460447-6-pgonda@google.com>
2021-12-03 21:25 ` [PATCH V5 5/5] crypto: ccp - Add SEV_INIT_EX support kernel test robot
@ 2021-12-04 3:13 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-04 3:13 UTC (permalink / raw)
To: Peter Gonda, thomas.lendacky
Cc: llvm, kbuild-all, David Rientjes, Peter Gonda, Marc Orr,
Brijesh Singh, Joerg Roedel, Herbert Xu, John Allen,
Paolo Bonzini, linux-crypto
Hi Peter,
I love your patch! Yet something to improve:
[auto build test ERROR on herbert-cryptodev-2.6/master]
[also build test ERROR on herbert-crypto-2.6/master kvm/queue linus/master v5.16-rc3 next-20211203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Peter-Gonda/Add-SEV_INIT_EX-support/20211203-224846
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: x86_64-randconfig-c007-20211203 (https://download.01.org/0day-ci/archive/20211204/202112041112.wJCjLloK-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d30fcadf07ee552f20156ea90be2fdb54cb9cb08)
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://github.com/0day-ci/linux/commit/32a279c228e30c47be88442fe20f890203854d9c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peter-Gonda/Add-SEV_INIT_EX-support/20211203-224846
git checkout 32a279c228e30c47be88442fe20f890203854d9c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
>> drivers/crypto/ccp/sev-dev.c:179:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
>> drivers/crypto/ccp/sev-dev.c:179:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:215:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:215:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:224:4: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
PTR_ERR(fp));
^~~~~~~~~~~
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/crypto/ccp/sev-dev.c:244:2: error: member reference type 'struct mutex' is not a pointer; did you mean to use '.'?
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:52: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:244:2: error: cannot take the address of an rvalue of type 'struct lockdep_map'
lockdep_assert_held(sev_cmd_mutex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:316:17: note: expanded from macro 'lockdep_assert_held'
lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:286:45: note: expanded from macro 'lockdep_is_held'
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
include/linux/lockdep.h:310:32: note: expanded from macro 'lockdep_assert'
do { WARN_ON(debug_locks && !(cond)); } while (0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
drivers/crypto/ccp/sev-dev.c:1250:15: warning: unused variable 'tmr_page' [-Wunused-variable]
struct page *tmr_page;
^
2 warnings and 6 errors generated.
vim +179 drivers/crypto/ccp/sev-dev.c
172
173 static int sev_read_init_ex_file(void)
174 {
175 struct sev_device *sev = psp_master->sev_data;
176 struct file *fp;
177 ssize_t nread;
178
> 179 lockdep_assert_held(sev_cmd_mutex);
180
181 if (!sev_init_ex_buffer)
182 return -EOPNOTSUPP;
183
184 fp = filp_open(init_ex_path, O_RDONLY, 0);
185 if (IS_ERR(fp)) {
186 int ret = PTR_ERR(fp);
187
188 dev_err(sev->dev,
189 "SEV: could not open %s for read, error %d\n",
190 init_ex_path, ret);
191 return ret;
192 }
193
194 nread = kernel_read(fp, sev_init_ex_buffer, NV_LENGTH, NULL);
195 if (nread != NV_LENGTH) {
196 dev_err(sev->dev,
197 "SEV: failed to read %u bytes to non volatile memory area, ret %ld\n",
198 NV_LENGTH, nread);
199 return -EIO;
200 }
201
202 dev_dbg(sev->dev, "SEV: read %ld bytes from NV file\n", nread);
203 filp_close(fp, NULL);
204
205 return 0;
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-04 3:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211203144642.3460447-6-pgonda@google.com>
2021-12-03 21:25 ` [PATCH V5 5/5] crypto: ccp - Add SEV_INIT_EX support kernel test robot
2021-12-04 3:13 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox