CC: [email protected]
CC: [email protected]
TO: Ard Biesheuvel <[email protected]>
CC: Ingo Molnar <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c0842fbc1b18c7a044e6ff3e8fa78bfa822c7d1a
commit: ea5e1919b44f09fce72d919fbb87f9611fc700a6 efi/x86: Simplify mixed mode 
call wrapper
date:   7 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 7 months ago
config: x86_64-randconfig-s022-20200805 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-117-g8c7aee71-dirty
        git checkout ea5e1919b44f09fce72d919fbb87f9611fc700a6
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)

   arch/x86/platform/efi/efi_64.c: note: in included file (through 
include/linux/mmzone.h, include/linux/gfp.h, include/linux/mm.h):
>> include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 
>> 'efi_thunk_set_variable_nonblocking' - wrong count at exit
>> arch/x86/platform/efi/efi_64.c:960:1: sparse: sparse: context imbalance in 
>> 'efi_thunk_query_variable_info_nonblocking' - different lock contexts for 
>> basic block

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ea5e1919b44f09fce72d919fbb87f9611fc700a6
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout ea5e1919b44f09fce72d919fbb87f9611fc700a6
vim +/efi_thunk_query_variable_info_nonblocking +960 
arch/x86/platform/efi/efi_64.c

83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  958  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  959  static efi_status_t
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20 @960  
efi_thunk_query_variable_info_nonblocking(u32 attr, u64 *storage_space,
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  961                                   
  u64 *remaining_space,
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  962                                   
  u64 *max_variable_size)
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  963  {
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  964   efi_status_t status;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  965   u32 phys_storage, 
phys_remaining, phys_max;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  966   unsigned long flags;
4f9dbcfc40299d Matt Fleming   2014-01-10  967  
4f9dbcfc40299d Matt Fleming   2014-01-10  968   if (efi.runtime_version < 
EFI_2_00_SYSTEM_TABLE_REVISION)
4f9dbcfc40299d Matt Fleming   2014-01-10  969           return EFI_UNSUPPORTED;
4f9dbcfc40299d Matt Fleming   2014-01-10  970  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  971   if 
(!spin_trylock_irqsave(&efi_runtime_lock, flags))
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  972           return EFI_NOT_READY;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  973  
f6697df36bdf0b Matt Fleming   2016-11-12  974   phys_storage = 
virt_to_phys_or_null(storage_space);
f6697df36bdf0b Matt Fleming   2016-11-12  975   phys_remaining = 
virt_to_phys_or_null(remaining_space);
f6697df36bdf0b Matt Fleming   2016-11-12  976   phys_max = 
virt_to_phys_or_null(max_variable_size);
4f9dbcfc40299d Matt Fleming   2014-01-10  977  
9a11040ff96230 Matt Fleming   2014-03-16  978   status = 
efi_thunk(query_variable_info, attr, phys_storage,
4f9dbcfc40299d Matt Fleming   2014-01-10  979                      
phys_remaining, phys_max);
4f9dbcfc40299d Matt Fleming   2014-01-10  980  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  981   
spin_unlock_irqrestore(&efi_runtime_lock, flags);
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  982  
4f9dbcfc40299d Matt Fleming   2014-01-10  983   return status;
4f9dbcfc40299d Matt Fleming   2014-01-10  984  }
4f9dbcfc40299d Matt Fleming   2014-01-10  985  

:::::: The code at line 960 was first introduced by commit
:::::: 83a0a2ea0b991927e42984be220329e776ce7137 efi/x86: Prevent reentrant 
firmware calls in mixed mode

:::::: TO: Ard Biesheuvel <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to