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: <202401072350.jkkVKE5l-lkp@intel.com>
Date: Mon, 8 Jan 2024 00:08:26 +0800
From: kernel test robot <lkp@...el.com>
To: Ahmad Fatoum <a.fatoum@...gutronix.de>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org, Jarkko Sakkinen <jarkko@...nel.org>,
	Sumit Garg <sumit.garg@...aro.org>,
	Pankaj Gupta <pankaj.gupta@....com>
Subject: 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

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@...el.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@...aro.org>
:::::: CC: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ