mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: compress - Add pcomp interface
Date: Thu, 5 Feb 2009 17:24:51 +0100 (CET)	[thread overview]
Message-ID: <alpine.LRH.2.00.0902051703150.4290@vixen.sonytel.be> (raw)
In-Reply-To: <20090115030526.GA27726@gondor.apana.org.au>

	Hi Herbert,

On Thu, 15 Jan 2009, Herbert Xu wrote:
> On Wed, Jan 14, 2009 at 04:01:34PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 14 Jan 2009, Herbert Xu wrote:
> > > Also, this is something that we'll potentially export to user-space,
> > > so we need to ensure that it is invariant to word length.
> > > 
> > > So something like this would be good
> > > 
> > > 	int (*setup_comp)(struct crypto_pcomp *tfm, const void *params,
> > > 			  unsigned int length);
> > > 	int (*setup_decomp)(struct crypto_pcomp *tfm, const void *params,
> > > 			    unsigned int length);
> > 
> > I assume "length" is the size of the passed params, so the algorithms can
> > return -EINVAL if they're passed the wrong size?
> > 
> > > The actual parameters should be formatted using the netlink helpers
> > > (nla_*).  So each parameter that you want to set should show up as
> > > a netlink attribute.  If a paramter is absent then you'd just use
> > > the default, etc.
>
> > I assume "length" is the size of the passed params, so the algorithms can
> > return -EINVAL if they're passed the wrong size?
> 
> Well with the netlink parameters these can have variable lengths
> depending on how many parameters the user supplies.

How can this be exported to userspace?
How does this variable length parameter passing work? Do you have an example?
Nothing in crypto/ seems to already use nla_*?

> Ah yes because crypto_comp is one of the original types that's
> still built-in.  Because there are so few compression users and
> algorithms (exactly 3 if you include null compression), I think
> we can dispense with the compatibility stuff altogether since
> we'll likely rip out fairly soon anyway.
> 
> So just create the new type, readd deflate using the new type
> alongside the existing deflate algorithm.  The system is capable
> of supporting two algorithms of the same name with different types.

While the core of the crypto system supports two algorithms of the same name
with different types, the testmgr doesn't.

As I removed the backwards-compatility layer at your request, I'll use "zlib"
for the name of the new module. It's more flexible than the fixed "deflate"
one anyway.

Is this OK for you?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

  parent reply	other threads:[~2009-02-05 16:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 15:59 [PATCH/RFC 0/7] Partial (de)compression API Geert Uytterhoeven
2009-01-13 15:59 ` [PATCH] crypto: compress - Add pcomp interface Geert Uytterhoeven
2009-01-13 15:59   ` [PATCH] crypto: testmgr - Add support for the " Geert Uytterhoeven
2009-01-13 15:59     ` [PATCH] crypto: api - Add type init function to crypto_tfm Geert Uytterhoeven
2009-01-13 15:59       ` [PATCH] crypto: api - Export pcomp through comp Geert Uytterhoeven
2009-01-13 15:59         ` [PATCH] crypto: deflate - switch to pcomp Geert Uytterhoeven
2009-01-13 15:59           ` [PATCH] crypto: testmgr - swith deflate test " Geert Uytterhoeven
2009-01-13 15:59             ` [PATCH] squashfs: Make SquashFS 4 use the new pcomp crypto interface Geert Uytterhoeven
2009-01-14  3:16   ` [PATCH] crypto: compress - Add pcomp interface Herbert Xu
2009-01-14 15:01     ` Geert Uytterhoeven
2009-01-15  3:05       ` Herbert Xu
2009-01-15 10:54         ` Geert Uytterhoeven
2009-01-16  4:27           ` Herbert Xu
2009-02-05 16:24         ` Geert Uytterhoeven [this message]
2009-02-10  6:18           ` Herbert Xu
2009-02-12 15:19             ` Geert Uytterhoeven
2009-02-19  4:08               ` Herbert Xu
2009-02-19  9:12                 ` Geert Uytterhoeven
2009-02-19 10:42                   ` Herbert Xu
2009-02-23 17:32                     ` Geert Uytterhoeven
2009-02-25  2:56                       ` Herbert Xu
2009-02-25 13:26                         ` Geert Uytterhoeven
2009-01-14 16:45   ` Jaswinder Singh Rajput
2009-01-14 16:54     ` Geert Uytterhoeven
2009-01-14 17:08       ` Jaswinder Singh Rajput

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.00.0902051703150.4290@vixen.sonytel.be \
    --to=geert.uytterhoeven@sonycom.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®