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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9r61Njar8tGDT+utWdPiQ3KtxKJHQd0JQGSHsdXenaW6Q@mail.gmail.com>
Date:   Wed, 19 Oct 2022 09:54:13 -0600
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Stanislaw Gruszka <stf_xl@...pl>
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Helmut Schaa <helmut.schaa@...glemail.com>,
        Kalle Valo <kvalo@...nel.org>
Subject: Re: [PATCH v2] wifi: rt2x00: use explicitly signed or unsigned types

On Wed, Oct 19, 2022 at 3:00 AM Stanislaw Gruszka <stf_xl@...pl> wrote:
>
> On Wed, Oct 19, 2022 at 02:14:17AM -0600, Jason A. Donenfeld wrote:
> > On some platforms, `char` is unsigned, but this driver, for the most
> > part, assumed it was signed. In other places, it uses `char` to mean an
> > unsigned number, but only in cases when the values are small. And in
> > still other places, `char` is used as a boolean. Put an end to this
> > confusion by declaring explicit types, depending on the context.
> >
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Cc: Stanislaw Gruszka <stf_xl@...pl>
> > Cc: Helmut Schaa <helmut.schaa@...glemail.com>
> > Cc: Kalle Valo <kvalo@...nel.org>
> > Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> <snip>
>
> > @@ -3406,14 +3406,14 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
> >               } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> >                          rt2x00_rt(rt2x00dev, RT5392) ||
> >                          rt2x00_rt(rt2x00dev, RT6352)) {
> > -                     static const char r59_non_bt[] = {0x8f, 0x8f,
> > +                     static const s8 r59_non_bt[] = {0x8f, 0x8f,
> >                               0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> >                               0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
> >
> >                       rt2800_rfcsr_write(rt2x00dev, 59,
> >                                          r59_non_bt[idx]);
> >               } else if (rt2x00_rt(rt2x00dev, RT5350)) {
> > -                     static const char r59_non_bt[] = {0x0b, 0x0b,
> > +                     static const s8 r59_non_bt[] = {0x0b, 0x0b,
> >                               0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a,
> >                               0x0a, 0x09, 0x08, 0x07, 0x07, 0x06};
>
> Please make those two tables u8 as well.

Nice catch. Will do.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ