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]
Date:   Wed, 5 Jun 2019 14:32:19 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     dsterba@...e.cz
Cc:     Maninder Singh <maninder1.s@...sung.com>,
        herbert@...dor.apana.org.au, davem@...emloft.net,
        keescook@...omium.org, gustavo@...eddedor.com, joe@...ches.com,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        a.sahrawat@...sung.com, pankaj.m@...sung.com, v.narang@...sung.com,
        Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        terrelln@...com
Subject: Re: [PATCH 1/4] zstd: pass pointer rathen than structure to
 functions

On Wed, 5 Jun 2019 14:32:53 +0200 David Sterba <dsterba@...e.cz> wrote:

> > >  
> > > -static ZSTD_parameters zstd_get_btrfs_parameters(unsigned int level,
> > > +static ZSTD_parameters *zstd_get_btrfs_parameters(unsigned int level,
> > >  						 size_t src_len)
> > >  {
> > > -	ZSTD_parameters params = ZSTD_getParams(level, src_len, 0);
> > > +	static ZSTD_parameters params;
> > 
> > > +
> > > +	params = ZSTD_getParams(level, src_len, 0);
> > 
> > No thats' broken, the params can't be static as it depends on level and
> > src_len. What happens if there are several requests in parallel with
> > eg. different levels?

I wondered.  I'll drop the patch series as some more serious thinking
is needed.

> > Would be really great if the mailinglist is CCed when the code is
> > changed in a non-trivial way.

Well we didn't actually change btrfs until I discovered that Maninder
had missed it.

> So this does not compile fs/btrfs/zstd.o which Andrew probably found
> too, otherwise btrfs is the only in-tree user of the function outside of
> lib/ and crypto/.

Worked for me - I might have sent the wrong version.

> I think that Nick Terrell should have been CCed too, as he ported zstd
> to linux.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ