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:	Thu, 02 Apr 2009 14:30:10 +0200
From:	Andreas Robinson <andr345@...il.com>
To:	Nigel Cunningham <ncunningham@...a.org.au>
Cc:	Arjan van de Ven <arjan@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...or.com>, Alain Knaff <alain@...ff.lu>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] lib: add fast lzo decompressor

On Thu, 2009-04-02 at 10:40 +1100, Nigel Cunningham wrote:
> Sorry to jump in with a tangential issue, but I just noticed the
> thread
> and it reminded me of an issue :)
> 
> Should the lzo code used via cryptoapi (I believe it's the same stuff)
> be SMP safe? I've tried to use it work TuxOnIce and get image corruption
> (test kernel is 64 bit). The same code works fine if I tell it to use
> LZF (which comes with TuxOnIce), no compression or, IIRC, work single
> threaded.

Do you compress or decompress data through the crypto API?

Neither function modifies the input data and there are no static or
global variables in use, so there shouldn't be a problem there.

They do however modify the destination length argument.

But most importantly, each compressor thread needs a private work buffer
allocated through lzo_init() in crypto/lzo.c. So, if you use the crypto
API to compress and share the crypto_tfm struct among threads, that
would explain your breakage.

Cheers,
Andreas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ