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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <547A8E1F.60900@gmail.com>
Date:	Sun, 30 Nov 2014 11:25:19 +0800
From:	Chen Gang <gang.chen.5i5j@...il.com>
To:	Marc Zyngier <marc.zyngier@....com>
CC:	"christoffer.dall@...aro.org" <christoffer.dall@...aro.org>,
	"gleb@...nel.org" <gleb@...nel.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	Catalin Marinas <Catalin.Marinas@....com>,
	Will Deacon <Will.Deacon@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] virt: kvm: arm: vgic: Process the failure case when
 kvm_register_device_ops() fails

Hello maintainers:

Is this discussion OK? If necessary, I shall send patch v3 according to
your taste.

Thanks.

On 11/15/14 00:30, Chen Gang wrote:
> 
> According to your taste, we need improve 2 contents below:
> 
> On 11/14/2014 11:55 PM, Marc Zyngier wrote:
>>
>> No. This is completely overdesigned, and fixes something that really
>> cannot happen. What is wrong with:
>>
>> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
>> index 3aaca49..b7dffa80 100644
>> --- a/virt/kvm/arm/vgic.c
>> +++ b/virt/kvm/arm/vgic.c
>> @@ -2465,13 +2465,17 @@ int kvm_vgic_hyp_init(void)
>>  		goto out_free_irq;
>>  	}
>>  
>> +	ret = kvm_register_device_ops(&kvm_arm_vgic_v2_ops,
>> +				       KVM_DEV_TYPE_ARM_VGIC_V2);
>> +	if (ret)
>> +		goto out_free_irq;
>> +
> 
> Need call __unregister_cpu_notifier(), since __register_cpu_notifier()
> is already successfully called.
> 
> Need print some information for failure via kvm_err().
> 
> Thanks.
>>  	/* Callback into for arch code for setup */
>>  	vgic_arch_setup(vgic);
>>  
>>  	on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
>>  
>> -	return kvm_register_device_ops(&kvm_arm_vgic_v2_ops,
>> -				       KVM_DEV_TYPE_ARM_VGIC_V2);
>> +	return 0;
>>  
>>  out_free_irq:
>>  	free_percpu_irq(vgic->maint_irq, kvm_get_running_vcpus());
>>
>> This achieves the exact same effect.
>>
>> Thanks,
>>
>> 	M.
>>
> 
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ