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: <202210171808.UfXGhMfn-lkp@intel.com>
Date:   Mon, 17 Oct 2022 18:16:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [sean-jc:x86/rework_kvm_init 14/39] arch/arm64/kvm/arm.c:2194:
 warning: expecting prototype for Initialize Hyp(). Prototype was for
 kvm_arm_init() instead

tree:   https://github.com/sean-jc/linux x86/rework_kvm_init
head:   419450c654fa58b3708d7b15cb6b20dfb80b472a
commit: f89ca9dde08a1f5ea2f02c5e29b95c25e28583c0 [14/39] KVM: arm: Do arm/arch initialiation without bouncing through kvm_init()
config: arm64-allyesconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
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://github.com/sean-jc/linux/commit/f89ca9dde08a1f5ea2f02c5e29b95c25e28583c0
        git remote add sean-jc https://github.com/sean-jc/linux
        git fetch --no-tags sean-jc x86/rework_kvm_init
        git checkout f89ca9dde08a1f5ea2f02c5e29b95c25e28583c0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kvm/

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

All warnings (new ones prefixed by >>):

   arch/arm64/kvm/arm.c:133: warning: Function parameter or member 'type' not described in 'kvm_arch_init_vm'
   arch/arm64/kvm/arm.c:1921: warning: expecting prototype for Inits Hyp(). Prototype was for init_hyp_mode() instead
>> arch/arm64/kvm/arm.c:2194: warning: expecting prototype for Initialize Hyp(). Prototype was for kvm_arm_init() instead


vim +2194 arch/arm64/kvm/arm.c

2412405b3141cf virt/kvm/arm/arm.c   Eric Auger          2017-10-27  2189  
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2190  /**
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2191   * Initialize Hyp-mode and memory mappings on all CPUs.
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2192   */
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2193  int kvm_arm_init(void)
749cf76c5a363e arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20 @2194  {
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2195  	int err;
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2196  	bool in_hyp_mode;
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2197  
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2198  	if (!is_hyp_mode_available()) {
58d0d19a204604 virt/kvm/arm/arm.c   Ard Biesheuvel      2017-11-28  2199  		kvm_info("HYP mode not available\n");
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2200  		return -ENODEV;
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2201  	}
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2202  
b6a68b97af23cc arch/arm64/kvm/arm.c Marc Zyngier        2021-10-01  2203  	if (kvm_get_mode() == KVM_MODE_NONE) {
b6a68b97af23cc arch/arm64/kvm/arm.c Marc Zyngier        2021-10-01  2204  		kvm_info("KVM disabled from command line\n");
b6a68b97af23cc arch/arm64/kvm/arm.c Marc Zyngier        2021-10-01  2205  		return -ENODEV;
b6a68b97af23cc arch/arm64/kvm/arm.c Marc Zyngier        2021-10-01  2206  	}
b6a68b97af23cc arch/arm64/kvm/arm.c Marc Zyngier        2021-10-01  2207  
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2208  	err = kvm_sys_reg_table_init();
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2209  	if (err) {
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2210  		kvm_info("Error initializing system register tables");
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2211  		return err;
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2212  	}
f1f0c0cfeaa7c1 arch/arm64/kvm/arm.c Alexandru Elisei    2022-04-28  2213  
33e5f4e50917c2 virt/kvm/arm/arm.c   Marc Zyngier        2018-12-06  2214  	in_hyp_mode = is_kernel_in_hyp_mode();
33e5f4e50917c2 virt/kvm/arm/arm.c   Marc Zyngier        2018-12-06  2215  
96d389ca10110d arch/arm64/kvm/arm.c Rob Herring         2020-10-28  2216  	if (cpus_have_final_cap(ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE) ||
96d389ca10110d arch/arm64/kvm/arm.c Rob Herring         2020-10-28  2217  	    cpus_have_final_cap(ARM64_WORKAROUND_1508412))
abf532cceaca9c arch/arm64/kvm/arm.c Rob Herring         2020-08-03  2218  		kvm_info("Guests without required CPU erratum workarounds can deadlock system!\n" \
abf532cceaca9c arch/arm64/kvm/arm.c Rob Herring         2020-08-03  2219  			 "Only trusted guests should be used on this system.\n");
abf532cceaca9c arch/arm64/kvm/arm.c Rob Herring         2020-08-03  2220  
bf249d9e362f10 arch/arm64/kvm/arm.c Anshuman Khandual   2021-08-12  2221  	err = kvm_set_ipa_limit();
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2222  	if (err)
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2223  		return err;
8146875de7d47c arch/arm/kvm/arm.c   Srivatsa S. Bhat    2014-03-18  2224  
a3be836df7cb77 virt/kvm/arm/arm.c   Dave Martin         2019-04-12  2225  	err = kvm_arm_init_sve();
0f062bfe36b63c virt/kvm/arm/arm.c   Dave Martin         2019-02-28  2226  	if (err)
0f062bfe36b63c virt/kvm/arm/arm.c   Dave Martin         2019-02-28  2227  		return err;
0f062bfe36b63c virt/kvm/arm/arm.c   Dave Martin         2019-02-28  2228  
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2229  	err = kvm_arm_vmid_alloc_init();
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2230  	if (err) {
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2231  		kvm_err("Failed to initialize VMID allocator.\n");
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2232  		return err;
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2233  	}
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2234  
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2235  	if (!in_hyp_mode) {
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2236  		err = init_hyp_mode();
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2237  		if (err)
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2238  			goto out_err;
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2239  	}
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2240  
b881cdce77b48b arch/arm64/kvm/arm.c Will Deacon         2020-11-13  2241  	err = kvm_init_vector_slots();
b881cdce77b48b arch/arm64/kvm/arm.c Will Deacon         2020-11-13  2242  	if (err) {
b881cdce77b48b arch/arm64/kvm/arm.c Will Deacon         2020-11-13  2243  		kvm_err("Cannot initialise vector slots\n");
c4e8594e424b2c arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2244  		goto out_hyp;
b881cdce77b48b arch/arm64/kvm/arm.c Will Deacon         2020-11-13  2245  	}
b881cdce77b48b arch/arm64/kvm/arm.c Will Deacon         2020-11-13  2246  
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2247  	err = init_subsystems();
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2248  	if (err)
2ec97eeac97410 arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2249  		goto out_hyp;
1fcf7ce0c60213 arch/arm/kvm/arm.c   Lorenzo Pieralisi   2013-08-05  2250  
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2251  	if (!in_hyp_mode) {
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2252  		err = finalize_hyp_mode();
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2253  		if (err) {
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2254  			kvm_err("Failed to finalize Hyp protection\n");
c4e8594e424b2c arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2255  			goto out_subs;
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2256  		}
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2257  	}
bfa79a805454f7 arch/arm64/kvm/arm.c Quentin Perret      2021-03-19  2258  
f19f6644a5433c arch/arm64/kvm/arm.c David Brazdil       2020-12-02  2259  	if (is_protected_kvm_enabled()) {
3eb681fba2bf8b arch/arm64/kvm/arm.c David Brazdil       2020-12-02  2260  		kvm_info("Protected nVHE mode initialized successfully\n");
f19f6644a5433c arch/arm64/kvm/arm.c David Brazdil       2020-12-02  2261  	} else if (in_hyp_mode) {
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2262  		kvm_info("VHE mode initialized successfully\n");
f19f6644a5433c arch/arm64/kvm/arm.c David Brazdil       2020-12-02  2263  	} else {
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2264  		kvm_info("Hyp mode initialized successfully\n");
f19f6644a5433c arch/arm64/kvm/arm.c David Brazdil       2020-12-02  2265  	}
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2266  
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2267  	/*
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2268  	 * FIXME: Do something reasonable if kvm_init() fails after pKVM
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2269  	 * hypervisor protection is finalized.
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2270  	 */
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2271  	err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2272  	if (err)
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2273  		goto out_subs;
f89ca9dde08a1f arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2274  
749cf76c5a363e arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2275  	return 0;
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2276  
c4e8594e424b2c arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2277  out_subs:
2ec97eeac97410 arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2278  	teardown_subsystems();
c4e8594e424b2c arch/arm64/kvm/arm.c Sean Christopherson 2022-10-13  2279  out_hyp:
fe7d7b03c61f6d virt/kvm/arm/arm.c   Julien Thierry      2017-10-20  2280  	if (!in_hyp_mode)
1e947bad0b63b3 arch/arm/kvm/arm.c   Marc Zyngier        2015-01-29  2281  		teardown_hyp_mode();
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2282  out_err:
3248136b3637e1 arch/arm64/kvm/arm.c Julien Grall        2021-11-22  2283  	kvm_arm_vmid_alloc_free();
342cd0ab0e6ca3 arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2284  	return err;
749cf76c5a363e arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2285  }
749cf76c5a363e arch/arm/kvm/arm.c   Christoffer Dall    2013-01-20  2286  

:::::: The code at line 2194 was first introduced by commit
:::::: 749cf76c5a363e1383108a914ea09530bfa0bd43 KVM: ARM: Initial skeleton to compile KVM support

:::::: TO: Christoffer Dall <c.dall@...tualopensystems.com>
:::::: CC: Christoffer Dall <c.dall@...tualopensystems.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (357988 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ