Skip to contentSkip to conversation

HMAC broken on s390

DISCUSSION Jan Glauber 3 participants 4 messages Dec 3, 2007 – Dec 4, 2007 Crypto API

lore
Share & tools
lore
#0 lore raw

Hi Herbert,

commit 788fefa33b0b50581585925c53c230a36af35d0e in cryptodev breaks hmac on s390 du to the usage of sg_chain():

static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
struct scatterlist *sgl)
{

#ifndef ARCH_HAS_SG_CHAIN
        BUG();

#endif

ARCH_HAS_SG_CHAIN is false for s390 (and also for some other arch's).

What should we do with this?

Cheers,
Jan

maintainer
#1 lore raw
Quoted 8 lines · Jan Glauber

Hi Herbert,

commit 788fefa33b0b50581585925c53c230a36af35d0e in cryptodev breaks hmac on s390 du to the usage of sg_chain():

static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
struct scatterlist *sgl)
{

Quoted 7 lines
#ifndef ARCH_HAS_SG_CHAIN
        BUG();

#endif

ARCH_HAS_SG_CHAIN is false for s390 (and also for some other arch's).

What should we do with this?

Looks like we took a step backwards because the chaining I had before worked on all architectures :)

I suppose either we'll have to do our own chaining again or implement it for all architectures. I'll look into this.

Thanks,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 15 lines · Herbert Xu
Quoted 14 lines · Jan Glauber

Hi Herbert,

commit 788fefa33b0b50581585925c53c230a36af35d0e in cryptodev breaks hmac on s390 du to the usage of sg_chain():

static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
struct scatterlist *sgl)
{

#ifndef ARCH_HAS_SG_CHAIN
        BUG();

#endif

ARCH_HAS_SG_CHAIN is false for s390 (and also for some other arch's).

Quoted 7 lines
Quoted 1 line

What should we do with this?

Looks like we took a step backwards because the chaining I had before worked on all architectures :)

I suppose either we'll have to do our own chaining again or implement it for all architectures. I'll look into this.

You should continue to do your own chaining if it's a requirement for the driver/layer to function, until we get rid of ARCH_HAS_SG_CHAIN. That'll happen when all archs are converted.

So don't rely on scatterlist helping you with chaining just yet, sorry.

Signature · 1 line
Jens Axboe
maintainer
#3 lore raw
Quoted 4 lines · Jens Axboe

You should continue to do your own chaining if it's a requirement for the driver/layer to function, until we get rid of ARCH_HAS_SG_CHAIN. That'll happen when all archs are converted.

Thanks for the confirmation. I'll back out my conversion patch.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt