Skip to contentSkip to conversation

cryptoapi 2.5->2.4 backport

DISCUSSION Frank Cusack 2 participants 2 messages Jun 13, 2003

lore
Share & tools
lore
#0 lore raw

Any problem with just changing crypto/cipher.c:

    enum km_type crypto_km_types[] = {
            KM_USER0,
            KM_USER1,
            KM_SOFTIRQ0,
            KM_SOFTIRQ1,
    };

to

    enum km_type crypto_km_types[] = {
            KM_USER0,
            KM_USER1,
            KM_USER0,
            KM_USER1,
    };

?

(or the equivalent change in crypto/internal.h)

static inline enum km_type crypto_kmap_type(int out)

{
        return crypto_km_types[(in_softirq() ? 2 : 0) + out];
}

static inline void *crypto_kmap(struct page *page, int out)

{
        return kmap_atomic(page, crypto_kmap_type(out));
}

thanks
/fc

#1 lore raw
Quoted 11 lines · Frank Cusack

Any problem with just changing crypto/cipher.c:

    enum km_type crypto_km_types[] = {
            KM_USER0,
            KM_USER1,
            KM_SOFTIRQ0,
            KM_SOFTIRQ1,
    };

to

Quoted 8 lines
    enum km_type crypto_km_types[] = {
            KM_USER0,
            KM_USER1,
            KM_USER0,
            KM_USER1,
    };

?

Yes, the crypto calls can run in user and softirq context.

Which backport is this?

- James

Signature · 2 lines
James Morris
<[email protected]>