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]
Date:   Tue, 30 May 2023 16:39:32 -0700
From:   Song Liu <song@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Christoph Hellwig <hch@...radead.org>, linux-raid@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] md/raid5: Convert stripe_head's "dev" to flexible
 array member

On Tue, May 30, 2023 at 4:00 PM Kees Cook <keescook@...omium.org> wrote:
>
> On Tue, May 23, 2023 at 10:43:52AM -0700, Song Liu wrote:
> > On Mon, May 22, 2023 at 2:21 PM Kees Cook <keescook@...omium.org> wrote:
> > >
> > > Replace old-style 1-element array of "dev" in struct stripe_head with
> > > modern C99 flexible array. In the future, we can additionally annotate
> > > it with the run-time size, found in the "disks" member.
> > >
> > > Cc: Christoph Hellwig <hch@...radead.org>
> > > Cc: linux-raid@...r.kernel.org
> > > Signed-off-by: Kees Cook <keescook@...omium.org>
> > > ---
> > > It looks like this memory calculation:
> > >
> > >         memory = conf->min_nr_stripes * (sizeof(struct stripe_head) +
> > >                  max_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
> > >
> > > ... was already buggy (i.e. it included the single "dev" bytes in the
> > > result). However, I'm not entirely sure if that is the right analysis,
> > > since "dev" is not related to struct bio nor PAGE_SIZE?
> > >
> > > v1: https://lore.kernel.org/all/20230517233313.never.130-kees@kernel.org/
> > > v2: use new struct_size_t() helper from
> > >     https://lore.kernel.org/lkml/20230522211810.never.421-kees@kernel.org/
> >
> > LTGM. Thanks!
>
> Thanks!
>
> > I will hold this for a while until struct_size_t() merged.
>
> Since my tree will introduce struct_size_t(), I will just carry it
> there.

Sounds good! You can add

Acked-by: Song Liu <song@...nel.org>

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ