From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afpRV-0000w8-4V for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:55:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afpRQ-0002Z0-PW for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:55:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afpRQ-0002YT-JM for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:55:20 -0400 Date: Tue, 15 Mar 2016 15:55:17 +0200 From: "Michael S. Tsirkin" Message-ID: <1458050002-27741-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] vl.c: disallow command line fw cfg without opt/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Gerd Hoffmann , Corey Minyard Allowing arbitary file names on command line is setting us up for failure: future guests will look for a specific QEMU-specified name and will get confused finding a user file there. Signed-off-by: Michael S. Tsirkin --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 7a28982..5654af6 100644 --- a/vl.c +++ b/vl.c @@ -2321,6 +2321,7 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp) if (strncmp(name, "opt/", 4) != 0) { - error_report("warning: externally provided fw_cfg item names " - "should be prefixed with \"opt/\""); + error_report("externally provided fw_cfg item names " + "must be prefixed with \"opt/\""); + return -1; } if (nonempty_str(str)) { size = strlen(str); /* NUL terminator NOT included in fw_cfg blob */ -- MST