[PATCH v2 07/14] docs/emulation: expand warning about semihosting

Alex Bennée posted 14 patches 1 year ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Chris Wulff <crwulff@gmail.com>, Marek Vasut <marex@denx.de>, Peter Maydell <peter.maydell@linaro.org>, Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>
[PATCH v2 07/14] docs/emulation: expand warning about semihosting
Posted by Alex Bennée 1 year ago
A surprising feature of calls like SYS_READC is this can cause QEMU to
indefinitely block as there is no handling for EOF.

Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1963
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 docs/about/emulation.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst
index 0ad0b86f0d..a2eefe3f3f 100644
--- a/docs/about/emulation.rst
+++ b/docs/about/emulation.rst
@@ -129,8 +129,9 @@ causing most hypervisors to trap and fault on them.
 .. warning::
    Semihosting inherently bypasses any isolation there may be between
    the guest and the host. As a result a program using semihosting can
-   happily trash your host system. You should only ever run trusted
-   code with semihosting enabled.
+   happily trash your host system. Some semihosting calls (e.g.
+   ``SYS_READC``) can block execution indefinitely. You should only
+   ever run trusted code with semihosting enabled.
 
 Redirection
 ~~~~~~~~~~~
-- 
2.39.2


Re: [PATCH v2 07/14] docs/emulation: expand warning about semihosting
Posted by Richard Henderson 1 year ago
On 11/20/23 07:08, Alex Bennée wrote:
> A surprising feature of calls like SYS_READC is this can cause QEMU to
> indefinitely block as there is no handling for EOF.
> 
> Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1963
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   docs/about/emulation.rst | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst
> index 0ad0b86f0d..a2eefe3f3f 100644
> --- a/docs/about/emulation.rst
> +++ b/docs/about/emulation.rst
> @@ -129,8 +129,9 @@ causing most hypervisors to trap and fault on them.
>   .. warning::
>      Semihosting inherently bypasses any isolation there may be between
>      the guest and the host. As a result a program using semihosting can
> -   happily trash your host system. You should only ever run trusted
> -   code with semihosting enabled.
> +   happily trash your host system. Some semihosting calls (e.g.
> +   ``SYS_READC``) can block execution indefinitely. You should only
> +   ever run trusted code with semihosting enabled.
>   
>   Redirection
>   ~~~~~~~~~~~



Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~