All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Tigran Sogomonian <tsogomonian@astralinux.ru>
Cc: peter.maydell@linaro.org,  qemu-arm@nongnu.org,
	 qemu-devel@nongnu.org, sdl.qemu@linuxtesting.org
Subject: Re: [PATCH] hw/misc: cast nand_getio value to uint64_t
Date: Thu, 26 Dec 2024 22:49:25 +0000	[thread overview]
Message-ID: <87msgikqkq.fsf@draig.linaro.org> (raw)
In-Reply-To: <20241226141626.28722-1-tsogomonian@astralinux.ru> (Tigran Sogomonian's message of "Thu, 26 Dec 2024 17:16:26 +0300")

Tigran Sogomonian <tsogomonian@astralinux.ru> writes:

> s->buswidth = nand_flash_ids[s->chip_id].width >> 3;
> <= 16 >> 3 <= 2.
> x <= s->ioaddr[offset] << (s->buswidth << 3)
> <= max_uint8_t << 16
> With x << 24 overflow is possible.
> Other cases are similar.
> Thus, need to cast return value to uint64_t.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Tigran Sogomonian <tsogomonian@astralinux.ru>

This code was removed in 192f75ad11 (hw/misc: Remove omap_gpmc)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

  reply	other threads:[~2024-12-26 22:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 14:16 [PATCH] hw/misc: cast nand_getio value to uint64_t Tigran Sogomonian
2024-12-26 22:49 ` Alex Bennée [this message]
2024-12-27 10:55   ` Тигран Согомонян
2025-01-06 11:32     ` Peter Maydell

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=87msgikqkq.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sdl.qemu@linuxtesting.org \
    --cc=tsogomonian@astralinux.ru \
    /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.