mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* include/linux/tpm.h:290:2: warning: field  within 'struct tpm_header' is less aligned than 'union tpm_header::(anonymous at include/linux/tpm.h:290:2)' and is usually due to 'struct tpm_header' being packed, which can lead to unaligned accesses
@ 2024-01-07 16:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-07 16:08 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: llvm, oe-kbuild-all, linux-kernel, Jarkko Sakkinen, Sumit Garg,
	Pankaj Gupta

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   52b1853b080a082ec3749c3a9577f6c71b1d4a90
commit: be07858fbf8115fc74528292c2ee8775fe49116f KEYS: trusted: allow use of TEE as backend without TCG_TPM support
date:   1 year, 8 months ago
config: arm-randconfig-001-20240107 (https://download.01.org/0day-ci/archive/20240107/202401072350.jkkVKE5l-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 7e186d366d6c7def0543acc255931f617e76dff0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240107/202401072350.jkkVKE5l-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401072350.jkkVKE5l-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from security/keys/trusted-keys/trusted_core.c:10:
   In file included from include/keys/trusted-type.h:12:
>> include/linux/tpm.h:290:2: warning: field  within 'struct tpm_header' is less aligned than 'union tpm_header::(anonymous at include/linux/tpm.h:290:2)' and is usually due to 'struct tpm_header' being packed, which can lead to unaligned accesses [-Wunaligned-access]
     290 |         union {
         |         ^
   1 warning generated.


vim +290 include/linux/tpm.h

74edff2d74c64c Sumit Garg 2019-10-16  286  
74edff2d74c64c Sumit Garg 2019-10-16  287  struct tpm_header {
74edff2d74c64c Sumit Garg 2019-10-16  288  	__be16 tag;
74edff2d74c64c Sumit Garg 2019-10-16  289  	__be32 length;
74edff2d74c64c Sumit Garg 2019-10-16 @290  	union {
74edff2d74c64c Sumit Garg 2019-10-16  291  		__be32 ordinal;
74edff2d74c64c Sumit Garg 2019-10-16  292  		__be32 return_code;
74edff2d74c64c Sumit Garg 2019-10-16  293  	};
74edff2d74c64c Sumit Garg 2019-10-16  294  } __packed;
74edff2d74c64c Sumit Garg 2019-10-16  295  

:::::: The code at line 290 was first introduced by commit
:::::: 74edff2d74c64ca5977a57efb5c238c8f5318ba9 tpm: Move tpm_buf code to include/linux/

:::::: TO: Sumit Garg <sumit.garg@linaro.org>
:::::: CC: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-07 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 16:08 include/linux/tpm.h:290:2: warning: field within 'struct tpm_header' is less aligned than 'union tpm_header::(anonymous at include/linux/tpm.h:290:2)' and is usually due to 'struct tpm_header' being packed, which can lead to unaligned accesses 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

all inboxes | Powered by JetHome®