[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environm

From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables
Date: Wed, 29 May 2019 16:44:28 +0200


On Wed, May 29, 2019 at 4:35 PM P J P <address@hidden> wrote:
> +-- On Wed, 29 May 2019, Marc-André Lureau wrote --+
> | assert() is good if it's a programming error: that is if it should never
> | happen at run-time. It's a decent way to document the code.
>   True; But terminating server because a user sent more input parameters does
> not sound good.
>   {"error": {"class": "GenericError", "desc": "Guest agent command failed,
>    error was 'Failed to execute child process \u201C/bin/ls\u201D
>   (Argument list too long)'"}}
> returning an error, as it does, is better IMO.

The error is handled before guest_exec_get_args(), isn't it?

> | >
> | > I think same limit will apply to commands coming via QAPIs as well?
> |
> | What do you mean? If the generated API is used internally by QEMU?
> | (it's not, but in this case there would be no limit)
> IIUC, the QAPIs could be used by external libraries/clients to send
> messages/commands to qemu/qemu-ga?

The qga commands are only called through QMP, afaik.


Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]