Received: from eggs.gnu.org ([2001:4830:134:3::10]:40979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG7QT-0004sw-3A for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG7QO-0007wy-3B for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:24:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG7QN-0007wt-T8 for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:24:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 61D2363163 for ; Thu, 23 Jun 2016 16:24:15 +0000 (UTC) From: Markus Armbruster 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> <20160623115502.GW2048@thinpad.lan.raisama.net> Date: Thu, 23 Jun 2016 18:24:13 +0200 In-Reply-To: <20160623115502.GW2048@thinpad.lan.raisama.net> (Eduardo Habkost's message of "Thu, 23 Jun 2016 08:55:02 -0300") Message-ID: <87lh1v27rm.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Eduardo Habkost Cc: Marcel Apfelbaum , Paolo Bonzini , qemu-devel@nongnu.org, Igor Mammedov Eduardo Habkost writes: > 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. Dynamically created types and properties --- the gift that keeps giving.