* [ceph-client:testing 32/75] fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'?
@ 2023-02-26 21:38 kernel test robot
2023-02-27 0:57 ` Xiubo Li
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-02-26 21:38 UTC (permalink / raw)
To: Jeff Layton; +Cc: oe-kbuild-all, ceph-devel, Ilya Dryomov, Xiubo Li
tree: https://github.com/ceph/ceph-client.git testing
head: 69aa49c89640a5018393d2ae30e5a6071e3cf9c8
commit: 44947f44747cf0c16f0999962b4a43b6d8a2c6e8 [32/75] ceph: add helpers for converting names for userland presentation
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230227/202302270537.vINNROs9-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ceph/ceph-client/commit/44947f44747cf0c16f0999962b4a43b6d8a2c6e8
git remote add ceph-client https://github.com/ceph/ceph-client.git
git fetch --no-tags ceph-client testing
git checkout 44947f44747cf0c16f0999962b4a43b6d8a2c6e8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash fs/ceph/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302270537.vINNROs9-lkp@intel.com/
Note: the ceph-client/testing HEAD 69aa49c89640a5018393d2ae30e5a6071e3cf9c8 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
fs/ceph/crypto.c: In function 'ceph_fname_to_usr':
fs/ceph/crypto.c:267:31: error: implicit declaration of function 'FSCRYPT_BASE64URL_CHARS'; did you mean 'CEPH_BASE64_CHARS'? [-Werror=implicit-function-declaration]
267 | if (fname->name_len > FSCRYPT_BASE64URL_CHARS(NAME_MAX))
| ^~~~~~~~~~~~~~~~~~~~~~~
| CEPH_BASE64_CHARS
>> fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'? [-Werror=implicit-function-declaration]
296 | declen = fscrypt_base64url_decode(fname->name, fname->name_len, tname->name);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| ceph_base64_decode
cc1: some warnings being treated as errors
vim +296 fs/ceph/crypto.c
237
238 /**
239 * ceph_fname_to_usr - convert a filename for userland presentation
240 * @fname: ceph_fname to be converted
241 * @tname: temporary name buffer to use for conversion (may be NULL)
242 * @oname: where converted name should be placed
243 * @is_nokey: set to true if key wasn't available during conversion (may be NULL)
244 *
245 * Given a filename (usually from the MDS), format it for presentation to
246 * userland. If @parent is not encrypted, just pass it back as-is.
247 *
248 * Otherwise, base64 decode the string, and then ask fscrypt to format it
249 * for userland presentation.
250 *
251 * Returns 0 on success or negative error code on error.
252 */
253 int ceph_fname_to_usr(const struct ceph_fname *fname, struct fscrypt_str *tname,
254 struct fscrypt_str *oname, bool *is_nokey)
255 {
256 int ret;
257 struct fscrypt_str _tname = FSTR_INIT(NULL, 0);
258 struct fscrypt_str iname;
259
260 if (!IS_ENCRYPTED(fname->dir)) {
261 oname->name = fname->name;
262 oname->len = fname->name_len;
263 return 0;
264 }
265
266 /* Sanity check that the resulting name will fit in the buffer */
267 if (fname->name_len > FSCRYPT_BASE64URL_CHARS(NAME_MAX))
268 return -EIO;
269
270 ret = __fscrypt_prepare_readdir(fname->dir);
271 if (ret)
272 return ret;
273
274 /*
275 * Use the raw dentry name as sent by the MDS instead of
276 * generating a nokey name via fscrypt.
277 */
278 if (!fscrypt_has_encryption_key(fname->dir)) {
279 memcpy(oname->name, fname->name, fname->name_len);
280 oname->len = fname->name_len;
281 if (is_nokey)
282 *is_nokey = true;
283 return 0;
284 }
285
286 if (fname->ctext_len == 0) {
287 int declen;
288
289 if (!tname) {
290 ret = fscrypt_fname_alloc_buffer(NAME_MAX, &_tname);
291 if (ret)
292 return ret;
293 tname = &_tname;
294 }
295
> 296 declen = fscrypt_base64url_decode(fname->name, fname->name_len, tname->name);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ceph-client:testing 32/75] fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'?
2023-02-26 21:38 [ceph-client:testing 32/75] fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'? kernel test robot
@ 2023-02-27 0:57 ` Xiubo Li
0 siblings, 0 replies; 2+ messages in thread
From: Xiubo Li @ 2023-02-27 0:57 UTC (permalink / raw)
To: kernel test robot, Jeff Layton; +Cc: oe-kbuild-all, ceph-devel, Ilya Dryomov
Hi
Thanks very much for pointing this out.
This was introduced by an intermediate commit and I will revise it.
- Xiubo
On 27/02/2023 05:38, kernel test robot wrote:
> tree: https://github.com/ceph/ceph-client.git testing
> head: 69aa49c89640a5018393d2ae30e5a6071e3cf9c8
> commit: 44947f44747cf0c16f0999962b4a43b6d8a2c6e8 [32/75] ceph: add helpers for converting names for userland presentation
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230227/202302270537.vINNROs9-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/ceph/ceph-client/commit/44947f44747cf0c16f0999962b4a43b6d8a2c6e8
> git remote add ceph-client https://github.com/ceph/ceph-client.git
> git fetch --no-tags ceph-client testing
> git checkout 44947f44747cf0c16f0999962b4a43b6d8a2c6e8
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash fs/ceph/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202302270537.vINNROs9-lkp@intel.com/
>
> Note: the ceph-client/testing HEAD 69aa49c89640a5018393d2ae30e5a6071e3cf9c8 builds fine.
> It only hurts bisectability.
>
> All errors (new ones prefixed by >>):
>
> fs/ceph/crypto.c: In function 'ceph_fname_to_usr':
> fs/ceph/crypto.c:267:31: error: implicit declaration of function 'FSCRYPT_BASE64URL_CHARS'; did you mean 'CEPH_BASE64_CHARS'? [-Werror=implicit-function-declaration]
> 267 | if (fname->name_len > FSCRYPT_BASE64URL_CHARS(NAME_MAX))
> | ^~~~~~~~~~~~~~~~~~~~~~~
> | CEPH_BASE64_CHARS
>>> fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'? [-Werror=implicit-function-declaration]
> 296 | declen = fscrypt_base64url_decode(fname->name, fname->name_len, tname->name);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> | ceph_base64_decode
> cc1: some warnings being treated as errors
>
>
> vim +296 fs/ceph/crypto.c
>
> 237
> 238 /**
> 239 * ceph_fname_to_usr - convert a filename for userland presentation
> 240 * @fname: ceph_fname to be converted
> 241 * @tname: temporary name buffer to use for conversion (may be NULL)
> 242 * @oname: where converted name should be placed
> 243 * @is_nokey: set to true if key wasn't available during conversion (may be NULL)
> 244 *
> 245 * Given a filename (usually from the MDS), format it for presentation to
> 246 * userland. If @parent is not encrypted, just pass it back as-is.
> 247 *
> 248 * Otherwise, base64 decode the string, and then ask fscrypt to format it
> 249 * for userland presentation.
> 250 *
> 251 * Returns 0 on success or negative error code on error.
> 252 */
> 253 int ceph_fname_to_usr(const struct ceph_fname *fname, struct fscrypt_str *tname,
> 254 struct fscrypt_str *oname, bool *is_nokey)
> 255 {
> 256 int ret;
> 257 struct fscrypt_str _tname = FSTR_INIT(NULL, 0);
> 258 struct fscrypt_str iname;
> 259
> 260 if (!IS_ENCRYPTED(fname->dir)) {
> 261 oname->name = fname->name;
> 262 oname->len = fname->name_len;
> 263 return 0;
> 264 }
> 265
> 266 /* Sanity check that the resulting name will fit in the buffer */
> 267 if (fname->name_len > FSCRYPT_BASE64URL_CHARS(NAME_MAX))
> 268 return -EIO;
> 269
> 270 ret = __fscrypt_prepare_readdir(fname->dir);
> 271 if (ret)
> 272 return ret;
> 273
> 274 /*
> 275 * Use the raw dentry name as sent by the MDS instead of
> 276 * generating a nokey name via fscrypt.
> 277 */
> 278 if (!fscrypt_has_encryption_key(fname->dir)) {
> 279 memcpy(oname->name, fname->name, fname->name_len);
> 280 oname->len = fname->name_len;
> 281 if (is_nokey)
> 282 *is_nokey = true;
> 283 return 0;
> 284 }
> 285
> 286 if (fname->ctext_len == 0) {
> 287 int declen;
> 288
> 289 if (!tname) {
> 290 ret = fscrypt_fname_alloc_buffer(NAME_MAX, &_tname);
> 291 if (ret)
> 292 return ret;
> 293 tname = &_tname;
> 294 }
> 295
> > 296 declen = fscrypt_base64url_decode(fname->name, fname->name_len, tname->name);
>
--
Best Regards,
Xiubo Li (李秀波)
Email: xiubli@redhat.com/xiubli@ibm.com
Slack: @Xiubo Li
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-27 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-26 21:38 [ceph-client:testing 32/75] fs/ceph/crypto.c:296:26: error: implicit declaration of function 'fscrypt_base64url_decode'; did you mean 'ceph_base64_decode'? kernel test robot
2023-02-27 0:57 ` Xiubo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).