From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2qQZ-0006js-1P for qemu-devel@nongnu.org; Tue, 27 Oct 2009 14:05:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2qQX-0006jG-TA for qemu-devel@nongnu.org; Tue, 27 Oct 2009 14:05:50 -0400 Received: from [199.232.76.173] (port=56212 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2qQX-0006jD-Ml for qemu-devel@nongnu.org; Tue, 27 Oct 2009 14:05:49 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:58287 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2qQX-0007I4-6s for qemu-devel@nongnu.org; Tue, 27 Oct 2009 14:05:49 -0400 Date: Tue, 27 Oct 2009 21:05:55 +0300 (MSK) From: malc Subject: Re: [Qemu-devel] [PATCH] Configurable block format whitelist In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , qemu-devel@nongnu.org On Tue, 27 Oct 2009, Markus Armbruster wrote: > We have code for a quite a few block formats. While I trust that all > of these formats are useful at least for some people in some > circumstances, some of them are of a kind that friends don't let > friends use in production. > > This patch provides an optional block format whitelist, default off. > If a whitelist is configured with --block-drv-whitelist, QEMU proper > can use only whitelisted formats. Other programs, like qemu-img, are > not affected. > > Drivers for formats off the whitelist still participate in format > probing, to ensure all programs probe exactly the same. Without that, > QEMU proper would be prone to treat images with a format off the > whitelist as raw when the image's format is probed. > [..snip..] > diff --git a/create_config b/create_config > index 30d0487..2f052ae 100755 > --- a/create_config > +++ b/create_config > @@ -26,6 +26,13 @@ case $line in > done > echo "" > ;; > + CONFIG_BDRV_WHITELIST=*) > + echo "#define CONFIG_BDRV_WHITELIST \\" > + for drv in ${line#*=}; do > + echo " \"${drv}\",\\" printf ' "%s", \' ${drv} feels less obfuscated [..snip..] -- mailto:av1474@comtv.ru