/lib/crypto/ |
D | utils.c | 17 void __crypto_xor(u8 *dst, const u8 *src1, const u8 *src2, unsigned int len) in __crypto_xor() argument 23 int d = (((unsigned long)dst ^ (unsigned long)src1) | in __crypto_xor() 24 ((unsigned long)dst ^ (unsigned long)src2)) & in __crypto_xor() 35 while (((unsigned long)dst & (relalign - 1)) && len > 0) { in __crypto_xor() 36 *dst++ = *src1++ ^ *src2++; in __crypto_xor() 45 put_unaligned(l, (u64 *)dst); in __crypto_xor() 47 *(u64 *)dst = *(u64 *)src1 ^ *(u64 *)src2; in __crypto_xor() 49 dst += 8; in __crypto_xor() 59 put_unaligned(l, (u32 *)dst); in __crypto_xor() 61 *(u32 *)dst = *(u32 *)src1 ^ *(u32 *)src2; in __crypto_xor() [all …]
|
D | libchacha.c | 15 void chacha_crypt_generic(u32 *state, u8 *dst, const u8 *src, in chacha_crypt_generic() argument 23 crypto_xor_cpy(dst, src, stream, CHACHA_BLOCK_SIZE); in chacha_crypt_generic() 25 dst += CHACHA_BLOCK_SIZE; in chacha_crypt_generic() 30 crypto_xor_cpy(dst, src, stream, bytes); in chacha_crypt_generic()
|
D | chacha20poly1305.c | 57 __chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, in __chacha20poly1305_encrypt() argument 74 chacha20_crypt(chacha_state, dst, src, src_len); in __chacha20poly1305_encrypt() 76 poly1305_update(&poly1305_state, dst, src_len); in __chacha20poly1305_encrypt() 84 poly1305_final(&poly1305_state, dst + src_len); in __chacha20poly1305_encrypt() 90 void chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, in chacha20poly1305_encrypt() argument 105 __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, chacha_state); in chacha20poly1305_encrypt() 112 void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, in xchacha20poly1305_encrypt() argument 120 __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, chacha_state); in xchacha20poly1305_encrypt() 125 __chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, in __chacha20poly1305_decrypt() argument 161 chacha20_crypt(chacha_state, dst, src, dst_len); in __chacha20poly1305_decrypt() [all …]
|
D | aesgcm.c | 16 static void aesgcm_encrypt_block(const struct crypto_aes_ctx *ctx, void *dst, in aesgcm_encrypt_block() argument 30 aes_encrypt(ctx, dst, src); in aesgcm_encrypt_block() 95 static void aesgcm_crypt(const struct aesgcm_ctx *ctx, u8 *dst, const u8 *src, in aesgcm_crypt() argument 111 crypto_xor_cpy(dst, src, buf, min(len, AES_BLOCK_SIZE)); in aesgcm_crypt() 113 dst += AES_BLOCK_SIZE; in aesgcm_crypt() 135 void aesgcm_encrypt(const struct aesgcm_ctx *ctx, u8 *dst, const u8 *src, in aesgcm_encrypt() argument 143 aesgcm_crypt(ctx, dst, src, crypt_len, ctr); in aesgcm_encrypt() 144 aesgcm_mac(ctx, dst, crypt_len, assoc, assoc_len, ctr, authtag); in aesgcm_encrypt() 165 bool __must_check aesgcm_decrypt(const struct aesgcm_ctx *ctx, u8 *dst, in aesgcm_decrypt() argument 180 aesgcm_crypt(ctx, dst, src, crypt_len, ctr); in aesgcm_decrypt()
|
/lib/zstd/common/ |
D | huf.h | 51 HUF_PUBLIC_API size_t HUF_compress(void* dst, size_t dstCapacity, 64 HUF_PUBLIC_API size_t HUF_decompress(void* dst, size_t originalSize, 83 HUF_PUBLIC_API size_t HUF_compress2 (void* dst, size_t dstCapacity, 92 HUF_PUBLIC_API size_t HUF_compress4X_wksp (void* dst, size_t dstCapacity, 154 size_t HUF_decompress4X1 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /*< sing… 156 size_t HUF_decompress4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /*< doub… 159 size_t HUF_decompress4X_DCtx (HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t… 160 size_t HUF_decompress4X_hufOnly(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size… 161 size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc,… 162 size_t HUF_decompress4X1_DCtx(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t… [all …]
|
D | zstd_internal.h | 162 static void ZSTD_copy8(void* dst, const void* src) { in ZSTD_copy8() argument 164 vst1_u8((uint8_t*)dst, vld1_u8((const uint8_t*)src)); in ZSTD_copy8() 166 ZSTD_memcpy(dst, src, 8); in ZSTD_copy8() 175 static void ZSTD_copy16(void* dst, const void* src) { in ZSTD_copy16() argument 177 vst1q_u8((uint8_t*)dst, vld1q_u8((const uint8_t*)src)); in ZSTD_copy16() 179 _mm_storeu_si128((__m128i*)dst, _mm_loadu_si128((const __m128i*)src)); in ZSTD_copy16() 181 ZSTD_memmove(dst, src, 16); in ZSTD_copy16() 186 ZSTD_memcpy(dst, copy16_buf, 16); in ZSTD_copy16() 208 void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length, ZSTD_overlap_e const ovtype) in ZSTD_wildcopy() argument 210 ptrdiff_t diff = (BYTE*)dst - (const BYTE*)src; in ZSTD_wildcopy() [all …]
|
D | fse_decompress.c | 232 void* dst, size_t maxDstSize, in FSE_decompress_usingDTable_generic() argument 236 BYTE* const ostart = (BYTE*) dst; in FSE_decompress_usingDTable_generic() 294 size_t FSE_decompress_usingDTable(void* dst, size_t originalSize, in FSE_decompress_usingDTable() argument 303 … if (fastMode) return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 1); in FSE_decompress_usingDTable() 304 return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 0); in FSE_decompress_usingDTable() 308 size_t FSE_decompress_wksp(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsign… in FSE_decompress_wksp() argument 310 …return FSE_decompress_wksp_bmi2(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize, /* … in FSE_decompress_wksp() 320 void* dst, size_t dstCapacity, in FSE_decompress_wksp_body() argument 356 …if (fastMode) return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, wksp->dtab… in FSE_decompress_wksp_body() 357 return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, wksp->dtable, 0); in FSE_decompress_wksp_body() [all …]
|
/lib/ |
D | string_helpers.c | 178 static bool unescape_space(char **src, char **dst) in unescape_space() argument 180 char *p = *dst, *q = *src; in unescape_space() 201 *dst += 1; in unescape_space() 206 static bool unescape_octal(char **src, char **dst) in unescape_octal() argument 208 char *p = *dst, *q = *src; in unescape_octal() 220 *dst += 1; in unescape_octal() 225 static bool unescape_hex(char **src, char **dst) in unescape_hex() argument 227 char *p = *dst, *q = *src; in unescape_hex() 244 *dst += 1; in unescape_hex() 249 static bool unescape_special(char **src, char **dst) in unescape_special() argument [all …]
|
D | strncpy_from_user.c | 16 #define IS_UNALIGNED(src, dst) 0 argument 18 #define IS_UNALIGNED(src, dst) \ argument 19 (((long) dst | (long) src) & (sizeof(long) - 1)) 28 static __always_inline long do_strncpy_from_user(char *dst, const char __user *src, in do_strncpy_from_user() argument 34 if (IS_UNALIGNED(src, dst)) in do_strncpy_from_user() 58 *(unsigned long *)(dst+res) = c & mask; in do_strncpy_from_user() 62 *(unsigned long *)(dst+res) = c; in do_strncpy_from_user() 73 dst[res] = c; in do_strncpy_from_user() 113 long strncpy_from_user(char *dst, const char __user *src, long count) in strncpy_from_user() argument 136 kasan_check_write(dst, count); in strncpy_from_user() [all …]
|
D | bitmap.c | 84 void __bitmap_complement(unsigned long *dst, const unsigned long *src, unsigned int bits) in __bitmap_complement() argument 88 dst[k] = ~src[k]; in __bitmap_complement() 103 void __bitmap_shift_right(unsigned long *dst, const unsigned long *src, in __bitmap_shift_right() argument 128 dst[k] = lower | upper; in __bitmap_shift_right() 131 memset(&dst[lim - off], 0, off*sizeof(unsigned long)); in __bitmap_shift_right() 148 void __bitmap_shift_left(unsigned long *dst, const unsigned long *src, in __bitmap_shift_left() argument 166 dst[k + off] = lower | upper; in __bitmap_shift_left() 169 memset(dst, 0, off*sizeof(unsigned long)); in __bitmap_shift_left() 210 void bitmap_cut(unsigned long *dst, const unsigned long *src, in bitmap_cut() argument 222 memmove(dst, src, len * sizeof(*dst)); in bitmap_cut() [all …]
|
D | iomap.c | 310 static inline void mmio_insb(const void __iomem *addr, u8 *dst, int count) in mmio_insb() argument 314 *dst = data; in mmio_insb() 315 dst++; in mmio_insb() 318 static inline void mmio_insw(const void __iomem *addr, u16 *dst, int count) in mmio_insw() argument 322 *dst = data; in mmio_insw() 323 dst++; in mmio_insw() 326 static inline void mmio_insl(const void __iomem *addr, u32 *dst, int count) in mmio_insl() argument 330 *dst = data; in mmio_insl() 331 dst++; in mmio_insl() 360 void ioread8_rep(const void __iomem *addr, void *dst, unsigned long count) in ioread8_rep() argument [all …]
|
D | iomap_copy.c | 23 u32 __iomem *dst = to; in __iowrite32_copy() local 28 __raw_writel(*src++, dst++); in __iowrite32_copy() 44 u32 *dst = to; in __ioread32_copy() local 49 *dst++ = __raw_readl(src++); in __ioread32_copy() 68 u64 __iomem *dst = to; in __iowrite64_copy() local 73 __raw_writeq(*src++, dst++); in __iowrite64_copy()
|
D | base64.c | 32 int base64_encode(const u8 *src, int srclen, char *dst) in base64_encode() argument 37 char *cp = dst; in base64_encode() 55 return cp - dst; in base64_encode() 73 int base64_decode(const char *src, int srclen, u8 *dst) in base64_decode() argument 78 u8 *bp = dst; in base64_decode() 101 return bp - dst; in base64_decode()
|
D | test_ubsan.c | 60 volatile char *dst, *src; in test_ubsan_load_invalid_value() local 66 dst = (char *)&val; in test_ubsan_load_invalid_value() 68 *dst = *src; in test_ubsan_load_invalid_value() 74 dst = (char *)&eval; in test_ubsan_load_invalid_value() 76 *dst = *src; in test_ubsan_load_invalid_value()
|
D | test-string_helpers.c | 542 char *dst; in test_string_upper_lower() local 549 dst = kmalloc(len, GFP_KERNEL); in test_string_upper_lower() 550 if (!dst) in test_string_upper_lower() 553 string_upper(dst, s); in test_string_upper_lower() 554 if (memcmp(dst, strings_upper[i].out, len)) { in test_string_upper_lower() 556 strings_upper[i].out, dst); in test_string_upper_lower() 557 kfree(dst); in test_string_upper_lower() 560 kfree(dst); in test_string_upper_lower() 567 dst = kmalloc(len, GFP_KERNEL); in test_string_upper_lower() 568 if (!dst) in test_string_upper_lower() [all …]
|
D | hexdump.c | 63 int hex2bin(u8 *dst, const char *src, size_t count) in hex2bin() argument 75 *dst++ = (hi << 4) | lo; in hex2bin() 87 char *bin2hex(char *dst, const void *src, size_t count) in bin2hex() argument 92 dst = hex_byte_pack(dst, *_src++); in bin2hex() 93 return dst; in bin2hex()
|
/lib/zstd/decompress/ |
D | huf_decompress.c | 88 void* dst, size_t dstSize, \ 92 return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ 96 void* dst, size_t dstSize, \ 100 return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ 103 static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ 107 return fn##_bmi2(dst, dstSize, cSrc, cSrcSize, DTable); \ 109 return fn##_default(dst, dstSize, cSrc, cSrcSize, DTable); \ 115 static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ 119 return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ 162 static size_t HUF_DecompressAsmArgs_init(HUF_DecompressAsmArgs* args, void* dst, size_t dstSize, vo… in HUF_DecompressAsmArgs_init() argument [all …]
|
D | zstd_decompress_block.c | 47 static void ZSTD_copy4(void* dst, const void* src) { ZSTD_memcpy(dst, src, 4); } in ZSTD_copy4() argument 73 static void ZSTD_allocateLiteralsBuffer(ZSTD_DCtx* dctx, void* const dst, const size_t dstCapacity,… in ZSTD_allocateLiteralsBuffer() argument 79 dctx->litBuffer = (BYTE*)dst + ZSTD_BLOCKSIZE_MAX + WILDCOPY_OVERLENGTH; in ZSTD_allocateLiteralsBuffer() 88 …dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize + ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OV… in ZSTD_allocateLiteralsBuffer() 93 dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize; in ZSTD_allocateLiteralsBuffer() 94 dctx->litBufferEnd = (BYTE*)dst + expectedWriteSize; in ZSTD_allocateLiteralsBuffer() 110 void* dst, size_t dstCapacity, const streaming_operation streaming); 121 void* dst, size_t dstCapacity, const streaming_operation streaming) in ZSTD_decodeLiteralsBlock() argument 166 RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); in ZSTD_decodeLiteralsBlock() 170 … ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 0); in ZSTD_decodeLiteralsBlock() [all …]
|
D | zstd_decompress.c | 561 ZSTDLIB_API size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, unsigned* magicVariant, in ZSTD_readSkippableFrame() argument 574 if (skippableContentSize > 0 && dst != NULL) in ZSTD_readSkippableFrame() 575 ZSTD_memcpy(dst, (const BYTE *)src + ZSTD_SKIPPABLEHEADERSIZE, skippableContentSize); in ZSTD_readSkippableFrame() 792 static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity, in ZSTD_copyRawBlock() argument 797 if (dst == NULL) { in ZSTD_copyRawBlock() 801 ZSTD_memmove(dst, src, srcSize); in ZSTD_copyRawBlock() 805 static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, in ZSTD_setRleBlock() argument 810 if (dst == NULL) { in ZSTD_setRleBlock() 814 ZSTD_memset(dst, b, regenSize); in ZSTD_setRleBlock() 832 void* dst, size_t dstCapacity, in ZSTD_decompressFrame() argument [all …]
|
/lib/lzo/ |
D | lzodefs.h | 22 #define COPY4(dst, src) \ argument 23 put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst)) 25 #define COPY8(dst, src) \ argument 26 put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst)) 28 #define COPY8(dst, src) \ argument 29 COPY4(dst, src); COPY4((dst) + 4, (src) + 4)
|
/lib/zstd/compress/ |
D | zstd_compress_literals.c | 16 size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_noCompressLiterals() argument 18 BYTE* const ostart = (BYTE*)dst; in ZSTD_noCompressLiterals() 43 size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSiz… in ZSTD_compressRleLiteralsBlock() argument 45 BYTE* const ostart = (BYTE*)dst; in ZSTD_compressRleLiteralsBlock() 73 void* dst, size_t dstCapacity, in ZSTD_compressLiterals() argument 81 BYTE* const ostart = (BYTE*)dst; in ZSTD_compressLiterals() 93 return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals() 98 if (srcSize <= minLitSize) return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals() 123 return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals() 127 return ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize); in ZSTD_compressLiterals()
|
D | huf_compress.c | 89 static size_t HUF_compressWeights(void* dst, size_t dstSize, const void* weightTable, size_t wtSize… in HUF_compressWeights() argument 91 BYTE* const ostart = (BYTE*) dst; in HUF_compressWeights() 169 size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, in HUF_writeCTable_wksp() argument 174 BYTE* op = (BYTE*)dst; in HUF_writeCTable_wksp() 210 size_t HUF_writeCTable (void* dst, size_t maxDstSize, in HUF_writeCTable() argument 214 …return HUF_writeCTable_wksp(dst, maxDstSize, CTable, maxSymbolValue, huffLog, &wksp, sizeof(wksp)); in HUF_writeCTable() 963 HUF_compress1X_usingCTable_internal_body(void* dst, size_t dstSize, in HUF_compress1X_usingCTable_internal_body() argument 970 BYTE* const ostart = (BYTE*)dst; in HUF_compress1X_usingCTable_internal_body() 1030 HUF_compress1X_usingCTable_internal_bmi2(void* dst, size_t dstSize, in HUF_compress1X_usingCTable_internal_bmi2() argument 1034 return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); in HUF_compress1X_usingCTable_internal_bmi2() [all …]
|
D | zstd_compress_literals.h | 17 size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize); 19 size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSiz… 25 void* dst, size_t dstCapacity,
|
D | zstd_compress_superblock.c | 44 void* dst, size_t dstSize, in ZSTD_compressSubBlock_literal() argument 49 BYTE* const ostart = (BYTE*)dst; in ZSTD_compressSubBlock_literal() 63 return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal() 66 return ZSTD_compressRleLiteralsBlock(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal() 91 return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal() 97 return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal() 164 void* dst, size_t dstCapacity, in ZSTD_compressSubBlock_sequences() argument 168 BYTE* const ostart = (BYTE*)dst; in ZSTD_compressSubBlock_sequences() 265 void* dst, size_t dstCapacity, in ZSTD_compressSubBlock() argument 271 BYTE* const ostart = (BYTE*)dst; in ZSTD_compressSubBlock() [all …]
|
/lib/lz4/ |
D | lz4defs.h | 150 #define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) argument 151 #define LZ4_memmove(dst, src, size) __builtin_memmove(dst, src, size) argument 153 static FORCE_INLINE void LZ4_copy8(void *dst, const void *src) in LZ4_copy8() argument 158 put_unaligned(a, (U64 *)dst); in LZ4_copy8() 163 put_unaligned(a, (U32 *)dst); in LZ4_copy8() 164 put_unaligned(b, (U32 *)dst + 1); in LZ4_copy8()
|