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: <pj41zlsg8gxj4x.fsf@u68c7b5b1d2d758.ant.amazon.com>
Date:   Tue, 8 Dec 2020 20:11:42 +0200
From:   Shay Agroskin <shayagr@...zon.com>
To:     Alexander Duyck <alexander.duyck@...il.com>
CC:     <akiyano@...zon.com>, David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Netdev <netdev@...r.kernel.org>, <dwmw@...zon.com>,
        <zorik@...zon.com>, <matua@...zon.com>, <saeedb@...zon.com>,
        <msw@...zon.com>, <aliguori@...zon.com>, <nafea@...zon.com>,
        <gtzalik@...zon.com>, <netanel@...zon.com>, <alisaidi@...zon.com>,
        <benh@...zon.com>, <ndagan@...zon.com>,
        "Jubran, Samih" <sameehj@...zon.com>, Ido Segev <idose@...zon.com>,
        Igor Chauskin <igorch@...zon.com>
Subject: Re: [PATCH V4 net-next 3/9] net: ena: add explicit casting to
 variables


Alexander Duyck <alexander.duyck@...il.com> writes:

> On Fri, Dec 4, 2020 at 4:15 AM <akiyano@...zon.com> wrote:
>>
>> From: Arthur Kiyanovski <akiyano@...zon.com>
>>
>> This patch adds explicit casting to some implicit conversions 
>> in the ena
>> driver. The implicit conversions fail some of our static 
>> checkers that
>> search for accidental conversions in our driver.
>> Adding this cast won't affect the end results, and would sooth 
>> the
>> checkers.
>>
>> Signed-off-by: Ido Segev <idose@...zon.com>
>> Signed-off-by: Igor Chauskin <igorch@...zon.com>
>> Signed-off-by: Shay Agroskin <shayagr@...zon.com>
>> Signed-off-by: Arthur Kiyanovski <akiyano@...zon.com>
>> ---
>> ...
>> @@ -2712,7 +2712,7 @@ int ena_com_indirect_table_get(struct 
>> ena_com_dev *ena_dev, u32 *ind_tbl)
>>         u32 tbl_size;
>>         int i, rc;
>>
>> -       tbl_size = (1ULL << rss->tbl_log_size) *
>> +       tbl_size = (u32)(1ULL << rss->tbl_log_size) *
>>                 sizeof(struct ena_admin_rss_ind_table_entry);
>>
>>         rc = ena_com_get_feature_ex(ena_dev, &get_resp,
>
> For these last two why not make it 1u instead of 1ull for the 
> bit
> being shifted? At least that way you are not implying possible
> truncation in the conversion.

We decided to remove this conversion from the patch altogether. We 
might do something different in the future to achieve the same 
result. Thanks for your comment

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ