Received: from eggs.gnu.org ([2001:4830:134:3::10]:43920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG3E1-000687-9r for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG3Du-0001N6-Pr for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:55:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG3Du-0001Mq-Kg for qemu-devel@nongnu.org; Thu, 23 Jun 2016 07:55:06 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5DC780096 for ; Thu, 23 Jun 2016 11:55:04 +0000 (UTC) Date: Thu, 23 Jun 2016 08:55:02 -0300 From: Eduardo Habkost Message-ID: <20160623115502.GW2048@thinpad.lan.raisama.net> References: <1466437983-27133-1-git-send-email-ehabkost@redhat.com> <1466437983-27133-11-git-send-email-ehabkost@redhat.com> <87a8ic5n06.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a8ic5n06.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v2 10/10] machine: Skip global registration for non-existing classes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Igor Mammedov On Thu, Jun 23, 2016 at 10:26:49AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > MachineClass::compat_props may point to class names that are not > > compiled into the QEMU binary. Skip registering those as global > > properties. This will allow the qdev global property code to > > implement stricter checks on the global property values in the > > future. > > > > Signed-off-by: Eduardo Habkost > > Not sure what those stricter checks might be, but that's okay. I would like to make qdev_prop_register_global() validate the class and property names. It should be doable for the !cannot_destroy_with_object_finalize_yet classes. Maybe even the property value could be validated by actually setting the property in a temporary object, but I am not looking forward to audit every single property setter in QEMU to ensure this is safe. -- Eduardo