qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	qemu-arm@nongnu.org, "Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Nabih Estefan" <nabihestefan@google.com>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH v2 04/14] Running with --enable-ubsan leads to a qtest failure
Date: Sat, 10 May 2025 13:27:18 +0900	[thread overview]
Message-ID: <005c8cfc-7a46-4350-af81-46112ad5eb9f@daynix.com> (raw)
In-Reply-To: <20250506125715.232872-5-alex.bennee@linaro.org>

I think the subject should tell what this patch does and perhaps the 
underlying problem it solves instead of the symptom. It may be nice to 
have a prefix "tests/qtest/libqos/igb:" to comply the convention.

On 2025/05/06 21:57, Alex Bennée wrote:
> From: Nabih Estefan <nabihestefan@google.com>
> 
>    ../tests/qtest/libqos/igb.c:106:5: runtime error: load of misaligned address 0x562040be8e33 for type 'uint32_t', which requires 4 byte alignment
> 
> Instead of straight casting the uint8_t array, we use use ldl_le_p and
> lduw_l_p to assure alignment is correct against uint32_t and uint16_t.

It does not assure an alignment is correct but instead performs an 
unaligned access.

> 
> Signed-off-by: Nabih Estefan <nabihestefan@google.com>
> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
> Tested-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20250429155621.2028198-1-nabihestefan@google.com>
> [AJB: fix commit message, remove unneeded casts]
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/qtest/libqos/igb.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qtest/libqos/igb.c b/tests/qtest/libqos/igb.c
> index f40c4ec4cd..7df9272069 100644
> --- a/tests/qtest/libqos/igb.c
> +++ b/tests/qtest/libqos/igb.c
> @@ -104,10 +104,10 @@ static void igb_pci_start_hw(QOSGraphObject *obj)
>       e1000e_macreg_write(&d->e1000e, E1000_RDT(0), 0);
>       e1000e_macreg_write(&d->e1000e, E1000_RDH(0), 0);
>       e1000e_macreg_write(&d->e1000e, E1000_RA,
> -                        le32_to_cpu(*(uint32_t *)address));
> +                        ldl_le_p(address));
>       e1000e_macreg_write(&d->e1000e, E1000_RA + 4,
>                           E1000_RAH_AV | E1000_RAH_POOL_1 |
> -                        le16_to_cpu(*(uint16_t *)(address + 4)));
> +                        lduw_le_p((address + 4)));

This line has are extra parentheses.

>   
>       /* Set supported receive descriptor mode */
>       e1000e_macreg_write(&d->e1000e,



  reply	other threads:[~2025-05-10  4:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 12:57 [PATCH v2 00/14] Maintainer updates for May (testing, plugins, virtio-gpu) Alex Bennée
2025-05-06 12:57 ` [PATCH v2 01/14] tests/docker: expose $HOME/.cache/qemu as docker volume Alex Bennée
2025-05-06 12:57 ` [PATCH v2 02/14] gitlab: disable debug info on CI builds Alex Bennée
2025-05-06 12:57 ` [PATCH v2 03/14] tests/tcg: make aarch64 boot.S handle different starting modes Alex Bennée
2025-05-10  4:21   ` Akihiko Odaki
2025-05-14 13:51     ` Alex Bennée
2025-05-06 12:57 ` [PATCH v2 04/14] Running with --enable-ubsan leads to a qtest failure Alex Bennée
2025-05-10  4:27   ` Akihiko Odaki [this message]
2025-05-06 12:57 ` [PATCH v2 05/14] contrib/plugins: add a scaling factor to the ips arg Alex Bennée
2025-05-10  4:42   ` Akihiko Odaki
2025-05-19 14:54     ` Alex Bennée
2025-05-19 23:24       ` Akihiko Odaki
2025-05-06 12:57 ` [PATCH v2 06/14] contrib/plugins: allow setting of instructions per quantum Alex Bennée
2025-05-10  4:45   ` Akihiko Odaki
2025-05-19 15:14     ` Alex Bennée
2025-05-06 12:57 ` [PATCH v2 07/14] MAINTAINERS: add myself to virtio-gpu for Odd Fixes Alex Bennée
2025-05-06 12:57 ` [PATCH v2 08/14] MAINTAINERS: add Akihiko and Dmitry as reviewers Alex Bennée
2025-05-06 12:57 ` [PATCH v2 09/14] hw/display: re-arrange memory region tracking Alex Bennée
2025-05-06 12:57 ` [PATCH v2 10/14] virtio-gpu: fix hang under TCG when unmapping blob Alex Bennée
2025-05-06 12:57 ` [PATCH v2 11/14] virtio-gpu: refactor async blob unmapping Alex Bennée
2025-05-06 12:57 ` [PATCH v2 12/14] ui/gtk-gl-area: Remove extra draw call in refresh Alex Bennée
2025-05-10  4:52   ` Akihiko Odaki
2025-05-10 12:12     ` Dmitry Osipenko
2025-05-11  4:47       ` Akihiko Odaki
2025-05-12 17:01         ` Kim, Dongwon
2025-05-18  4:56           ` Akihiko Odaki
2025-05-06 12:57 ` [PATCH v2 13/14] docs: Create a uniquelabel Sphinx extension Alex Bennée
2025-05-06 12:57 ` [PATCH v2 14/14] docs: Use uniquelabel in qemu-block-drivers.rst.inc 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=005c8cfc-7a46-4350-af81-46112ad5eb9f@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=david@redhat.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=erdnaxe@crans.org \
    --cc=farosas@suse.de \
    --cc=jsnow@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=ma.mandourr@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=nabihestefan@google.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).