anolis-cloud-kernel/security
Tomas Winkler de82d59059 tpm: use u32 instead of int for PCR index
ANBZ: #6334

commit 95adc6b410 upstream

The TPM specs defines PCR index as a positive number, and there is
no reason to use a signed number. It is also a possible security
issue as currently no functions check for a negative index,
which may become a large number when converted to u32.

Adjust the API to use u32 instead of int in all PCR related
functions.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: XuXin <xu.xinbj@ieisystem.com>
Reviewed-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/2117
2023-09-05 16:55:06 +08:00
..
apparmor .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
integrity tpm: use u32 instead of int for PCR index 2023-09-05 16:55:06 +08:00
keys task_work: cleanup notification modes 2020-11-16 15:43:34 +08:00
loadpin module: replace the existing LSM hook in init_module 2018-07-16 12:31:57 -07:00
selinux selinux: fix race condition when computing ocontext SIDs 2023-06-21 11:36:58 +08:00
smack smack: use GFP_NOFS while holding inode_smack::smk_lock 2019-10-07 18:57:27 +02:00
tomoyo .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
yama task_work: cleanup notification modes 2020-11-16 15:43:34 +08:00
Kconfig Revert "x86/mm/legacy: Populate the user page-table with user pgd's" 2018-09-14 17:08:45 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
commoncap.c cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias() 2018-08-11 02:05:53 -05:00
device_cgroup.c device_cgroup: fix RCU imbalance in error case 2019-04-27 09:36:40 +02:00
inode.c securityfs: fix use-after-free on symlink traversal 2019-05-25 18:23:42 +02:00
lsm_audit.c missing barriers in some of unix_sock ->addr and ->path accesses 2019-03-19 13:12:41 +01:00
min_addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
security.c vfs: syscall: Add move_mount(2) to move mounts around 2022-07-12 05:53:54 +00:00