From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaMxh-0005xk-KQ for qemu-devel@nongnu.org; Sat, 13 Jan 2018 09:39:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaMxc-0007aw-Mu for qemu-devel@nongnu.org; Sat, 13 Jan 2018 09:39:09 -0500 Received: from mail-ot0-x236.google.com ([2607:f8b0:4003:c0f::236]:35178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eaMxc-0007ak-IK for qemu-devel@nongnu.org; Sat, 13 Jan 2018 09:39:04 -0500 Received: by mail-ot0-x236.google.com with SMTP id 53so7377344otj.2 for ; Sat, 13 Jan 2018 06:39:04 -0800 (PST) Sender: Corey Minyard Reply-To: minyard@acm.org References: <1512682213-4354-1-git-send-email-minyard@acm.org> <1512682213-4354-7-git-send-email-minyard@acm.org> From: Corey Minyard Message-ID: <7d0d484e-2ff2-11cc-8119-8d8586ac04e7@acm.org> Date: Sat, 13 Jan 2018 08:38:59 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Qemu-devel] [PATCH 6/8] vl.c: disallow command line fw cfg without opt/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Cc: QEMU , Corey Minyard , "Michael S. Tsirkin" On 01/12/2018 11:06 AM, Marc-André Lureau wrote: > Hi > > On Thu, Dec 7, 2017 at 10:30 PM, wrote: >> From: "Michael S. Tsirkin" >> >> 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. >> > Why is this part of a IPMI series? It's been so long I don't remember any more.  I think I suggested a simpler fix when Michael posted his, and it ended up in my queue, because at one point the IPMI code was messing around in fw_cfg.  But you are right, it doesn't belong here. > There was a lengthy discussion on this patch earlier, could you > summarize the conclusion? I think there was no conclusion.  This patch should just be dropped. Thanks for this and your other comments. -corey > > thanks > >> Signed-off-by: Michael S. Tsirkin >> [Change "warning" to "error" in the error report.] >> Signed-off-by: Corey Minyard >> --- >> vl.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/vl.c b/vl.c >> index 1ad1c04..fae9300 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -2400,8 +2400,9 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp) >> return -1; >> } >> if (strncmp(name, "opt/", 4) != 0) { >> - warn_report("externally provided fw_cfg item names " >> - "should be prefixed with \"opt/\""); >> + error_report("error: externally provided fw_cfg item names " >> + "should be prefixed with \"opt/\""); >> + return -1; >> } >> if (nonempty_str(str)) { >> size = strlen(str); /* NUL terminator NOT included in fw_cfg blob */ >> -- >> 2.7.4 >> >> > >