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: <CAMpxmJVbVWKaY5QuUFn9XxhJQ2-YFRTowk13_Lnt9kyQT=+-WQ@mail.gmail.com>
Date:   Wed, 12 Aug 2020 19:48:53 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Kent Gibson <warthog618@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v3 02/18] gpio: uapi: define uAPI v2

On Wed, Aug 12, 2020 at 3:55 AM Kent Gibson <warthog618@...il.com> wrote:
>
> On Tue, Aug 11, 2020 at 09:11:41PM +0200, Bartosz Golaszewski wrote:
> > On Sun, Aug 9, 2020 at 3:26 PM Kent Gibson <warthog618@...il.com> wrote:
> > >
> [snip]
> > >
> > > +/*
> > > + * Maximum number of requested lines.
> > > + *
> > > + * Must be no greater than 64 as bitmaps are limited to 64-bits, and a
> > > + * multiple of 2 to ensure 32/64-bit alignment of structs.
> > > + */
> > > +#define GPIO_V2_LINES_MAX 64
> > > +
> >
> > If we refer to bitmaps for which helpers are defined in
> > include/linux/bitmap.h then they're not limited to 64-bits. I'd just
> > say here that we want to fit into 64-bit integers for simplicity.
> >
>
> Strictly speaking, userspace doesn't know about include/linux/bitmap.h,
> but I'm happy to remove any ambiguity.
>
> Does this work for you?:
>
>  * Must be no greater than 64, as bitmaps are restricted here to 64-bits
>  * for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of
>  * structs.
>
> Cheers,
> Kent.

Yes, perfect.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ