Loading drivers/char/random.c +0 −9 Original line number Original line Diff line number Diff line Loading @@ -1051,12 +1051,6 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) /* like a named pipe */ /* like a named pipe */ } } /* * If we gave the user some bytes, update the access time. */ if (count) file_accessed(file); return (count ? count : retval); return (count ? count : retval); } } Loading Loading @@ -1107,7 +1101,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) size_t count, loff_t *ppos) { { size_t ret; size_t ret; struct inode *inode = file->f_path.dentry->d_inode; ret = write_pool(&blocking_pool, buffer, count); ret = write_pool(&blocking_pool, buffer, count); if (ret) if (ret) Loading @@ -1116,8 +1109,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, if (ret) if (ret) return ret; return ret; inode->i_mtime = current_fs_time(inode->i_sb); mark_inode_dirty(inode); return (ssize_t)count; return (ssize_t)count; } } Loading drivers/crypto/padlock-sha.c +23 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,23 @@ static int padlock_sha_update(struct shash_desc *desc, return crypto_shash_update(&dctx->fallback, data, length); return crypto_shash_update(&dctx->fallback, data, length); } } static int padlock_sha_export(struct shash_desc *desc, void *out) { struct padlock_sha_desc *dctx = shash_desc_ctx(desc); return crypto_shash_export(&dctx->fallback, out); } static int padlock_sha_import(struct shash_desc *desc, const void *in) { struct padlock_sha_desc *dctx = shash_desc_ctx(desc); struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); dctx->fallback.tfm = ctx->fallback; dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; return crypto_shash_import(&dctx->fallback, in); } static inline void padlock_output_block(uint32_t *src, static inline void padlock_output_block(uint32_t *src, uint32_t *dst, size_t count) uint32_t *dst, size_t count) { { Loading Loading @@ -235,7 +252,10 @@ static struct shash_alg sha1_alg = { .update = padlock_sha_update, .update = padlock_sha_update, .finup = padlock_sha1_finup, .finup = padlock_sha1_finup, .final = padlock_sha1_final, .final = padlock_sha1_final, .export = padlock_sha_export, .import = padlock_sha_import, .descsize = sizeof(struct padlock_sha_desc), .descsize = sizeof(struct padlock_sha_desc), .statesize = sizeof(struct sha1_state), .base = { .base = { .cra_name = "sha1", .cra_name = "sha1", .cra_driver_name = "sha1-padlock", .cra_driver_name = "sha1-padlock", Loading @@ -256,7 +276,10 @@ static struct shash_alg sha256_alg = { .update = padlock_sha_update, .update = padlock_sha_update, .finup = padlock_sha256_finup, .finup = padlock_sha256_finup, .final = padlock_sha256_final, .final = padlock_sha256_final, .export = padlock_sha_export, .import = padlock_sha_import, .descsize = sizeof(struct padlock_sha_desc), .descsize = sizeof(struct padlock_sha_desc), .statesize = sizeof(struct sha256_state), .base = { .base = { .cra_name = "sha256", .cra_name = "sha256", .cra_driver_name = "sha256-padlock", .cra_driver_name = "sha256-padlock", Loading Loading
drivers/char/random.c +0 −9 Original line number Original line Diff line number Diff line Loading @@ -1051,12 +1051,6 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) /* like a named pipe */ /* like a named pipe */ } } /* * If we gave the user some bytes, update the access time. */ if (count) file_accessed(file); return (count ? count : retval); return (count ? count : retval); } } Loading Loading @@ -1107,7 +1101,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) size_t count, loff_t *ppos) { { size_t ret; size_t ret; struct inode *inode = file->f_path.dentry->d_inode; ret = write_pool(&blocking_pool, buffer, count); ret = write_pool(&blocking_pool, buffer, count); if (ret) if (ret) Loading @@ -1116,8 +1109,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, if (ret) if (ret) return ret; return ret; inode->i_mtime = current_fs_time(inode->i_sb); mark_inode_dirty(inode); return (ssize_t)count; return (ssize_t)count; } } Loading
drivers/crypto/padlock-sha.c +23 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,23 @@ static int padlock_sha_update(struct shash_desc *desc, return crypto_shash_update(&dctx->fallback, data, length); return crypto_shash_update(&dctx->fallback, data, length); } } static int padlock_sha_export(struct shash_desc *desc, void *out) { struct padlock_sha_desc *dctx = shash_desc_ctx(desc); return crypto_shash_export(&dctx->fallback, out); } static int padlock_sha_import(struct shash_desc *desc, const void *in) { struct padlock_sha_desc *dctx = shash_desc_ctx(desc); struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); dctx->fallback.tfm = ctx->fallback; dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; return crypto_shash_import(&dctx->fallback, in); } static inline void padlock_output_block(uint32_t *src, static inline void padlock_output_block(uint32_t *src, uint32_t *dst, size_t count) uint32_t *dst, size_t count) { { Loading Loading @@ -235,7 +252,10 @@ static struct shash_alg sha1_alg = { .update = padlock_sha_update, .update = padlock_sha_update, .finup = padlock_sha1_finup, .finup = padlock_sha1_finup, .final = padlock_sha1_final, .final = padlock_sha1_final, .export = padlock_sha_export, .import = padlock_sha_import, .descsize = sizeof(struct padlock_sha_desc), .descsize = sizeof(struct padlock_sha_desc), .statesize = sizeof(struct sha1_state), .base = { .base = { .cra_name = "sha1", .cra_name = "sha1", .cra_driver_name = "sha1-padlock", .cra_driver_name = "sha1-padlock", Loading @@ -256,7 +276,10 @@ static struct shash_alg sha256_alg = { .update = padlock_sha_update, .update = padlock_sha_update, .finup = padlock_sha256_finup, .finup = padlock_sha256_finup, .final = padlock_sha256_final, .final = padlock_sha256_final, .export = padlock_sha_export, .import = padlock_sha_import, .descsize = sizeof(struct padlock_sha_desc), .descsize = sizeof(struct padlock_sha_desc), .statesize = sizeof(struct sha256_state), .base = { .base = { .cra_name = "sha256", .cra_name = "sha256", .cra_driver_name = "sha256-padlock", .cra_driver_name = "sha256-padlock", Loading