From: Andreas Schwab <schwab@linux-m68k.org>
To: opensbi@lists.infradead.org
Subject: [PATCH] lib: sbi: Fix shift bug in sbi_system_reset
Date: Mon, 25 Dec 2023 10:48:35 +0100 [thread overview]
Message-ID: <87le9i8vf0.fsf@linux-m68k.org> (raw)
In-Reply-To: <CAAhSdy2J71KrU-Qb-Wo3AfoxGZ4jywVQo=xFWBR9PD_8pWEfXw@mail.gmail.com> (Anup Patel's message of "Mon, 25 Dec 2023 14:54:08 +0530")
On Dez 25 2023, Anup Patel wrote:
> If "cur_hartid < hbase + BITS_PER_LONG" then
> "1UL << (cur_hartid - hbase) == 0x0"
If cur_hartid - hbase < BITS_PER_LONG, then 1UL << (cur_hartid - hbase)
will not be 0. If cur_hartid - hbase >= BITS_PER_LONG, then 1UL <<
(cur_hartid - hbase) will overflow and be undefined.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2023-12-25 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 1:44 [PATCH] lib: sbi: Fix shift bug in sbi_system_reset Xiang W
2023-12-25 9:24 ` Anup Patel
2023-12-25 9:32 ` Xiang W
2023-12-25 9:48 ` Andreas Schwab [this message]
2023-12-25 16:09 ` Xiang W
2023-12-26 15:51 ` Anup Patel
2023-12-26 18:03 ` Samuel Holland
2023-12-27 1:54 ` Xiang W
2023-12-27 5:45 ` Anup Patel
2023-12-27 5:46 ` Anup Patel
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=87le9i8vf0.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=opensbi@lists.infradead.org \
/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.