From: Peter Zijlstra <peterz@infradead.org>
To: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
puwen@hygon.cn, TonyWWang-oc@zhaoxin.com, Jason@zx2c4.com,
hca@linux.ibm.com, mika.westerberg@linux.intel.com,
mario.limonciello@amd.com, tony.luck@intel.com,
andrew.cooper3@citrix.com, pawan.kumar.gupta@linux.intel.com,
rdunlap@infradead.org, jithu.joseph@intel.com,
chenyi.qiang@intel.com, rafael.j.wysocki@intel.com,
paulmck@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/cpu: replacing the open-coded shift with BIT(x)
Date: Tue, 1 Nov 2022 09:48:03 +0100 [thread overview]
Message-ID: <Y2DdQwVfU2jFjMRX@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20221101060945.722565-1-cuigaosheng1@huawei.com>
On Tue, Nov 01, 2022 at 02:09:45PM +0800, Gaosheng Cui wrote:
> Replace the open-coded shift with BIT(x) for x86_power to make the
> code a bit more self-documenting, and we will get a UBSAN issue in
> arch/x86/kernel/cpu/proc.c, fix it.
>
> The UBSAN warning calltrace like below:
>
> UBSAN: shift-out-of-bounds in arch/x86/kernel/cpu/proc.c:138:25
> left shift of 1 by 31 places cannot be represented in type 'int'
Same as to the other case; UBSAN is broken garbage, stop quoting it.
next prev parent reply other threads:[~2022-11-01 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 6:09 Gaosheng Cui
2022-11-01 8:48 ` Peter Zijlstra [this message]
2022-11-01 11:29 ` cuigaosheng
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=Y2DdQwVfU2jFjMRX@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Jason@zx2c4.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=chenyi.qiang@intel.com \
--cc=cuigaosheng1@huawei.com \
--cc=dave.hansen@linux.intel.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=jithu.joseph@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=puwen@hygon.cn \
--cc=rafael.j.wysocki@intel.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome