/* * Common values for the Poly1305 algorithm */ #ifndef _CRYPTO_POLY1305_H #define _CRYPTO_POLY1305_H #include #include #define POLY1305_BLOCK_SIZE 16 #define POLY1305_KEY_SIZE 32 #define POLY1305_DIGEST_SIZE 16 struct poly1305_desc_ctx { /* key */ u32 r[5]; /* finalize key */ u32 s[4]; /* accumulator */ u32 h[5]; /* partial buffer */ u8 buf[POLY1305_BLOCK_SIZE]; /* bytes used in partial buffer */ unsigned int buflen; /* r key has been set */ bool rset; /* s key has been set */ bool sset; }; int crypto_poly1305_init(struct shash_desc *desc); int crypto_poly1305_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen); unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx, const u8 *src, unsigned int srclen); int crypto_poly1305_update(struct shash_desc *desc, const u8 *src, unsigned int srclen); int crypto_poly1305_final(struct shash_desc *desc, u8 *dst); #endif lect name='h' onchange='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2016-05-18 10:56:41 +1000
committerDave Chinner <david@fromorbit.com>2016-05-18 10:56:41 +1000
commit9bdd9bd69b826875531bb1b2efb6aeb8d70e6f72 (patch)
tree8cf9acecfa7280e4c3e43e116dc1f592665fa14b /Documentation/arm
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
xfs: buffer ->bi_end_io function requires irq-safe lock
Reports have surfaced of a lockdep splat complaining about an irq-safe -> irq-unsafe locking order in the xfs_buf_bio_end_io() bio completion handler. This only occurs when I/O errors are present because bp->b_lock is only acquired in this context to protect setting an error on the buffer. The problem is that this lock can be acquired with the (request_queue) q->queue_lock held. See scsi_end_request() or ata_qc_schedule_eh(), for example. Replace the locked test/set of b_io_error with a cmpxchg() call. This eliminates the need for the lock and thus the lock ordering problem goes away. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'Documentation/arm')