* arch/x86/xen/mmu_pv.c:1521:3: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-05-11 9:24 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-11 9:24 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 17015 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Juergen Gross <jgross@suse.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: feb9c5e19e913b53cb536a7aa7c9f20107bb51ec
commit: 36c9b5929b7094ea19a78827c0ede20d2e0e6c9c xen: fix usage of pmd_populate in mremap for pv guests
date: 8 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 8 months ago
config: x86_64-randconfig-c007-20220509 (https://download.01.org/0day-ci/archive/20220511/202205111712.vGaziQOj-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a385645b470e2d3a1534aae618ea56b31177639f)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36c9b5929b7094ea19a78827c0ede20d2e0e6c9c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 36c9b5929b7094ea19a78827c0ede20d2e0e6c9c
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~~~~~
arch/x86/include/asm/xen/hypercall.h:261:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall4(int, mmu_update, req, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1450:2: note: Calling '__xen_set_pte'
__xen_set_pte(ptep, pte);
^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:269:2: note: Taking true branch
if (!xen_batched_set_pte(ptep, pteval)) {
^
arch/x86/xen/mmu_pv.c:278:3: note: Calling 'HYPERVISOR_mmu_update'
HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:261:9: note: Assigned value is garbage or undefined
return _hypercall4(int, mmu_update, req, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:268:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall4(int, mmuext_op, op, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1477:2: note: Calling 'pin_pagetable_pfn'
pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:993:6: note: Calling 'HYPERVISOR_mmuext_op'
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:268:9: note: Assigned value is garbage or undefined
return _hypercall4(int, mmuext_op, op, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:334:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall2(long, memory_op, cmd, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1635:6: note: Calling 'HYPERVISOR_memory_op'
if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:334:9: note: Assigned value is garbage or undefined
return _hypercall2(long, memory_op, cmd, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:348:10: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall3(int, update_va_mapping, va,
^
arch/x86/include/asm/xen/hypercall.h:180:2: note: expanded from macro '_hypercall3'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1628:9: note: Calling 'set_page_prot_flags'
return set_page_prot_flags(addr, prot, UVMF_NONE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:1623:6: note: Calling 'HYPERVISOR_update_va_mapping'
if (HYPERVISOR_update_va_mapping((unsigned long)addr, pte, flags))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:347:2: note: Taking true branch
if (sizeof(new_val) == sizeof(long))
^
arch/x86/include/asm/xen/hypercall.h:348:10: note: Assigned value is garbage or undefined
return _hypercall3(int, update_va_mapping, va,
^
arch/x86/include/asm/xen/hypercall.h:180:2: note: expanded from macro '_hypercall3'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
>> arch/x86/xen/mmu_pv.c:1521:3: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
pinned = false;
^ ~~~~~
arch/x86/xen/mmu_pv.c:1521:3: note: Value stored to 'pinned' is never read
pinned = false;
^ ~~~~~
arch/x86/xen/mmu_pv.c:1523:4: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
pinned = PagePinned(page);
^ ~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:1523:4: note: Value stored to 'pinned' is never read
pinned = PagePinned(page);
^ ~~~~~~~~~~~~~~~~
Suppressed 14 warnings (3 in non-user code, 11 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
arch/x86/include/asm/paravirt.h:110:2: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
PVOP_VCALL4(cpu.cpuid, eax, ebx, ecx, edx);
^
arch/x86/include/asm/paravirt_types.h:561:2: note: expanded from macro 'PVOP_VCALL4'
__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1), PVOP_CALL_ARG2(arg2), \
^
arch/x86/include/asm/paravirt_types.h:491:8: note: expanded from macro '__PVOP_VCALL'
(void)____PVOP_CALL(, op, CLBR_ANY, PVOP_VCALL_CLOBBERS, \
^
arch/x86/include/asm/paravirt_types.h:446:3: note: expanded from macro '____PVOP_CALL'
PVOP_CALL_ARGS; \
^
arch/x86/include/asm/paravirt_types.h:404:16: note: expanded from macro 'PVOP_CALL_ARGS'
unsigned long __edi = __edi, __esi = __esi, \
^
arch/x86/xen/pmu.c:72:6: note: Assuming field 'x86_vendor' is not equal to X86_VENDOR_AMD
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/pmu.c:72:2: note: Taking false branch
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
^
arch/x86/xen/pmu.c:94:13: note: Assuming field 'x86_vendor' is not equal to X86_VENDOR_HYGON
} else if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/pmu.c:94:9: note: Taking false branch
} else if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
^
arch/x86/xen/pmu.c:103:3: note: Calling 'cpuid'
cpuid(0xa, &eax, &ebx, &ecx, &edx);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/processor.h:603:2: note: Calling '__cpuid'
__cpuid(eax, ebx, ecx, edx);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/paravirt.h:110:2: note: Assigned value is garbage or undefined
PVOP_VCALL4(cpu.cpuid, eax, ebx, ecx, edx);
^
arch/x86/include/asm/paravirt_types.h:561:2: note: expanded from macro 'PVOP_VCALL4'
__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1), PVOP_CALL_ARG2(arg2), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/paravirt_types.h:491:8: note: expanded from macro '__PVOP_VCALL'
(void)____PVOP_CALL(, op, CLBR_ANY, PVOP_VCALL_CLOBBERS, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/paravirt_types.h:446:3: note: expanded from macro '____PVOP_CALL'
PVOP_CALL_ARGS; \
^~~~~~~~~~~~~~
arch/x86/include/asm/paravirt_types.h:404:16: note: expanded from macro 'PVOP_CALL_ARGS'
unsigned long __edi = __edi, __esi = __esi, \
^ ~~~~~
arch/x86/include/asm/xen/hypercall.h:435:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall2(int, xenpmu_op, op, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/pmu.c:570:6: note: Assuming 'xen_domain_type' is not equal to XEN_HVM_DOMAIN
if (xen_hvm_domain())
^
include/xen/xen.h:25:27: note: expanded from macro 'xen_hvm_domain'
#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/pmu.c:570:2: note: Taking false branch
if (xen_hvm_domain())
^
arch/x86/xen/pmu.c:577:8: note: Calling 'HYPERVISOR_xenpmu_op'
(void)HYPERVISOR_xenpmu_op(XENPMU_finish, &xp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:435:9: note: Assigned value is garbage or undefined
return _hypercall2(int, xenpmu_op, op, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/xen/pmu.c:305:9: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
if (!xen_intel_pmu_emulate(msr, val, type, index, 1))
^ ~~~~~
arch/x86/xen/pmu.c:295:6: note: Assuming field 'x86_vendor' is equal to X86_VENDOR_INTEL
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/pmu.c:295:2: note: Taking false branch
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
vim +/pinned +1521 arch/x86/xen/mmu_pv.c
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1508
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1509 /* This needs to make sure the new pte page is pinned iff its being
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1510 attached to a pinned pagetable. */
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1511 static inline void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn,
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1512 unsigned level)
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1513 {
6f84f8d1587f20 Pavel Tatashin 2018-04-10 1514 bool pinned = xen_page_pinned(mm->pgd);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1515
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1516 trace_xen_mmu_alloc_ptpage(mm, pfn, level, pinned);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1517
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1518 if (pinned) {
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1519 struct page *page = pfn_to_page(pfn);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1520
36c9b5929b7094 Juergen Gross 2021-09-08 @1521 pinned = false;
36c9b5929b7094 Juergen Gross 2021-09-08 1522 if (static_branch_likely(&xen_struct_pages_ready)) {
36c9b5929b7094 Juergen Gross 2021-09-08 1523 pinned = PagePinned(page);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1524 SetPagePinned(page);
36c9b5929b7094 Juergen Gross 2021-09-08 1525 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1526
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1527 xen_mc_batch();
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1528
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1529 __set_pfn_prot(pfn, PAGE_KERNEL_RO);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1530
36c9b5929b7094 Juergen Gross 2021-09-08 1531 if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS && !pinned)
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1532 __pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1533
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1534 xen_mc_issue(PARAVIRT_LAZY_MMU);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1535 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1536 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1537
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* arch/x86/xen/mmu_pv.c:1521:3: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-05-11 8:54 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-11 8:54 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 15812 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Juergen Gross <jgross@suse.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: feb9c5e19e913b53cb536a7aa7c9f20107bb51ec
commit: 36c9b5929b7094ea19a78827c0ede20d2e0e6c9c xen: fix usage of pmd_populate in mremap for pv guests
date: 8 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 8 months ago
config: x86_64-randconfig-c007-20220509 (https://download.01.org/0day-ci/archive/20220511/202205111613.hPOB4972-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a385645b470e2d3a1534aae618ea56b31177639f)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36c9b5929b7094ea19a78827c0ede20d2e0e6c9c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 36c9b5929b7094ea19a78827c0ede20d2e0e6c9c
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~~~~~
arch/x86/include/asm/xen/hypercall.h:261:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall4(int, mmu_update, req, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1450:2: note: Calling '__xen_set_pte'
__xen_set_pte(ptep, pte);
^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:269:2: note: Taking true branch
if (!xen_batched_set_pte(ptep, pteval)) {
^
arch/x86/xen/mmu_pv.c:278:3: note: Calling 'HYPERVISOR_mmu_update'
HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:261:9: note: Assigned value is garbage or undefined
return _hypercall4(int, mmu_update, req, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:268:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall4(int, mmuext_op, op, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1477:2: note: Calling 'pin_pagetable_pfn'
pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:993:6: note: Calling 'HYPERVISOR_mmuext_op'
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:268:9: note: Assigned value is garbage or undefined
return _hypercall4(int, mmuext_op, op, count, success_count, domid);
^
arch/x86/include/asm/xen/hypercall.h:191:2: note: expanded from macro '_hypercall4'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:334:9: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall2(long, memory_op, cmd, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1635:6: note: Calling 'HYPERVISOR_memory_op'
if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:334:9: note: Assigned value is garbage or undefined
return _hypercall2(long, memory_op, cmd, arg);
^
arch/x86/include/asm/xen/hypercall.h:169:2: note: expanded from macro '_hypercall2'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
arch/x86/include/asm/xen/hypercall.h:348:10: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
return _hypercall3(int, update_va_mapping, va,
^
arch/x86/include/asm/xen/hypercall.h:180:2: note: expanded from macro '_hypercall3'
__HYPERCALL_DECLS; \
^
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^
arch/x86/xen/mmu_pv.c:1628:9: note: Calling 'set_page_prot_flags'
return set_page_prot_flags(addr, prot, UVMF_NONE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:1623:6: note: Calling 'HYPERVISOR_update_va_mapping'
if (HYPERVISOR_update_va_mapping((unsigned long)addr, pte, flags))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:347:2: note: Taking true branch
if (sizeof(new_val) == sizeof(long))
^
arch/x86/include/asm/xen/hypercall.h:348:10: note: Assigned value is garbage or undefined
return _hypercall3(int, update_va_mapping, va,
^
arch/x86/include/asm/xen/hypercall.h:180:2: note: expanded from macro '_hypercall3'
__HYPERCALL_DECLS; \
^~~~~~~~~~~~~~~~~
arch/x86/include/asm/xen/hypercall.h:113:2: note: expanded from macro '__HYPERCALL_DECLS'
register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
^ ~~~~~~
>> arch/x86/xen/mmu_pv.c:1521:3: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
pinned = false;
^ ~~~~~
arch/x86/xen/mmu_pv.c:1521:3: note: Value stored to 'pinned' is never read
pinned = false;
^ ~~~~~
arch/x86/xen/mmu_pv.c:1523:4: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores]
pinned = PagePinned(page);
^ ~~~~~~~~~~~~~~~~
arch/x86/xen/mmu_pv.c:1523:4: note: Value stored to 'pinned' is never read
pinned = PagePinned(page);
^ ~~~~~~~~~~~~~~~~
Suppressed 14 warnings (3 in non-user code, 11 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
fs/udf/super.c:881:2: warning: Value stored to 'ts' is never read [clang-analyzer-deadcode.DeadStores]
ts = &pvoldesc->recordingDateAndTime;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:881:2: note: Value stored to 'ts' is never read
ts = &pvoldesc->recordingDateAndTime;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:1769:2: warning: Address of stack memory associated with local variable 'data' returned to caller [clang-analyzer-core.StackAddressEscape]
return ret;
^
fs/udf/super.c:1800:8: note: Calling 'udf_process_sequence'
ret = udf_process_sequence(sb, main_s, main_e, fileset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:1679:6: note: Assuming field 'part_descs_loc' is non-null
if (!data.part_descs_loc)
^~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:1679:2: note: Taking false branch
if (!data.part_descs_loc)
^
fs/udf/super.c:1686:11: note: 'done' is false
for (; (!done && block <= lastblock); block++) {
^~~~
fs/udf/super.c:1686:10: note: Left side of '&&' is true
for (; (!done && block <= lastblock); block++) {
^
fs/udf/super.c:1686:19: note: Assuming 'block' is <= 'lastblock'
for (; (!done && block <= lastblock); block++) {
^~~~~~~~~~~~~~~~~~
fs/udf/super.c:1686:2: note: Loop condition is true. Entering loop body
for (; (!done && block <= lastblock); block++) {
^
fs/udf/super.c:1688:7: note: Assuming 'bh' is non-null
if (!bh)
^~~
fs/udf/super.c:1688:3: note: Taking false branch
if (!bh)
^
fs/udf/super.c:1694:3: note: Control jumps to 'case 7:' at line 1717
switch (ident) {
^
fs/udf/super.c:1720:8: note: Assuming the condition is true
if (IS_ERR(curr)) {
^~~~~~~~~~~~
fs/udf/super.c:1720:4: note: Taking true branch
if (IS_ERR(curr)) {
^
fs/udf/super.c:1723:5: note: Control jumps to line 1768
goto out;
^
fs/udf/super.c:1769:2: note: Address of stack memory associated with local variable 'data' returned to caller
return ret;
^ ~~~
fs/udf/super.c:1769:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
return ret;
^
fs/udf/super.c:1800:8: note: Calling 'udf_process_sequence'
ret = udf_process_sequence(sb, main_s, main_e, fileset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:1679:6: note: Assuming field 'part_descs_loc' is non-null
if (!data.part_descs_loc)
^~~~~~~~~~~~~~~~~~~~
fs/udf/super.c:1679:2: note: Taking false branch
if (!data.part_descs_loc)
^
fs/udf/super.c:1686:11: note: 'done' is false
for (; (!done && block <= lastblock); block++) {
^~~~
fs/udf/super.c:1686:10: note: Left side of '&&' is true
for (; (!done && block <= lastblock); block++) {
^
fs/udf/super.c:1686:19: note: Assuming 'block' is <= 'lastblock'
for (; (!done && block <= lastblock); block++) {
^~~~~~~~~~~~~~~~~~
fs/udf/super.c:1686:2: note: Loop condition is true. Entering loop body
for (; (!done && block <= lastblock); block++) {
^
fs/udf/super.c:1688:7: note: Assuming 'bh' is non-null
if (!bh)
^~~
fs/udf/super.c:1688:3: note: Taking false branch
if (!bh)
^
fs/udf/super.c:1694:3: note: Control jumps to 'case 5:' @line 1718
switch (ident) {
vim +/pinned +1521 arch/x86/xen/mmu_pv.c
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1508
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1509 /* This needs to make sure the new pte page is pinned iff its being
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1510 attached to a pinned pagetable. */
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1511 static inline void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn,
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1512 unsigned level)
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1513 {
6f84f8d1587f20 Pavel Tatashin 2018-04-10 1514 bool pinned = xen_page_pinned(mm->pgd);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1515
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1516 trace_xen_mmu_alloc_ptpage(mm, pfn, level, pinned);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1517
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1518 if (pinned) {
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1519 struct page *page = pfn_to_page(pfn);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1520
36c9b5929b7094 Juergen Gross 2021-09-08 @1521 pinned = false;
36c9b5929b7094 Juergen Gross 2021-09-08 1522 if (static_branch_likely(&xen_struct_pages_ready)) {
36c9b5929b7094 Juergen Gross 2021-09-08 1523 pinned = PagePinned(page);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1524 SetPagePinned(page);
36c9b5929b7094 Juergen Gross 2021-09-08 1525 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1526
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1527 xen_mc_batch();
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1528
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1529 __set_pfn_prot(pfn, PAGE_KERNEL_RO);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1530
36c9b5929b7094 Juergen Gross 2021-09-08 1531 if (level == PT_PTE && USE_SPLIT_PTE_PTLOCKS && !pinned)
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1532 __pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1533
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1534 xen_mc_issue(PARAVIRT_LAZY_MMU);
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1535 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1536 }
7e0563dea9c4e6 Vitaly Kuznetsov 2017-04-04 1537
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-11 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 9:24 arch/x86/xen/mmu_pv.c:1521:3: warning: Value stored to 'pinned' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-05-11 8:54 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.