All of lore.kernel.org
 help / color / mirror / Atom feed
* [tglx-devel:x86/fpu-kvm 86/88] arch/x86/kernel/fpu/xstate.c:1622 __xstate_request_perm() error: uninitialized symbol 'ret'.
@ 2021-10-26  7:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-26  7:08 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4693 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Thomas Gleixner <tglx@linutronix.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-kvm
head:   dc3cd5721cdb0d3116a2feb84755427d1522477a
commit: 62016e4cc41716b33da890ad43145b646f9db51d [86/88] x86/fpu: Extend prctl() with guest permissions
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: x86_64-randconfig-m001-20211019 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
arch/x86/kernel/fpu/xstate.c:1622 __xstate_request_perm() error: uninitialized symbol 'ret'.

Old smatch warnings:
arch/x86/kernel/fpu/xstate.c:375 os_xrstor_booting() warn: mask and shift to zero

vim +/ret +1622 arch/x86/kernel/fpu/xstate.c

cdf2ff477461d9 Chang S. Bae    2021-10-01  1582  
62016e4cc41716 Thomas Gleixner 2021-10-17  1583  static int __xstate_request_perm(u64 permitted, u64 requested, bool guest)
cdf2ff477461d9 Chang S. Bae    2021-10-01  1584  {
cdf2ff477461d9 Chang S. Bae    2021-10-01  1585  	/*
cdf2ff477461d9 Chang S. Bae    2021-10-01  1586  	 * This deliberately does not exclude !XSAVES as we still might
cdf2ff477461d9 Chang S. Bae    2021-10-01  1587  	 * decide to optionally context switch XCR0 or talk the silicon
1c31bd942ba476 Chang S. Bae    2021-10-06  1588  	 * vendors into extending XFD for the pre AMX states, especially
1c31bd942ba476 Chang S. Bae    2021-10-06  1589  	 * AVX512.
cdf2ff477461d9 Chang S. Bae    2021-10-01  1590  	 */
cdf2ff477461d9 Chang S. Bae    2021-10-01  1591  	bool compacted = cpu_feature_enabled(X86_FEATURE_XSAVES);
cdf2ff477461d9 Chang S. Bae    2021-10-01  1592  	struct fpu *fpu = &current->group_leader->thread.fpu;
62016e4cc41716 Thomas Gleixner 2021-10-17  1593  	struct fpu_state_perm *perm;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1594  	unsigned int ksize, usize;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1595  	u64 mask;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1596  	int ret;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1597  
cdf2ff477461d9 Chang S. Bae    2021-10-01  1598  	/* Check whether fully enabled */
cdf2ff477461d9 Chang S. Bae    2021-10-01  1599  	if ((permitted & requested) == requested)
cdf2ff477461d9 Chang S. Bae    2021-10-01  1600  		return 0;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1601  
cdf2ff477461d9 Chang S. Bae    2021-10-01  1602  	/* Calculate the resulting kernel state size */
cdf2ff477461d9 Chang S. Bae    2021-10-01  1603  	mask = permitted | requested;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1604  	ksize = xstate_calculate_size(mask, compacted);
cdf2ff477461d9 Chang S. Bae    2021-10-01  1605  
cdf2ff477461d9 Chang S. Bae    2021-10-01  1606  	/* Calculate the resulting user state size */
cdf2ff477461d9 Chang S. Bae    2021-10-01  1607  	mask &= XFEATURE_MASK_USER_SUPPORTED;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1608  	usize = xstate_calculate_size(mask, false);
cdf2ff477461d9 Chang S. Bae    2021-10-01  1609  
62016e4cc41716 Thomas Gleixner 2021-10-17  1610  	if (!guest) {
cdf2ff477461d9 Chang S. Bae    2021-10-01  1611  		ret = validate_sigaltstack(usize);
cdf2ff477461d9 Chang S. Bae    2021-10-01  1612  		if (ret)
cdf2ff477461d9 Chang S. Bae    2021-10-01  1613  			return ret;
62016e4cc41716 Thomas Gleixner 2021-10-17  1614  	}
cdf2ff477461d9 Chang S. Bae    2021-10-01  1615  
62016e4cc41716 Thomas Gleixner 2021-10-17  1616  	perm = guest ? &fpu->guest_perm : &fpu->perm;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1617  	/* Pairs with the READ_ONCE() in xstate_get_group_perm() */
62016e4cc41716 Thomas Gleixner 2021-10-17  1618  	WRITE_ONCE(perm->__state_perm, requested);
cdf2ff477461d9 Chang S. Bae    2021-10-01  1619  	/* Protected by sighand lock */
62016e4cc41716 Thomas Gleixner 2021-10-17  1620  	perm->__state_size = ksize;
62016e4cc41716 Thomas Gleixner 2021-10-17  1621  	perm->__user_state_size = usize;
cdf2ff477461d9 Chang S. Bae    2021-10-01 @1622  	return ret;
cdf2ff477461d9 Chang S. Bae    2021-10-01  1623  }
cdf2ff477461d9 Chang S. Bae    2021-10-01  1624  

:::::: The code at line 1622 was first introduced by commit
:::::: cdf2ff477461d9bfdeb7eac39d61ffbe1e323322 x86/arch_prctl: Add controls for dynamic XSTATE components

:::::: TO: Chang S. Bae <chang.seok.bae@intel.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40109 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-26  7:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  7:08 [tglx-devel:x86/fpu-kvm 86/88] arch/x86/kernel/fpu/xstate.c:1622 __xstate_request_perm() error: uninitialized symbol 'ret' 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.