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: <202312190719.kBuYl6oJ-lkp@intel.com>
Date: Tue, 19 Dec 2023 07:37:06 +0800
From: kernel test robot <lkp@...el.com>
To: Mayuresh Chitale <mchitale@...tanamicro.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Anup Patel <anup@...infault.org>,
	Andrew Jones <ajones@...tanamicro.com>
Subject: arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn:
 inconsistent indenting

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2cf4f94d8e8646803f8fb0facf134b0cd7fb691a
commit: c04913f2b54ee86be34d1a1e9df7b7876b12b8c0 RISCV: KVM: Add sstateen0 to ONE_REG
date:   10 weeks ago
config: riscv-randconfig-r071-20231218 (https://download.01.org/0day-ci/archive/20231219/202312190719.kBuYl6oJ-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312190719.kBuYl6oJ-lkp@intel.com/

smatch warnings:
arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn: inconsistent indenting

vim +486 arch/riscv/kvm/vcpu_onereg.c

   454	
   455	static int kvm_riscv_vcpu_set_reg_csr(struct kvm_vcpu *vcpu,
   456					      const struct kvm_one_reg *reg)
   457	{
   458		int rc;
   459		unsigned long __user *uaddr =
   460				(unsigned long __user *)(unsigned long)reg->addr;
   461		unsigned long reg_num = reg->id & ~(KVM_REG_ARCH_MASK |
   462						    KVM_REG_SIZE_MASK |
   463						    KVM_REG_RISCV_CSR);
   464		unsigned long reg_val, reg_subtype;
   465	
   466		if (KVM_REG_SIZE(reg->id) != sizeof(unsigned long))
   467			return -EINVAL;
   468	
   469		if (copy_from_user(&reg_val, uaddr, KVM_REG_SIZE(reg->id)))
   470			return -EFAULT;
   471	
   472		reg_subtype = reg_num & KVM_REG_RISCV_SUBTYPE_MASK;
   473		reg_num &= ~KVM_REG_RISCV_SUBTYPE_MASK;
   474		switch (reg_subtype) {
   475		case KVM_REG_RISCV_CSR_GENERAL:
   476			rc = kvm_riscv_vcpu_general_set_csr(vcpu, reg_num, reg_val);
   477			break;
   478		case KVM_REG_RISCV_CSR_AIA:
   479			rc = kvm_riscv_vcpu_aia_set_csr(vcpu, reg_num, reg_val);
   480			break;
   481		case KVM_REG_RISCV_CSR_SMSTATEEN:
   482			rc = -EINVAL;
   483			if (riscv_has_extension_unlikely(RISCV_ISA_EXT_SMSTATEEN))
   484				rc = kvm_riscv_vcpu_smstateen_set_csr(vcpu, reg_num,
   485								      reg_val);
 > 486	break;
   487		default:
   488			rc = -ENOENT;
   489			break;
   490		}
   491		if (rc)
   492			return rc;
   493	
   494		return 0;
   495	}
   496	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ