[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <76e13f1a-6edc-b923-101c-e059005d180c@huawei.com>
Date: Tue, 1 Nov 2022 19:29:57 +0800
From: cuigaosheng <cuigaosheng1@...wei.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <x86@...nel.org>, <hpa@...or.com>,
<puwen@...on.cn>, <TonyWWang-oc@...oxin.com>, <Jason@...c4.com>,
<hca@...ux.ibm.com>, <mika.westerberg@...ux.intel.com>,
<mario.limonciello@....com>, <tony.luck@...el.com>,
<andrew.cooper3@...rix.com>, <pawan.kumar.gupta@...ux.intel.com>,
<rdunlap@...radead.org>, <jithu.joseph@...el.com>,
<chenyi.qiang@...el.com>, <rafael.j.wysocki@...el.com>,
<paulmck@...nel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/cpu: replacing the open-coded shift with BIT(x)
> 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.
>
> .
Powered by blists - more mailing lists