All of lore.kernel.org
 help / color / mirror / Atom feed
* [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used
@ 2021-09-30  2:30 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-09-30  2:30 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: llvm, kbuild-all, linux-kernel, Borislav Petkov, Sean Christopherson

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tip-x86-sgx
head:   56e2d0eff4f8db87cf77d9c8481041878177c680
commit: 4b634f57cac2e1d28cfa0ca961e561362fc3f957 [11/25] x86/sgx: Add an SGX misc driver interface
config: x86_64-randconfig-a014-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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/bp/bp.git/commit/?id=4b634f57cac2e1d28cfa0ca961e561362fc3f957
        git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
        git fetch --no-tags bp tip-x86-sgx
        git checkout 4b634f57cac2e1d28cfa0ca961e561362fc3f957
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/cpu/sgx/driver.c:11:
>> arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used [-Wunused-but-set-variable]
           struct sgx_encl *encl;
                            ^
   1 warning generated.


vim +/encl +45 arch/x86/kernel/cpu/sgx/encl.h

    40	
    41	static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr,
    42					struct vm_area_struct **vma)
    43	{
    44		struct vm_area_struct *result;
  > 45		struct sgx_encl *encl;
    46	
    47		result = find_vma(mm, addr);
    48		if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
    49			return -EINVAL;
    50	
    51		encl = result->vm_private_data;
    52		*vma = result;
    53	
    54		return 0;
    55	}
    56	

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used
@ 2021-09-30  2:30 ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-09-30  2:30 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tip-x86-sgx
head:   56e2d0eff4f8db87cf77d9c8481041878177c680
commit: 4b634f57cac2e1d28cfa0ca961e561362fc3f957 [11/25] x86/sgx: Add an SGX misc driver interface
config: x86_64-randconfig-a014-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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/bp/bp.git/commit/?id=4b634f57cac2e1d28cfa0ca961e561362fc3f957
        git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
        git fetch --no-tags bp tip-x86-sgx
        git checkout 4b634f57cac2e1d28cfa0ca961e561362fc3f957
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/cpu/sgx/driver.c:11:
>> arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used [-Wunused-but-set-variable]
           struct sgx_encl *encl;
                            ^
   1 warning generated.


vim +/encl +45 arch/x86/kernel/cpu/sgx/encl.h

    40	
    41	static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr,
    42					struct vm_area_struct **vma)
    43	{
    44		struct vm_area_struct *result;
  > 45		struct sgx_encl *encl;
    46	
    47		result = find_vma(mm, addr);
    48		if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
    49			return -EINVAL;
    50	
    51		encl = result->vm_private_data;
    52		*vma = result;
    53	
    54		return 0;
    55	}
    56	

---
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: 28927 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used
  2020-11-18 10:42 ` Borislav Petkov
@ 2020-11-18 15:01   ` Jarkko Sakkinen
  0 siblings, 0 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2020-11-18 15:01 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Nov 18, 2020 at 11:42:54AM +0100, Borislav Petkov wrote:
> On Wed, Nov 18, 2020 at 11:23:55AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tip-x86-sgx
> > head:   56e2d0eff4f8db87cf77d9c8481041878177c680
> > commit: 4b634f57cac2e1d28cfa0ca961e561362fc3f957 [11/25] x86/sgx: Add an SGX misc driver interface
> > config: x86_64-allyesconfig (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> > reproduce (this is a W=1 build):
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/commit/?id=4b634f57cac2e1d28cfa0ca961e561362fc3f957
> >         git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
> >         git fetch --no-tags bp tip-x86-sgx
> >         git checkout 4b634f57cac2e1d28cfa0ca961e561362fc3f957
> >         # save the attached .config to linux build tree
> >         make W=1 ARCH=x86_64 
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    In file included from arch/x86/kernel/cpu/sgx/driver.c:11:
> >    arch/x86/kernel/cpu/sgx/encl.h: In function 'sgx_encl_find':
> > >> arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used [-Wunused-but-set-variable]
> >       45 |  struct sgx_encl *encl;
> >          |                   ^~~~
> > 
> > vim +/encl +45 arch/x86/kernel/cpu/sgx/encl.h
> > 
> >     40	
> >     41	static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr,
> >     42					struct vm_area_struct **vma)
> >     43	{
> >     44		struct vm_area_struct *result;
> >   > 45		struct sgx_encl *encl;
> >     46	
> >     47		result = find_vma(mm, addr);
> >     48		if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
> >     49			return -EINVAL;
> >     50	
> >     51		encl = result->vm_private_data;
> 
> Looks like that encl needs to go, judging by:
> 
> * Do not check !vm_private_data in sgx_encl_find(), as the enclave is
>   created at VFS open.
> 
> in patch 11.
> 
> Jarkko?

Yes, it is useless.

> -- 
> Regards/Gruss,
>     Boris.
> 
> SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
 

 /Jarkko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used
  2020-11-18  3:23 kernel test robot
@ 2020-11-18 10:42 ` Borislav Petkov
  2020-11-18 15:01   ` Jarkko Sakkinen
  0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2020-11-18 10:42 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Nov 18, 2020 at 11:23:55AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tip-x86-sgx
> head:   56e2d0eff4f8db87cf77d9c8481041878177c680
> commit: 4b634f57cac2e1d28cfa0ca961e561362fc3f957 [11/25] x86/sgx: Add an SGX misc driver interface
> config: x86_64-allyesconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/commit/?id=4b634f57cac2e1d28cfa0ca961e561362fc3f957
>         git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
>         git fetch --no-tags bp tip-x86-sgx
>         git checkout 4b634f57cac2e1d28cfa0ca961e561362fc3f957
>         # save the attached .config to linux build tree
>         make W=1 ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from arch/x86/kernel/cpu/sgx/driver.c:11:
>    arch/x86/kernel/cpu/sgx/encl.h: In function 'sgx_encl_find':
> >> arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used [-Wunused-but-set-variable]
>       45 |  struct sgx_encl *encl;
>          |                   ^~~~
> 
> vim +/encl +45 arch/x86/kernel/cpu/sgx/encl.h
> 
>     40	
>     41	static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr,
>     42					struct vm_area_struct **vma)
>     43	{
>     44		struct vm_area_struct *result;
>   > 45		struct sgx_encl *encl;
>     46	
>     47		result = find_vma(mm, addr);
>     48		if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
>     49			return -EINVAL;
>     50	
>     51		encl = result->vm_private_data;

Looks like that encl needs to go, judging by:

* Do not check !vm_private_data in sgx_encl_find(), as the enclave is
  created at VFS open.

in patch 11.

Jarkko?

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used
@ 2020-11-18  3:23 kernel test robot
  2020-11-18 10:42 ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-11-18  3:23 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tip-x86-sgx
head:   56e2d0eff4f8db87cf77d9c8481041878177c680
commit: 4b634f57cac2e1d28cfa0ca961e561362fc3f957 [11/25] x86/sgx: Add an SGX misc driver interface
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/commit/?id=4b634f57cac2e1d28cfa0ca961e561362fc3f957
        git remote add bp https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git
        git fetch --no-tags bp tip-x86-sgx
        git checkout 4b634f57cac2e1d28cfa0ca961e561362fc3f957
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/cpu/sgx/driver.c:11:
   arch/x86/kernel/cpu/sgx/encl.h: In function 'sgx_encl_find':
>> arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used [-Wunused-but-set-variable]
      45 |  struct sgx_encl *encl;
         |                   ^~~~

vim +/encl +45 arch/x86/kernel/cpu/sgx/encl.h

    40	
    41	static inline int sgx_encl_find(struct mm_struct *mm, unsigned long addr,
    42					struct vm_area_struct **vma)
    43	{
    44		struct vm_area_struct *result;
  > 45		struct sgx_encl *encl;
    46	
    47		result = find_vma(mm, addr);
    48		if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
    49			return -EINVAL;
    50	
    51		encl = result->vm_private_data;
    52		*vma = result;
    53	
    54		return 0;
    55	}
    56	

---
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: 76800 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-30  2:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  2:30 [bp:tip-x86-sgx 11/25] arch/x86/kernel/cpu/sgx/encl.h:45:19: warning: variable 'encl' set but not used kernel test robot
2021-09-30  2:30 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-11-18  3:23 kernel test robot
2020-11-18 10:42 ` Borislav Petkov
2020-11-18 15:01   ` Jarkko Sakkinen

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.