lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112011845.7xW5IRjl-lkp@intel.com>
Date:   Wed, 1 Dec 2021 18:21:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>
Subject: [intel-tdx:guest-upstream 21/28] arch/x86/kernel/tdx.c:102:7:
 warning: this statement may fall through

tree:   https://github.com/intel/tdx.git guest-upstream
head:   e6dbebc1d0c8a4a2449cd0800c025fb25078a6ac
commit: 466e3f43adbeeab45d4e4213a078c823edf35fc8 [21/28] x86/tdx: Add helper to convert memory between shared and private
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20211201/202112011845.7xW5IRjl-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel/tdx/commit/466e3f43adbeeab45d4e4213a078c823edf35fc8
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest-upstream
        git checkout 466e3f43adbeeab45d4e4213a078c823edf35fc8
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/

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

All warnings (new ones prefixed by >>):

   arch/x86/kernel/tdx.c:296:8: error: return type defaults to 'int' [-Werror=return-type]
     296 | static tdx_mmio_write(int size, unsigned long addr, unsigned long *val)
         |        ^~~~~~~~~~~~~~
   arch/x86/kernel/tdx.c: In function 'tdx_accept_page':
>> arch/x86/kernel/tdx.c:102:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
     102 |   gpa |= 1;
         |   ~~~~^~~~
   arch/x86/kernel/tdx.c:103:2: note: here
     103 |  case PG_LEVEL_1G:
         |  ^~~~
   arch/x86/kernel/tdx.c:104:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
     104 |   gpa |= 2;
         |   ~~~~^~~~
   arch/x86/kernel/tdx.c:105:2: note: here
     105 |  default:
         |  ^~~~~~~
   cc1: some warnings being treated as errors


vim +102 arch/x86/kernel/tdx.c

    89	
    90	static bool tdx_accept_page(phys_addr_t gpa, enum pg_level pg_level)
    91	{
    92		/*
    93		 * Pass the page physical address to the TDX module to accept the
    94		 * pending, private page.
    95		 *
    96		 * Bits 2:0 if GPA encodes page size: 0 - 4K, 1 - 2M.
    97		 */
    98		switch (pg_level) {
    99		case PG_LEVEL_4K:
   100			break;
   101		case PG_LEVEL_2M:
 > 102			gpa |= 1;
   103		case PG_LEVEL_1G:
   104			gpa |= 2;
   105		default:
   106			return true;
   107		}
   108	
   109		return __tdx_module_call(TDX_ACCEPT_PAGE, gpa, 0, 0, 0, NULL);
   110	}
   111	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ