From: cuigaosheng <cuigaosheng1@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
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 19:29:57 +0800 [thread overview]
Message-ID: <76e13f1a-6edc-b923-101c-e059005d180c@huawei.com> (raw)
In-Reply-To: <Y2DdQwVfU2jFjMRX@hirez.programming.kicks-ass.net>
> Same as to the other case; UBSAN is broken garbage, stop quoting it.
I have made patch v2 and submitted it, removed the UBSAN warning calltrace,
and merged the patch "x86/cpu: fix undefined behavior in bit shift for intel_detect_tlb"
with it. Thanks!
On 2022/11/1 16:48, Peter Zijlstra wrote:
> 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.
>
> .
prev parent reply other threads:[~2022-11-01 11:33 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
2022-11-01 11:29 ` cuigaosheng [this message]
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=76e13f1a-6edc-b923-101c-e059005d180c@huawei.com \
--to=cuigaosheng1@huawei.com \
--cc=Jason@zx2c4.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=chenyi.qiang@intel.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=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®