[tglx-devel:x86/fpu-kvm 69/88] arch/x86/kernel/fpu/xstate.c:1450:10: error: too few arguments to function 'xstate_request_perm'

From: kernel test robot
Date: Mon Oct 25 2021 - 23:21:17 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-kvm
head: dc3cd5721cdb0d3116a2feb84755427d1522477a
commit: cdf2ff477461d9bfdeb7eac39d61ffbe1e323322 [69/88] x86/arch_prctl: Add controls for dynamic XSTATE components
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id=cdf2ff477461d9bfdeb7eac39d61ffbe1e323322
git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel x86/fpu-kvm
git checkout cdf2ff477461d9bfdeb7eac39d61ffbe1e323322
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the tglx-devel/x86/fpu-kvm HEAD dc3cd5721cdb0d3116a2feb84755427d1522477a builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

arch/x86/kernel/fpu/xstate.c: In function 'fpu_xstate_prctl':
>> arch/x86/kernel/fpu/xstate.c:1450:10: error: too few arguments to function 'xstate_request_perm'
1450 | return xstate_request_perm(idx);
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/fpu/xstate.c:1399:19: note: declared here
1399 | static inline int xstate_request_perm(u64 permitted, u64 requested)
| ^~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/fpu/xstate.c:1447:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
1447 | if (!IS_ENABLED(CONFIG_X86_64))
| ^
arch/x86/kernel/fpu/xstate.c:1452:2: note: here
1452 | default:
| ^~~~~~~
cc1: all warnings being treated as errors


vim +/xstate_request_perm +1450 arch/x86/kernel/fpu/xstate.c

1404
1405 /**
1406 * fpu_xstate_prctl - xstate permission operations
1407 * @tsk: Redundant pointer to current
1408 * @option: A subfunction of arch_prctl()
1409 * @arg2: option argument
1410 * Return: 0 if successful; otherwise, an error code
1411 *
1412 * Option arguments:
1413 *
1414 * ARCH_GET_XCOMP_SUPP: Pointer to user space u64 to store the info
1415 * ARCH_GET_XCOMP_PERM: Pointer to user space u64 to store the info
1416 * ARCH_REQ_XCOMP_PERM: Facility number requested
1417 *
1418 * For facilities which require more than one XSTATE component, the request
1419 * must be the highest state component number related to that facility,
1420 * e.g. for AMX which requires XFEATURE_XTILE_CFG(17) and
1421 * XFEATURE_XTILE_DATA(18) this would be XFEATURE_XTILE_DATA(18).
1422 */
1423 long fpu_xstate_prctl(struct task_struct *tsk, int option, unsigned long arg2)
1424 {
1425 u64 __user *uptr = (u64 __user *)arg2;
1426 u64 permitted, supported;
1427 unsigned long idx = arg2;
1428
1429 if (tsk != current)
1430 return -EPERM;
1431
1432 switch (option) {
1433 case ARCH_GET_XCOMP_SUPP:
1434 supported = fpu_user_cfg.max_features | fpu_user_cfg.legacy_features;
1435 return put_user(supported , uptr);
1436
1437 case ARCH_GET_XCOMP_PERM:
1438 /*
1439 * Lockless snapshot as it can also change right after the
1440 * dropping the lock.
1441 */
1442 permitted = xstate_get_host_group_perm();
1443 permitted &= XFEATURE_MASK_USER_SUPPORTED;
1444 return put_user(permitted, uptr);
1445
1446 case ARCH_REQ_XCOMP_PERM:
> 1447 if (!IS_ENABLED(CONFIG_X86_64))
1448 return -ENOTSUPP;
1449
> 1450 return xstate_request_perm(idx);
1451
1452 default:
1453 return -EINVAL;
1454 }
1455 }
1456

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip