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 v2] hw/misc: use extract64 instead of 1 << i
Date: Fri, 27 Dec 2024 12:37:02 +0000 [thread overview]
Message-ID: <87h66pl2tt.fsf@draig.linaro.org> (raw)
In-Reply-To: <20241227104618.2526-1-tsogomonian@astralinux.ru> (Tigran Sogomonian's message of "Fri, 27 Dec 2024 13:46:18 +0300")
Tigran Sogomonian <tsogomonian@astralinux.ru> writes:
> 1 << i is casted to uint64_t while bitwise and with val.
> So this value may become 0xffffffff80000000 but only
> 31th "start" bit is required.
> Use the bitfield extract() API instead.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Tigran Sogomonian <tsogomonian@astralinux.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-12-27 12:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 10:46 [PATCH v2] hw/misc: use extract64 instead of 1 << i Tigran Sogomonian
2024-12-27 12:37 ` Alex Bennée [this message]
2024-12-27 15:16 ` Richard Henderson
2025-02-04 12:20 ` Тигран Согомонян
2025-02-04 12:24 ` Тигран Согомонян
2025-03-11 12:56 ` Тигран Согомонян
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=87h66pl2tt.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.