/linux-master/include/crypto/ |
H A D | scatterwalk.h | 29 static inline unsigned int scatterwalk_pagelen(struct scatter_walk *walk) argument 31 unsigned int len = walk->sg->offset + walk->sg->length - walk->offset; 32 unsigned int len_this_page = offset_in_page(~walk->offset) + 1; 36 static inline unsigned int scatterwalk_clamp(struct scatter_walk *walk, argument 39 unsigned int len_this_page = scatterwalk_pagelen(walk); 43 static inline void scatterwalk_advance(struct scatter_walk *walk, argument 46 walk->offset += nbytes; 49 static inline struct page *scatterwalk_page(struct scatter_walk *walk) argument 59 scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg) argument 66 scatterwalk_map(struct scatter_walk *walk) argument 72 scatterwalk_pagedone(struct scatter_walk *walk, int out, unsigned int more) argument 86 scatterwalk_done(struct scatter_walk *walk, int out, int more) argument [all...] |
H A D | ctr.h | 27 struct skcipher_walk walk; local 34 err = skcipher_walk_virt(&walk, req, false); 36 while (walk.nbytes > 0) { 37 u8 *dst = walk.dst.virt.addr; 38 u8 *src = walk.src.virt.addr; 39 int nbytes = walk.nbytes; 42 if (nbytes < walk.total) { 43 tail = walk.nbytes & (blocksize - 1); 50 fn(tfm, walk.iv, buf); 53 crypto_inc(walk [all...] |
/linux-master/drivers/gpu/drm/xe/ |
H A D | xe_pt_walk.h | 23 * struct xe_pt_walk - Embeddable struct for walk parameters 26 /** @ops: The walk ops used for the pagewalk */ 32 * changed during the walk. 47 * typedef xe_pt_entry_fn - gpu page-table-walk callback-function 56 * @action: The walk action to take upon return. See <linux/pagewalk.h>. 57 * @walk: The walk parameters. 63 struct xe_pt_walk *walk); 84 u64 addr, u64 end, struct xe_pt_walk *walk); 87 u64 addr, u64 end, struct xe_pt_walk *walk); 101 xe_pt_covers(u64 addr, u64 end, unsigned int level, const struct xe_pt_walk *walk) argument 121 xe_pt_num_entries(u64 addr, u64 end, unsigned int level, const struct xe_pt_walk *walk) argument 140 xe_pt_offset(u64 addr, unsigned int level, const struct xe_pt_walk *walk) argument [all...] |
H A D | xe_pt_walk.c | 9 * The utilities in this file are similar to the CPU page-table walk 28 const struct xe_pt_walk *walk) 30 u64 size = 1ull << walk->shifts[level]; 37 unsigned int level, const struct xe_pt_walk *walk) 41 /* Shared pt walk skips to the last pagetable */ 42 if (unlikely(walk->shared_pt_mode)) { 43 unsigned int shift = walk->shifts[level]; 61 * @parent: The root page table for walk start. 65 * @walk: Walk info. 67 * Similar to the CPU page-table walker, this is a helper to walk 27 xe_pt_addr_end(u64 addr, u64 end, unsigned int level, const struct xe_pt_walk *walk) argument 36 xe_pt_next(pgoff_t *offset, u64 *addr, u64 next, u64 end, unsigned int level, const struct xe_pt_walk *walk) argument 73 xe_pt_walk_range(struct xe_ptw *parent, unsigned int level, u64 addr, u64 end, struct xe_pt_walk *walk) argument 139 xe_pt_walk_shared(struct xe_ptw *parent, unsigned int level, u64 addr, u64 end, struct xe_pt_walk *walk) argument [all...] |
/linux-master/crypto/ |
H A D | skcipher.c | 49 static int skcipher_walk_next(struct skcipher_walk *walk); 51 static inline void skcipher_map_src(struct skcipher_walk *walk) argument 53 walk->src.virt.addr = scatterwalk_map(&walk->in); 56 static inline void skcipher_map_dst(struct skcipher_walk *walk) argument 58 walk->dst.virt.addr = scatterwalk_map(&walk->out); 61 static inline void skcipher_unmap_src(struct skcipher_walk *walk) argument 63 scatterwalk_unmap(walk->src.virt.addr); 66 static inline void skcipher_unmap_dst(struct skcipher_walk *walk) argument 71 skcipher_walk_gfp(struct skcipher_walk *walk) argument 111 skcipher_done_slow(struct skcipher_walk *walk, unsigned int bsize) argument 122 skcipher_walk_done(struct skcipher_walk *walk, int err) argument 199 skcipher_walk_complete(struct skcipher_walk *walk, int err) argument 235 skcipher_queue_write(struct skcipher_walk *walk, struct skcipher_walk_buffer *p) argument 242 skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize) argument 303 skcipher_next_copy(struct skcipher_walk *walk) argument 335 skcipher_next_fast(struct skcipher_walk *walk) argument 361 skcipher_walk_next(struct skcipher_walk *walk) argument 414 skcipher_copy_iv(struct skcipher_walk *walk) argument 449 skcipher_walk_first(struct skcipher_walk *walk) argument 466 skcipher_walk_skcipher(struct skcipher_walk *walk, struct skcipher_request *req) argument 499 skcipher_walk_virt(struct skcipher_walk *walk, struct skcipher_request *req, bool atomic) argument 516 skcipher_walk_async(struct skcipher_walk *walk, struct skcipher_request *req) argument 527 skcipher_walk_aead_common(struct skcipher_walk *walk, struct aead_request *req, bool atomic) argument 569 skcipher_walk_aead_encrypt(struct skcipher_walk *walk, struct aead_request *req, bool atomic) argument 578 skcipher_walk_aead_decrypt(struct skcipher_walk *walk, struct aead_request *req, bool atomic) argument [all...] |
H A D | pcbc.c | 21 struct skcipher_walk *walk, 25 unsigned int nbytes = walk->nbytes; 26 u8 *src = walk->src.virt.addr; 27 u8 *dst = walk->dst.virt.addr; 28 u8 * const iv = walk->iv; 43 struct skcipher_walk *walk, 47 unsigned int nbytes = walk->nbytes; 48 u8 *src = walk->src.virt.addr; 49 u8 * const iv = walk->iv; 68 struct skcipher_walk walk; local 20 crypto_pcbc_encrypt_segment(struct skcipher_request *req, struct skcipher_walk *walk, struct crypto_cipher *tfm) argument 42 crypto_pcbc_encrypt_inplace(struct skcipher_request *req, struct skcipher_walk *walk, struct crypto_cipher *tfm) argument 87 crypto_pcbc_decrypt_segment(struct skcipher_request *req, struct skcipher_walk *walk, struct crypto_cipher *tfm) argument 109 crypto_pcbc_decrypt_inplace(struct skcipher_request *req, struct skcipher_walk *walk, struct crypto_cipher *tfm) argument 135 struct skcipher_walk walk; local [all...] |
H A D | xctr.c | 34 static void crypto_xctr_crypt_final(struct skcipher_walk *walk, argument 38 const u8 *src = walk->src.virt.addr; 39 u8 *dst = walk->dst.virt.addr; 40 unsigned int nbytes = walk->nbytes; 43 crypto_xor(walk->iv, (u8 *)&ctr32, sizeof(ctr32)); 44 crypto_cipher_encrypt_one(tfm, keystream, walk->iv); 46 crypto_xor(walk->iv, (u8 *)&ctr32, sizeof(ctr32)); 49 static int crypto_xctr_crypt_segment(struct skcipher_walk *walk, argument 54 const u8 *src = walk->src.virt.addr; 55 u8 *dst = walk 74 crypto_xctr_crypt_inplace(struct skcipher_walk *walk, struct crypto_cipher *tfm, u32 byte_ctr) argument 104 struct skcipher_walk walk; local [all...] |
H A D | scatterwalk.c | 26 void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, argument 30 unsigned int len_this_page = scatterwalk_pagelen(walk); 37 vaddr = scatterwalk_map(walk); 42 scatterwalk_advance(walk, len_this_page); 50 scatterwalk_pagedone(walk, out & 1, 1); 58 struct scatter_walk walk; local 66 scatterwalk_start(&walk, sg); 67 scatterwalk_copychunks(buf, &walk, nbytes, out); 68 scatterwalk_done(&walk, out, 0);
|
/linux-master/mm/ |
H A D | pagewalk.c | 24 unsigned long end, struct mm_walk *walk) 26 const struct mm_walk_ops *ops = walk->ops; 30 err = ops->pte_entry(pte, addr, addr + PAGE_SIZE, walk); 42 struct mm_walk *walk) 48 if (walk->no_vma) { 53 * and CONFIG_EFI_PGT_DUMP efi_mm goes so far as to walk them. 55 if (walk->mm == &init_mm || addr >= TASK_SIZE) 60 err = walk_pte_range_inner(pte, addr, end, walk); 61 if (walk->mm != &init_mm && addr < TASK_SIZE) 65 pte = pte_offset_map_lock(walk 23 walk_pte_range_inner(pte_t *pte, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 41 walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 77 walk_hugepd_range(hugepd_t *phpd, unsigned long addr, unsigned long end, struct mm_walk *walk, int pdshift) argument 108 walk_hugepd_range(hugepd_t *phpd, unsigned long addr, unsigned long end, struct mm_walk *walk, int pdshift) argument 115 walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 177 walk_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 229 walk_p4d_range(pgd_t *pgd, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 264 walk_pgd_range(unsigned long addr, unsigned long end, struct mm_walk *walk) argument 309 walk_hugetlb_range(unsigned long addr, unsigned long end, struct mm_walk *walk) argument 338 walk_hugetlb_range(unsigned long addr, unsigned long end, struct mm_walk *walk) argument 352 walk_page_test(unsigned long start, unsigned long end, struct mm_walk *walk) argument 378 __walk_page_range(unsigned long start, unsigned long end, struct mm_walk *walk) argument 477 struct mm_walk walk = { local 553 struct mm_walk walk = { local 595 struct mm_walk walk = { local 615 struct mm_walk walk = { local 664 struct mm_walk walk = { local [all...] |
H A D | ptdump.c | 16 static inline int note_kasan_page_table(struct mm_walk *walk, argument 19 struct ptdump_state *st = walk->private; 23 walk->action = ACTION_CONTINUE; 30 unsigned long next, struct mm_walk *walk) 32 struct ptdump_state *st = walk->private; 38 return note_kasan_page_table(walk, addr); 46 walk->action = ACTION_CONTINUE; 53 unsigned long next, struct mm_walk *walk) 55 struct ptdump_state *st = walk->private; 61 return note_kasan_page_table(walk, add 29 ptdump_pgd_entry(pgd_t *pgd, unsigned long addr, unsigned long next, struct mm_walk *walk) argument 52 ptdump_p4d_entry(p4d_t *p4d, unsigned long addr, unsigned long next, struct mm_walk *walk) argument 75 ptdump_pud_entry(pud_t *pud, unsigned long addr, unsigned long next, struct mm_walk *walk) argument 98 ptdump_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next, struct mm_walk *walk) argument 119 ptdump_pte_entry(pte_t *pte, unsigned long addr, unsigned long next, struct mm_walk *walk) argument 133 ptdump_hole(unsigned long addr, unsigned long next, int depth, struct mm_walk *walk) argument [all...] |
H A D | mapping_dirty_helpers.c | 11 * struct wp_walk - Private struct for pagetable walk callbacks 29 * @walk: pagetable walk callback argument 35 struct mm_walk *walk) 37 struct wp_walk *wpwalk = walk->private; 41 pte_t old_pte = ptep_modify_prot_start(walk->vma, addr, pte); 44 ptep_modify_prot_commit(walk->vma, addr, pte, old_pte, ptent); 81 * @walk: pagetable walk callback argument 90 unsigned long end, struct mm_walk *walk) 34 wp_pte(pte_t *pte, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 89 clean_record_pte(pte_t *pte, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 126 wp_clean_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 148 wp_clean_pud_entry(pud_t *pud, unsigned long addr, unsigned long end, struct mm_walk *walk) argument 169 wp_clean_pre_vma(unsigned long start, unsigned long end, struct mm_walk *walk) argument 198 wp_clean_post_vma(struct mm_walk *walk) argument 218 wp_clean_test_walk(unsigned long start, unsigned long end, struct mm_walk *walk) argument [all...] |
/linux-master/arch/arm64/crypto/ |
H A D | aes-ce-ccm-glue.c | 140 struct scatter_walk walk; local 156 scatterwalk_start(&walk, req->src); 159 u32 n = scatterwalk_clamp(&walk, len); 163 scatterwalk_start(&walk, sg_next(walk.sg)); 164 n = scatterwalk_clamp(&walk, len); 166 p = scatterwalk_map(&walk); 174 scatterwalk_advance(&walk, n); 175 scatterwalk_done(&walk, 0, len); 183 struct skcipher_walk walk; local 250 struct skcipher_walk walk; local [all...] |
H A D | sm4-neon-glue.c | 38 struct skcipher_walk walk; local 42 err = skcipher_walk_virt(&walk, req, false); 44 while ((nbytes = walk.nbytes) > 0) { 45 const u8 *src = walk.src.virt.addr; 46 u8 *dst = walk.dst.virt.addr; 58 err = skcipher_walk_done(&walk, nbytes % SM4_BLOCK_SIZE); 84 struct skcipher_walk walk; local 88 err = skcipher_walk_virt(&walk, req, false); 90 while ((nbytes = walk.nbytes) > 0) { 91 const u8 *iv = walk 116 struct skcipher_walk walk; local 147 struct skcipher_walk walk; local [all...] |
H A D | aes-neonbs-glue.c | 100 struct skcipher_walk walk; local 103 err = skcipher_walk_virt(&walk, req, false); 105 while (walk.nbytes >= AES_BLOCK_SIZE) { 106 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; 108 if (walk.nbytes < walk.total) 110 walk.stride / AES_BLOCK_SIZE); 113 fn(walk.dst.virt.addr, walk.src.virt.addr, ctx->rk, 116 err = skcipher_walk_done(&walk, 160 struct skcipher_walk walk; local 183 struct skcipher_walk walk; local 211 struct skcipher_walk walk; local 286 struct skcipher_walk walk; local [all...] |
H A D | sm4-ce-ccm-glue.c | 97 struct scatter_walk walk; local 112 scatterwalk_start(&walk, req->src); 115 u32 n = scatterwalk_clamp(&walk, assoclen); 119 scatterwalk_start(&walk, sg_next(walk.sg)); 120 n = scatterwalk_clamp(&walk, assoclen); 123 p = ptr = scatterwalk_map(&walk); 125 scatterwalk_advance(&walk, n); 158 scatterwalk_done(&walk, 0, assoclen); 162 static int ccm_crypt(struct aead_request *req, struct skcipher_walk *walk, argument 218 struct skcipher_walk walk; local 247 struct skcipher_walk walk; local [all...] |
H A D | aes-glue.c | 184 struct skcipher_walk walk; local 187 err = skcipher_walk_virt(&walk, req, false); 189 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { 191 aes_ecb_encrypt(walk.dst.virt.addr, walk.src.virt.addr, 194 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); 204 struct skcipher_walk walk; local 207 err = skcipher_walk_virt(&walk, req, false); 209 while ((blocks = (walk 219 cbc_encrypt_walk(struct skcipher_request *req, struct skcipher_walk *walk) argument 239 struct skcipher_walk walk; local 248 cbc_decrypt_walk(struct skcipher_request *req, struct skcipher_walk *walk) argument 268 struct skcipher_walk walk; local 286 struct skcipher_walk walk; local 343 struct skcipher_walk walk; local 412 struct skcipher_walk walk; local 434 struct skcipher_walk walk; local 456 struct skcipher_walk walk; local 502 struct skcipher_walk walk; local 550 struct skcipher_walk walk; local 622 struct skcipher_walk walk; local [all...] |
/linux-master/include/linux/ |
H A D | pagewalk.h | 9 /* Locking requirement during a page walk. */ 13 /* vma will be write-locked during the walk */ 15 /* vma is expected to be already write-locked during the walk */ 45 * we walk over the current vma or not. Returning 0 means 46 * "do page table walk over the current vma", returning 47 * a negative value means "abort current page table walk 51 * @pre_vma: if set, called before starting walk on a non-null vma. 52 * @post_vma: if set, called after a walk on a non-null vma, provided 53 * that @pre_vma and the vma walk succeeded. 60 unsigned long next, struct mm_walk *walk); [all...] |
/linux-master/arch/x86/crypto/ |
H A D | sm4_aesni_avx_glue.c | 41 struct skcipher_walk walk; local 45 err = skcipher_walk_virt(&walk, req, false); 47 while ((nbytes = walk.nbytes) > 0) { 48 const u8 *src = walk.src.virt.addr; 49 u8 *dst = walk.dst.virt.addr; 67 err = skcipher_walk_done(&walk, nbytes); 95 struct skcipher_walk walk; local 99 err = skcipher_walk_virt(&walk, req, false); 101 while ((nbytes = walk.nbytes) > 0) { 102 const u8 *iv = walk 129 struct skcipher_walk walk; local 194 struct skcipher_walk walk; local [all...] |
H A D | ecb_cbc_helpers.h | 18 struct skcipher_walk walk; \ 19 int err = skcipher_walk_virt(&walk, (req), false); \ 20 while (walk.nbytes > 0) { \ 21 unsigned int nbytes = walk.nbytes; \ 24 const u8 *src = walk.src.virt.addr; \ 25 u8 *dst = walk.dst.virt.addr; \ 51 const u8 *__iv = walk.iv; \ 58 memcpy(walk.iv, __iv, __bsize); \ 72 crypto_xor(dst, walk.iv, __bsize); \ 73 memcpy(walk [all...] |
H A D | aesni-intel_glue.c | 294 struct skcipher_walk walk; local 298 err = skcipher_walk_virt(&walk, req, false); 300 while ((nbytes = walk.nbytes)) { 302 aesni_ecb_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr, 306 err = skcipher_walk_done(&walk, nbytes); 316 struct skcipher_walk walk; local 320 err = skcipher_walk_virt(&walk, req, false); 322 while ((nbytes = walk.nbytes)) { 324 aesni_ecb_dec(ctx, walk 338 struct skcipher_walk walk; local 360 struct skcipher_walk walk; local 386 struct skcipher_walk walk; local 442 struct skcipher_walk walk; local 513 struct skcipher_walk walk; local 562 struct skcipher_walk walk; local 677 struct skcipher_walk walk; local 907 struct skcipher_walk walk; local [all...] |
H A D | aegis128-aesni-glue.c | 60 int (*skcipher_walk_init)(struct skcipher_walk *walk, 73 struct scatter_walk walk; local 77 scatterwalk_start(&walk, sg_src); 79 unsigned int size = scatterwalk_clamp(&walk, assoclen); 81 void *mapped = scatterwalk_map(&walk); 107 scatterwalk_advance(&walk, size); 108 scatterwalk_done(&walk, 0, assoclen); 118 struct aegis_state *state, struct skcipher_walk *walk, 121 while (walk->nbytes >= AEGIS128_BLOCK_SIZE) { 123 round_down(walk 117 crypto_aegis128_aesni_process_crypt( struct aegis_state *state, struct skcipher_walk *walk, const struct aegis_crypt_ops *ops) argument 172 struct skcipher_walk walk; local [all...] |
/linux-master/arch/arm/crypto/ |
H A D | aes-ce-glue.c | 171 struct skcipher_walk walk; local 175 err = skcipher_walk_virt(&walk, req, false); 177 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { 179 ce_aes_ecb_encrypt(walk.dst.virt.addr, walk.src.virt.addr, 182 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); 191 struct skcipher_walk walk; local 195 err = skcipher_walk_virt(&walk, req, false); 197 while ((blocks = (walk 207 cbc_encrypt_walk(struct skcipher_request *req, struct skcipher_walk *walk) argument 228 struct skcipher_walk walk; local 237 cbc_decrypt_walk(struct skcipher_request *req, struct skcipher_walk *walk) argument 258 struct skcipher_walk walk; local 275 struct skcipher_walk walk; local 333 struct skcipher_walk walk; local 387 struct skcipher_walk walk; local 453 struct skcipher_walk walk; local 525 struct skcipher_walk walk; local [all...] |
/linux-master/arch/riscv/crypto/ |
H A D | chacha-riscv64-glue.c | 25 struct skcipher_walk walk; local 35 err = skcipher_walk_virt(&walk, req, false); 36 while (walk.nbytes) { 37 nbytes = walk.nbytes & ~(CHACHA_BLOCK_SIZE - 1); 38 tail_bytes = walk.nbytes & (CHACHA_BLOCK_SIZE - 1); 41 chacha20_zvkb(ctx->key, walk.src.virt.addr, 42 walk.dst.virt.addr, nbytes, iv); 45 if (walk.nbytes == walk.total && tail_bytes > 0) { 46 memcpy(block_buffer, walk [all...] |
H A D | aes-riscv64-glue.c | 139 struct skcipher_walk walk; local 143 err = skcipher_walk_virt(&walk, req, false); 144 while ((nbytes = walk.nbytes) != 0) { 147 aes_ecb_encrypt_zvkned(ctx, walk.src.virt.addr, 148 walk.dst.virt.addr, 151 aes_ecb_decrypt_zvkned(ctx, walk.src.virt.addr, 152 walk.dst.virt.addr, 155 err = skcipher_walk_done(&walk, nbytes & (AES_BLOCK_SIZE - 1)); 177 struct skcipher_walk walk; local 181 err = skcipher_walk_virt(&walk, re 220 struct skcipher_walk walk; local 282 struct skcipher_walk walk; local 362 struct skcipher_walk walk; local [all...] |
/linux-master/arch/powerpc/crypto/ |
H A D | aes_ctr.c | 70 struct skcipher_walk *walk) 72 u8 *ctrblk = walk->iv; 74 u8 *src = walk->src.virt.addr; 75 u8 *dst = walk->dst.virt.addr; 76 unsigned int nbytes = walk->nbytes; 94 struct skcipher_walk walk; local 106 ret = skcipher_walk_virt(&walk, req, false); 107 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { 111 aes_p8_ctr32_encrypt_blocks(walk.src.virt.addr, 112 walk 69 p8_aes_ctr_final(const struct p8_aes_ctr_ctx *ctx, struct skcipher_walk *walk) argument [all...] |