From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dhowells-fs:crypto-krb5 33/33] fs/afs/cm_security.c:170:2: warning: variable 'toksize' is uninitialized when used here
Date: Sat, 1 Feb 2025 02:10:46 +0800 [thread overview]
Message-ID: <202502010215.qB2jXApL-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git crypto-krb5
head: 3108d67c535aa3ea00a95b1daf8efdc15bb074b4
commit: 3108d67c535aa3ea00a95b1daf8efdc15bb074b4 [33/33] afs: Use rxgk RESPONSE to pass token for callback channel
config: x86_64-buildonly-randconfig-005-20250131 (https://download.01.org/0day-ci/archive/20250201/202502010215.qB2jXApL-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/202502010215.qB2jXApL-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/202502010215.qB2jXApL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/afs/cm_security.c:170:2: warning: variable 'toksize' is uninitialized when used here [-Wuninitialized]
170 | toksize += keysize + 8 + 4 + 4 + 8 + xdr_len_object(authsize);
| ^~~~~~~
fs/afs/cm_security.c:131:45: note: initialize the variable 'toksize' to silence this warning
131 | size_t keysize, uuidsize, authsize, toksize, encsize, contsize, adatasize, offset;
| ^
| = 0
1 warning generated.
vim +/toksize +170 fs/afs/cm_security.c
119
120 /*
121 * Create an RxGK GSS token to use as a ticket to the specified fileserver.
122 */
123 int afs_create_cm_token(struct afs_server *server)
124 {
125 const struct krb5_enctype *krb5;
126 const struct krb5_buffer *server_key;
127 struct crypto_aead *aead;
128 struct scatterlist sg;
129 struct afs_net *net = server->cell->net;
130 const struct key *key = net->fs_cm_token_key;
131 size_t keysize, uuidsize, authsize, toksize, encsize, contsize, adatasize, offset;
132 __be32 *xdr;
133 void *token, *K0, *encxdr;
134 int ret;
135
136 if (!key)
137 return -ENOKEY;
138
139 krb5 = crypto_krb5_find_enctype(KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96);
140 if (!krb5)
141 return -ENOPKG;
142 server_key = (const void *)&key->payload.data[2];
143
144 /* struct rxgk_key {
145 * afs_uint32 enctype;
146 * opaque key<>;
147 * };
148 */
149 keysize = 4 + xdr_len_object(krb5->key_len);
150
151 /* struct RXGK_AuthName {
152 * afs_int32 kind;
153 * opaque data<AUTHDATAMAX>;
154 * opaque display<AUTHPRINTABLEMAX>;
155 * };
156 */
157 uuidsize = sizeof(server->uuid);
158 authsize = 4 + xdr_len_object(uuidsize) + xdr_len_object(0);
159
160 /* struct RXGK_Token {
161 * rxgk_key K0;
162 * RXGK_Level level;
163 * rxgkTime starttime;
164 * afs_int32 lifetime;
165 * afs_int32 bytelife;
166 * rxgkTime expirationtime;
167 * struct RXGK_AuthName identities<>;
168 * };
169 */
> 170 toksize += keysize + 8 + 4 + 4 + 8 + xdr_len_object(authsize);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-31 18:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502010215.qB2jXApL-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox