/linux-4.19.296/crypto/ |
D | blkcipher.c | 40 struct blkcipher_walk *walk); 42 struct blkcipher_walk *walk); 44 static inline void blkcipher_map_src(struct blkcipher_walk *walk) in blkcipher_map_src() argument 46 walk->src.virt.addr = scatterwalk_map(&walk->in); in blkcipher_map_src() 49 static inline void blkcipher_map_dst(struct blkcipher_walk *walk) in blkcipher_map_dst() argument 51 walk->dst.virt.addr = scatterwalk_map(&walk->out); in blkcipher_map_dst() 54 static inline void blkcipher_unmap_src(struct blkcipher_walk *walk) in blkcipher_unmap_src() argument 56 scatterwalk_unmap(walk->src.virt.addr); in blkcipher_unmap_src() 59 static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk) in blkcipher_unmap_dst() argument 61 scatterwalk_unmap(walk->dst.virt.addr); in blkcipher_unmap_dst() [all …]
|
D | skcipher.c | 47 static int skcipher_walk_next(struct skcipher_walk *walk); 49 static inline void skcipher_unmap(struct scatter_walk *walk, void *vaddr) in skcipher_unmap() argument 51 if (PageHighMem(scatterwalk_page(walk))) in skcipher_unmap() 55 static inline void *skcipher_map(struct scatter_walk *walk) in skcipher_map() argument 57 struct page *page = scatterwalk_page(walk); in skcipher_map() 60 offset_in_page(walk->offset); in skcipher_map() 63 static inline void skcipher_map_src(struct skcipher_walk *walk) in skcipher_map_src() argument 65 walk->src.virt.addr = skcipher_map(&walk->in); in skcipher_map_src() 68 static inline void skcipher_map_dst(struct skcipher_walk *walk) in skcipher_map_dst() argument 70 walk->dst.virt.addr = skcipher_map(&walk->out); in skcipher_map_dst() [all …]
|
D | ablkcipher.c | 45 void __ablkcipher_walk_complete(struct ablkcipher_walk *walk) in __ablkcipher_walk_complete() argument 49 list_for_each_entry_safe(p, tmp, &walk->buffers, entry) { in __ablkcipher_walk_complete() 57 static inline void ablkcipher_queue_write(struct ablkcipher_walk *walk, in ablkcipher_queue_write() argument 60 p->dst = walk->out; in ablkcipher_queue_write() 61 list_add_tail(&p->entry, &walk->buffers); in ablkcipher_queue_write() 74 static inline void ablkcipher_done_slow(struct ablkcipher_walk *walk, in ablkcipher_done_slow() argument 78 unsigned int len_this_page = scatterwalk_pagelen(&walk->out); in ablkcipher_done_slow() 82 scatterwalk_advance(&walk->out, n); in ablkcipher_done_slow() 86 scatterwalk_start(&walk->out, sg_next(walk->out.sg)); in ablkcipher_done_slow() 90 static inline void ablkcipher_done_fast(struct ablkcipher_walk *walk, in ablkcipher_done_fast() argument [all …]
|
D | cfb.c | 53 static void crypto_cfb_final(struct skcipher_walk *walk, in crypto_cfb_final() argument 59 u8 *src = walk->src.virt.addr; in crypto_cfb_final() 60 u8 *dst = walk->dst.virt.addr; in crypto_cfb_final() 61 u8 *iv = walk->iv; in crypto_cfb_final() 62 unsigned int nbytes = walk->nbytes; in crypto_cfb_final() 68 static int crypto_cfb_encrypt_segment(struct skcipher_walk *walk, in crypto_cfb_encrypt_segment() argument 72 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment() 73 u8 *src = walk->src.virt.addr; in crypto_cfb_encrypt_segment() 74 u8 *dst = walk->dst.virt.addr; in crypto_cfb_encrypt_segment() 75 u8 *iv = walk->iv; in crypto_cfb_encrypt_segment() [all …]
|
D | ahash.c | 45 static int hash_walk_next(struct crypto_hash_walk *walk) in hash_walk_next() argument 47 unsigned int alignmask = walk->alignmask; in hash_walk_next() 48 unsigned int offset = walk->offset; in hash_walk_next() 49 unsigned int nbytes = min(walk->entrylen, in hash_walk_next() 52 if (walk->flags & CRYPTO_ALG_ASYNC) in hash_walk_next() 53 walk->data = kmap(walk->pg); in hash_walk_next() 55 walk->data = kmap_atomic(walk->pg); in hash_walk_next() 56 walk->data += offset; in hash_walk_next() 65 walk->entrylen -= nbytes; in hash_walk_next() 69 static int hash_walk_new_entry(struct crypto_hash_walk *walk) in hash_walk_new_entry() argument [all …]
|
D | pcbc.c | 47 struct skcipher_walk *walk, in crypto_pcbc_encrypt_segment() argument 51 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment() 52 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_segment() 53 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_encrypt_segment() 54 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_segment() 69 struct skcipher_walk *walk, in crypto_pcbc_encrypt_inplace() argument 73 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace() 74 u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_inplace() 75 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_inplace() 95 struct skcipher_walk walk; in crypto_pcbc_encrypt() local [all …]
|
D | scatterwalk.c | 31 void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, in scatterwalk_copychunks() argument 35 unsigned int len_this_page = scatterwalk_pagelen(walk); in scatterwalk_copychunks() 42 vaddr = scatterwalk_map(walk); in scatterwalk_copychunks() 47 scatterwalk_advance(walk, len_this_page); in scatterwalk_copychunks() 55 scatterwalk_pagedone(walk, out & 1, 1); in scatterwalk_copychunks() 63 struct scatter_walk walk; in scatterwalk_map_and_copy() local 71 scatterwalk_start(&walk, sg); in scatterwalk_map_and_copy() 72 scatterwalk_copychunks(buf, &walk, nbytes, out); in scatterwalk_map_and_copy() 73 scatterwalk_done(&walk, out, 0); in scatterwalk_map_and_copy()
|
D | chacha20_generic.c | 80 struct skcipher_walk walk; in crypto_chacha20_crypt() local 84 err = skcipher_walk_virt(&walk, req, true); in crypto_chacha20_crypt() 86 crypto_chacha20_init(state, ctx, walk.iv); in crypto_chacha20_crypt() 88 while (walk.nbytes > 0) { in crypto_chacha20_crypt() 89 unsigned int nbytes = walk.nbytes; in crypto_chacha20_crypt() 91 if (nbytes < walk.total) in crypto_chacha20_crypt() 92 nbytes = round_down(nbytes, walk.stride); in crypto_chacha20_crypt() 94 chacha20_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, in crypto_chacha20_crypt() 96 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in crypto_chacha20_crypt()
|
D | ctr.c | 55 static void crypto_ctr_crypt_final(struct blkcipher_walk *walk, in crypto_ctr_crypt_final() argument 60 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_final() 63 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_final() 64 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_final() 65 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_final() 73 static int crypto_ctr_crypt_segment(struct blkcipher_walk *walk, in crypto_ctr_crypt_segment() argument 79 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_segment() 80 u8 *src = walk->src.virt.addr; in crypto_ctr_crypt_segment() 81 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_segment() 82 unsigned int nbytes = walk->nbytes; in crypto_ctr_crypt_segment() [all …]
|
D | ecb.c | 42 struct blkcipher_walk *walk, in crypto_ecb_crypt() argument 50 err = blkcipher_walk_virt(desc, walk); in crypto_ecb_crypt() 52 while ((nbytes = walk->nbytes)) { in crypto_ecb_crypt() 53 u8 *wsrc = walk->src.virt.addr; in crypto_ecb_crypt() 54 u8 *wdst = walk->dst.virt.addr; in crypto_ecb_crypt() 63 err = blkcipher_walk_done(desc, walk, nbytes); in crypto_ecb_crypt() 73 struct blkcipher_walk walk; in crypto_ecb_encrypt() local 78 blkcipher_walk_init(&walk, dst, src, nbytes); in crypto_ecb_encrypt() 79 return crypto_ecb_crypt(desc, &walk, child, in crypto_ecb_encrypt() 87 struct blkcipher_walk walk; in crypto_ecb_decrypt() local [all …]
|
D | crypto_null.c | 81 struct blkcipher_walk walk; in skcipher_null_crypt() local 84 blkcipher_walk_init(&walk, dst, src, nbytes); in skcipher_null_crypt() 85 err = blkcipher_walk_virt(desc, &walk); in skcipher_null_crypt() 87 while (walk.nbytes) { in skcipher_null_crypt() 88 if (walk.src.virt.addr != walk.dst.virt.addr) in skcipher_null_crypt() 89 memcpy(walk.dst.virt.addr, walk.src.virt.addr, in skcipher_null_crypt() 90 walk.nbytes); in skcipher_null_crypt() 91 err = blkcipher_walk_done(desc, &walk, 0); in skcipher_null_crypt()
|
D | arc4.c | 99 struct blkcipher_walk walk; in ecb_arc4_crypt() local 102 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_arc4_crypt() 104 err = blkcipher_walk_virt(desc, &walk); in ecb_arc4_crypt() 106 while (walk.nbytes > 0) { in ecb_arc4_crypt() 107 u8 *wsrc = walk.src.virt.addr; in ecb_arc4_crypt() 108 u8 *wdst = walk.dst.virt.addr; in ecb_arc4_crypt() 110 arc4_crypt(ctx, wdst, wsrc, walk.nbytes); in ecb_arc4_crypt() 112 err = blkcipher_walk_done(desc, &walk, 0); in ecb_arc4_crypt()
|
D | aegis128.c | 40 int (*skcipher_walk_init)(struct skcipher_walk *walk, 247 struct scatter_walk walk; in crypto_aegis128_process_ad() local 251 scatterwalk_start(&walk, sg_src); in crypto_aegis128_process_ad() 253 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis128_process_ad() 255 void *mapped = scatterwalk_map(&walk); in crypto_aegis128_process_ad() 278 scatterwalk_advance(&walk, size); in crypto_aegis128_process_ad() 279 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis128_process_ad() 292 struct skcipher_walk walk; in crypto_aegis128_process_crypt() local 294 ops->skcipher_walk_init(&walk, req, false); in crypto_aegis128_process_crypt() 296 while (walk.nbytes) { in crypto_aegis128_process_crypt() [all …]
|
D | salsa20_generic.c | 158 struct skcipher_walk walk; in salsa20_crypt() local 162 err = skcipher_walk_virt(&walk, req, true); in salsa20_crypt() 166 while (walk.nbytes > 0) { in salsa20_crypt() 167 unsigned int nbytes = walk.nbytes; in salsa20_crypt() 169 if (nbytes < walk.total) in salsa20_crypt() 170 nbytes = round_down(nbytes, walk.stride); in salsa20_crypt() 172 salsa20_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, in salsa20_crypt() 174 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in salsa20_crypt()
|
D | aegis256.c | 40 int (*skcipher_walk_init)(struct skcipher_walk *walk, 260 struct scatter_walk walk; in crypto_aegis256_process_ad() local 264 scatterwalk_start(&walk, sg_src); in crypto_aegis256_process_ad() 266 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis256_process_ad() 268 void *mapped = scatterwalk_map(&walk); in crypto_aegis256_process_ad() 291 scatterwalk_advance(&walk, size); in crypto_aegis256_process_ad() 292 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis256_process_ad() 305 struct skcipher_walk walk; in crypto_aegis256_process_crypt() local 307 ops->skcipher_walk_init(&walk, req, false); in crypto_aegis256_process_crypt() 309 while (walk.nbytes) { in crypto_aegis256_process_crypt() [all …]
|
D | morus640.c | 48 int (*skcipher_walk_init)(struct skcipher_walk *walk, 316 struct scatter_walk walk; in crypto_morus640_process_ad() local 321 scatterwalk_start(&walk, sg_src); in crypto_morus640_process_ad() 323 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_morus640_process_ad() 325 void *mapped = scatterwalk_map(&walk); in crypto_morus640_process_ad() 351 scatterwalk_advance(&walk, size); in crypto_morus640_process_ad() 352 scatterwalk_done(&walk, 0, assoclen); in crypto_morus640_process_ad() 367 struct skcipher_walk walk; in crypto_morus640_process_crypt() local 369 ops->skcipher_walk_init(&walk, req, false); in crypto_morus640_process_crypt() 371 while (walk.nbytes) { in crypto_morus640_process_crypt() [all …]
|
D | aegis128l.c | 47 int (*skcipher_walk_init)(struct skcipher_walk *walk, 310 struct scatter_walk walk; in crypto_aegis128l_process_ad() local 314 scatterwalk_start(&walk, sg_src); in crypto_aegis128l_process_ad() 316 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis128l_process_ad() 318 void *mapped = scatterwalk_map(&walk); in crypto_aegis128l_process_ad() 341 scatterwalk_advance(&walk, size); in crypto_aegis128l_process_ad() 342 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis128l_process_ad() 355 struct skcipher_walk walk; in crypto_aegis128l_process_crypt() local 357 ops->skcipher_walk_init(&walk, req, false); in crypto_aegis128l_process_crypt() 359 while (walk.nbytes) { in crypto_aegis128l_process_crypt() [all …]
|
D | morus1280.c | 48 int (*skcipher_walk_init)(struct skcipher_walk *walk, 317 struct scatter_walk walk; in crypto_morus1280_process_ad() local 322 scatterwalk_start(&walk, sg_src); in crypto_morus1280_process_ad() 324 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_morus1280_process_ad() 326 void *mapped = scatterwalk_map(&walk); in crypto_morus1280_process_ad() 352 scatterwalk_advance(&walk, size); in crypto_morus1280_process_ad() 353 scatterwalk_done(&walk, 0, assoclen); in crypto_morus1280_process_ad() 368 struct skcipher_walk walk; in crypto_morus1280_process_crypt() local 370 ops->skcipher_walk_init(&walk, req, false); in crypto_morus1280_process_crypt() 372 while (walk.nbytes) { in crypto_morus1280_process_crypt() [all …]
|
/linux-4.19.296/include/crypto/ |
D | scatterwalk.h | 33 static inline unsigned int scatterwalk_pagelen(struct scatter_walk *walk) in scatterwalk_pagelen() argument 35 unsigned int len = walk->sg->offset + walk->sg->length - walk->offset; in scatterwalk_pagelen() 36 unsigned int len_this_page = offset_in_page(~walk->offset) + 1; in scatterwalk_pagelen() 40 static inline unsigned int scatterwalk_clamp(struct scatter_walk *walk, in scatterwalk_clamp() argument 43 unsigned int len_this_page = scatterwalk_pagelen(walk); in scatterwalk_clamp() 47 static inline void scatterwalk_advance(struct scatter_walk *walk, in scatterwalk_advance() argument 50 walk->offset += nbytes; in scatterwalk_advance() 53 static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk, in scatterwalk_aligned() argument 56 return !(walk->offset & alignmask); in scatterwalk_aligned() 59 static inline struct page *scatterwalk_page(struct scatter_walk *walk) in scatterwalk_page() argument [all …]
|
D | cbc.h | 21 struct skcipher_walk *walk, struct crypto_skcipher *tfm, in crypto_cbc_encrypt_segment() argument 25 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_segment() 26 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_segment() 27 u8 *dst = walk->dst.virt.addr; in crypto_cbc_encrypt_segment() 28 u8 *iv = walk->iv; in crypto_cbc_encrypt_segment() 43 struct skcipher_walk *walk, struct crypto_skcipher *tfm, in crypto_cbc_encrypt_inplace() argument 47 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_inplace() 48 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_inplace() 49 u8 *iv = walk->iv; in crypto_cbc_encrypt_inplace() 59 memcpy(walk->iv, iv, bsize); in crypto_cbc_encrypt_inplace() [all …]
|
D | algapi.h | 241 struct blkcipher_walk *walk, int err); 243 struct blkcipher_walk *walk); 245 struct blkcipher_walk *walk); 247 struct blkcipher_walk *walk, 250 struct blkcipher_walk *walk, 255 struct ablkcipher_walk *walk, int err); 257 struct ablkcipher_walk *walk); 258 void __ablkcipher_walk_complete(struct ablkcipher_walk *walk); 326 static inline void blkcipher_walk_init(struct blkcipher_walk *walk, in blkcipher_walk_init() argument 331 walk->in.sg = src; in blkcipher_walk_init() [all …]
|
/linux-4.19.296/include/crypto/internal/ |
D | hash.h | 55 int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err); 57 struct crypto_hash_walk *walk); 59 struct crypto_hash_walk *walk); 61 static inline int crypto_ahash_walk_done(struct crypto_hash_walk *walk, in crypto_ahash_walk_done() argument 64 return crypto_hash_walk_done(walk, err); in crypto_ahash_walk_done() 67 static inline int crypto_hash_walk_last(struct crypto_hash_walk *walk) in crypto_hash_walk_last() argument 69 return !(walk->entrylen | walk->total); in crypto_hash_walk_last() 72 static inline int crypto_ahash_walk_last(struct crypto_hash_walk *walk) in crypto_ahash_walk_last() argument 74 return crypto_hash_walk_last(walk); in crypto_ahash_walk_last()
|
D | skcipher.h | 143 int skcipher_walk_done(struct skcipher_walk *walk, int err); 144 int skcipher_walk_virt(struct skcipher_walk *walk, 147 void skcipher_walk_atomise(struct skcipher_walk *walk); 148 int skcipher_walk_async(struct skcipher_walk *walk, 150 int skcipher_walk_aead(struct skcipher_walk *walk, struct aead_request *req, 152 int skcipher_walk_aead_encrypt(struct skcipher_walk *walk, 154 int skcipher_walk_aead_decrypt(struct skcipher_walk *walk, 156 void skcipher_walk_complete(struct skcipher_walk *walk, int err);
|
/linux-4.19.296/fs/proc/ |
D | task_mmu.c | 488 struct mm_walk *walk) in smaps_pte_hole() argument 490 struct mem_size_stats *mss = walk->private; in smaps_pte_hole() 493 walk->vma->vm_file->f_mapping, addr, end); in smaps_pte_hole() 500 struct mm_walk *walk) in smaps_pte_entry() argument 502 struct mem_size_stats *mss = walk->private; in smaps_pte_entry() 503 struct vm_area_struct *vma = walk->vma; in smaps_pte_entry() 552 struct mm_walk *walk) in smaps_pmd_entry() argument 554 struct mem_size_stats *mss = walk->private; in smaps_pmd_entry() 555 struct vm_area_struct *vma = walk->vma; in smaps_pmd_entry() 575 struct mm_walk *walk) in smaps_pmd_entry() argument [all …]
|
/linux-4.19.296/fs/ |
D | select.c | 860 struct poll_list *walk; in do_poll() local 863 for (walk = list; walk != NULL; walk = walk->next) { in do_poll() 866 pfd = walk->entries; in do_poll() 867 pfd_end = pfd + walk->len; in do_poll() 939 struct poll_list *walk = head; in do_sys_poll() local 947 walk->next = NULL; in do_sys_poll() 948 walk->len = len; in do_sys_poll() 952 if (copy_from_user(walk->entries, ufds + nfds-todo, in do_sys_poll() 953 sizeof(struct pollfd) * walk->len)) in do_sys_poll() 956 todo -= walk->len; in do_sys_poll() [all …]
|