lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e519b424-0a4b-34b1-c9e8-069c058f031f@arm.com>
Date:   Thu, 2 Nov 2023 09:35:18 +0000
From:   James Clark <james.clark@....com>
To:     Anshuman Khandual <anshuman.khandual@....com>,
        coresight@...ts.linaro.org, suzuki.poulose@....com
Cc:     stable@...r.kernel.org, Mike Leach <mike.leach@...aro.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coresight: etm4x: Fix width of CCITMIN field



On 02/11/2023 04:14, Anshuman Khandual wrote:
> 
> 
> On 10/30/23 15:59, James Clark wrote:
>> CCITMIN is a 12 bit field and doesn't fit in a u8, so extend it to u16.
>> This probably wasn't an issue previously because values higher than 255
>> never occurred.
>>
>> But since commit 0f55b43dedcd ("coresight: etm: Override TRCIDR3.CCITMIN
>> on errata affected cpus"), a comparison with 256 was done to enable the
>> errata, generating the following W=1 build error:
>>
>>    coresight-etm4x-core.c:1188:24: error: result of comparison of
>>    constant 256 with expression of type 'u8' (aka 'unsigned char') is
>>    always false [-Werror,-Wtautological-constant-out-of-range-compare]
>>
>>     if (drvdata->ccitmin == 256)
>>
>> Cc: stable@...r.kernel.org
>> Fixes: 54ff892b76c6 ("coresight: etm4x: splitting struct etmv4_drvdata")
>> Signed-off-by: James Clark <james.clark@....com>
>> ---
>>   drivers/hwtracing/coresight/coresight-etm4x.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
>> index 20e2e4cb7614..da17b6c49b0f 100644
>> --- a/drivers/hwtracing/coresight/coresight-etm4x.h
>> +++ b/drivers/hwtracing/coresight/coresight-etm4x.h
>> @@ -1036,7 +1036,7 @@ struct etmv4_drvdata {
>>   	u8				ctxid_size;
>>   	u8				vmid_size;
>>   	u8				ccsize;
>> -	u8				ccitmin;
>> +	u16				ccitmin;
>>   	u8				s_ex_level;
>>   	u8				ns_ex_level;
>>   	u8				q_support;
> 
> Thanks James, so this takes care of the Smatch static checker
> warning as reported by Dan Carpenter earlier.
> 

I didn't see that report, but it was in "[linux-next:master]
BUILD REGRESSION c503e3eec382ac708ee7adf874add37b77c5d312"

> Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ