All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Luc Michel" <lmichel@kalray.eu>
Subject: Re: [PATCH 0/3] semihosting: Fix a few semihosting bugs
Date: Mon, 20 Oct 2025 16:03:26 +0100	[thread overview]
Message-ID: <871pmx8vk1.fsf@draig.linaro.org> (raw)
In-Reply-To: <20251017213529.998267-1-sean.anderson@linux.dev> (Sean Anderson's message of "Fri, 17 Oct 2025 17:35:26 -0400")

Sean Anderson <sean.anderson@linux.dev> writes:

> While discussing [1], it came to my attention that QEMU does not
> properly truncate/error SYS_FLEN on 32-bit systems.

TIL that semihostingfs was a thing!

> Fix this, and some
> other bugs with GDB File I/O that I found while working on this series.
> That said, GDB File I/O has been substantially broken for two years now,
> so it makes me wonder if anyone actually uses it!

I suspect this is at the upper end of things to use semihosting for as
its real purpose is to help bootstrap things on the barest of metal
until you have enough bits going to selfhost. In QEMU land it is a
convenient way to do host calls for test cases.

We don't have much actual testing of semihosting in the tree although I
do run Peter's semihosting tests from time to time:

  https://git.linaro.org/people/peter.maydell/semihosting-tests.git/

the tests do include flen() but obviously don't cover the extreme
filesize cases or overflow.

> It would certainly
> simplify the implementation if we didn't have to support it.

While semihosting does have the concept of optional extensions SYS_FLEN
is not one of them.

>
> [1] https://lore.kernel.org/u-boot/20251017195322.GF6688@bill-the-cat/T/#m493c42570d3103b8c606c5f50faeb78d27719de6
>
>
> Sean Anderson (3):
>   gdbstub: Fix %s formatting
>   semihosting: Fix GDB File-I/O FLEN
>   semihosting: Check for overflow in FLEN on 32-bit systems
>
>  gdbstub/syscalls.c            |  2 +-
>  semihosting/arm-compat-semi.c | 22 +++++++++++++++-------
>  2 files changed, 16 insertions(+), 8 deletions(-)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2025-10-20 15:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 21:35 [PATCH 0/3] semihosting: Fix a few semihosting bugs Sean Anderson
2025-10-17 21:35 ` [PATCH 1/3] gdbstub: Fix %s formatting Sean Anderson
2025-10-18  0:07   ` Richard Henderson
2025-10-20 15:05   ` Alex Bennée
2025-10-17 21:35 ` [PATCH 2/3] semihosting: Fix GDB File-I/O FLEN Sean Anderson
2025-10-20 16:25   ` Alex Bennée
2025-10-17 21:35 ` [PATCH 3/3] semihosting: Check for overflow in FLEN on 32-bit systems Sean Anderson
2025-10-18  7:21   ` Heinrich Schuchardt
2025-10-20 14:21     ` Sean Anderson
2025-10-20 15:33       ` Heinrich Schuchardt
2025-10-20 15:39         ` Sean Anderson
2025-10-20 16:33       ` Peter Maydell
2025-10-20 19:31         ` Sean Anderson
2025-10-20 15:03 ` Alex Bennée [this message]
2025-10-20 15:06   ` [PATCH 0/3] semihosting: Fix a few semihosting bugs Sean Anderson
2025-10-27 10:54 ` Alex Bennée
2025-10-31 10:31 ` Michael Tokarev
2025-10-31 11:44   ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871pmx8vk1.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=lmichel@kalray.eu \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sean.anderson@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.