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]
Date:	Tue, 25 Aug 2015 15:36:26 +0800
From:	Jason Wang <jasowang@...hat.com>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
CC:	gleb@...nel.org, pbonzini@...hat.com, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, "Michael S. Tsirkin" <mst@...hat.com>
Subject: Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two
 buses



On 08/25/2015 11:04 AM, Jason Wang wrote:
[...]
>>>>> @@ -900,10 +899,11 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
>>>>> >>>>  		if (!p->wildcard && p->datamatch != args->datamatch)
>>>>> >>>>  			continue;
>>>>> >>>>  
>>>>> >>>> -		kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev);
>>>>> >>>>  		if (!p->length) {
>>>>> >>>>  			kvm_io_bus_unregister_dev(kvm, KVM_FAST_MMIO_BUS,
>>>>> >>>>  						  &p->dev);
>>>>> >>>> +		} else {
>>>>> >>>> +			kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev);
>>>>> >>>>  		}
>>>> >>> Similar comments here... do you want to check for bus_idx ==
>>>> >>> KVM_MMIO_BUS as well?
>>> >> Good catch. I think keep the original code as is will be also ok to
>>> >> solve this. (with changing the bus_idx to KVM_FAST_MMIO_BUS during
>>> >> registering if it was an wildcard mmio).
>> > Do you need to handle the ioeventfd_count changes on the fast mmio bus
>> > as well?
> Yes. So actually, it needs some changes: checking the return value of
> kvm_io_bus_unregister_dev() and decide which bus does the device belongs to.
>

Looks like it will be more cleaner by just changing
ioeventfd_bus_from_flags() to return KVM_FAST_MMIO_BUS accordingly. Will
post V2 soon.
--
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