* [dhowells-fs:crypto-krb5 33/33] fs/afs/cm_security.c:170:2: warning: variable 'toksize' is uninitialized when used here
@ 2025-01-31 18:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-31 18:10 UTC (permalink / raw)
To: David Howells; +Cc: llvm, oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-31 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-31 18:10 [dhowells-fs:crypto-krb5 33/33] fs/afs/cm_security.c:170:2: warning: variable 'toksize' is uninitialized when used here kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.