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: <CAG_fn=XwzkiMwEAA2P5T+JGpuF7tyC=uJi_urHc17-Y3d5rXxw@mail.gmail.com>
Date:   Thu, 9 Nov 2023 15:35:52 +0100
From:   Alexander Potapenko <glider@...gle.com>
To:     Alexander Lobakin <aleksander.lobakin@...el.com>
Cc:     catalin.marinas@....com, will@...nel.org, pcc@...gle.com,
        andreyknvl@...il.com, andriy.shevchenko@...ux.intel.com,
        linux@...musvillemoes.dk, yury.norov@...il.com,
        alexandru.elisei@....com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, eugenis@...gle.com,
        syednwaris@...il.com, william.gray@...aro.org
Subject: Re: [PATCH v11 2/2] lib/test_bitmap: add tests for bitmap_{read,write}()

On Thu, Nov 9, 2023 at 3:32 PM Alexander Lobakin
<aleksander.lobakin@...el.com> wrote:
>
> From: Alexander Potapenko <glider@...gle.com>
> Date: Thu, 9 Nov 2023 15:28:56 +0100
>
> >>
> >> Could we maybe rather extend __check_eq_uint to take ulongs? Doesn't
> >> seem like they differ a lot.
> >
> > We could redefine expect_eq_uint as:
> >
> > #define expect_eq_uint(x, y)           expect_eq_ulong((unsigned
> > int)(x), (unsigned int)(y))
>
> Do we need explicit casts here tho?

We do.
test_bitmap_arr64() passes u64 values to expect_eq_uint(), which
results in test failures.
We could add an explicit cast there instead, but I think it's more
natural to let the users rely on expect_eq_uint() taking uints.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ