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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230304041932.847133-2-wei.w.wang@intel.com>
Date:   Sat,  4 Mar 2023 12:19:30 +0800
From:   Wei Wang <wei.w.wang@...el.com>
To:     arnd@...db.de, akpm@...ux-foundation.org, keescook@...omium.org,
        herbert@...dor.apana.org.au, josh@...htriplett.org,
        jani.nikula@...el.com, corbet@....net, jgg@...lanox.com,
        dmatlack@...gle.com, mizhang@...gle.com, pbonzini@...hat.com,
        seanjc@...gle.com
Cc:     linux-kernel@...r.kernel.org, Wei Wang <wei.w.wang@...el.com>,
        James.Bottomley@...senPartnership.com, jarkko@...nel.org
Subject: [PATCH v1 1/3] security: keys: don't use data type as variable name

'bool' is a specific name for the data type that is an alias for
the C99 _Bool type. It shoudn't be used as variable names as that causes
too much confusion either for the reader or the compilier.

CC: James.Bottomley@...senPartnership.com
CC: jarkko@...nel.org
Fixes: f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
Signed-off-by: Wei Wang <wei.w.wang@...el.com>
---
 security/keys/trusted-keys/trusted_tpm2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/security/keys/trusted-keys/trusted_tpm2.c b/security/keys/trusted-keys/trusted_tpm2.c
index 2b2c8eb258d5..390d7314f5a6 100644
--- a/security/keys/trusted-keys/trusted_tpm2.c
+++ b/security/keys/trusted-keys/trusted_tpm2.c
@@ -54,12 +54,13 @@ static int tpm2_key_encode(struct trusted_key_payload *payload,
 			       asn1_oid_len(tpm2key_oid));
 
 	if (options->blobauth_len == 0) {
-		unsigned char bool[3], *w = bool;
+		unsigned char bool_val[3], *w = bool_val;
 		/* tag 0 is emptyAuth */
 		w = asn1_encode_boolean(w, w + sizeof(bool), true);
 		if (WARN(IS_ERR(w), "BUG: Boolean failed to encode"))
 			return PTR_ERR(w);
-		work = asn1_encode_tag(work, end_work, 0, bool, w - bool);
+		work = asn1_encode_tag(work, end_work, 0,
+				       bool_val, w - bool_val);
 	}
 
 	/*
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ