/kernel/linux/linux-5.10/lib/ |
H A D | test_user_copy.c | 47 static int test_check_nonzero_user(char *kmem, char __user *umem, size_t size) in test_check_nonzero_user() argument 64 kmem += start; in test_check_nonzero_user() 81 memset(kmem, 0x0, size); in test_check_nonzero_user() 83 kmem[i] = 0xff; in test_check_nonzero_user() 85 kmem[i] = 0xff; in test_check_nonzero_user() 87 ret |= test(copy_to_user(umem, kmem, size), in test_check_nonzero_user() 94 int expected = is_zeroed(kmem + start, len); in test_check_nonzero_user() 105 static int test_copy_struct_from_user(char *kmem, char __user *umem, in test_copy_struct_from_user() argument 133 memset(kmem, 0x0, size); in test_copy_struct_from_user() 134 ret |= test(copy_struct_from_user(kmem, ksiz in test_copy_struct_from_user() 183 char *kmem; test_user_copy_init() local [all...] |
H A D | test_kasan_module.c | 22 char *kmem; in copy_user_test() local 27 kmem = kmalloc(size, GFP_KERNEL); in copy_user_test() 28 if (!kmem) in copy_user_test() 36 kfree(kmem); in copy_user_test() 41 unused = copy_from_user(kmem, usermem, size + 1 + OOB_TAG_OFF); in copy_user_test() 44 unused = copy_to_user(usermem, kmem, size + 1 + OOB_TAG_OFF); in copy_user_test() 47 unused = __copy_from_user(kmem, usermem, size + 1 + OOB_TAG_OFF); in copy_user_test() 50 unused = __copy_to_user(usermem, kmem, size + 1 + OOB_TAG_OFF); in copy_user_test() 53 unused = __copy_from_user_inatomic(kmem, usermem, size + 1 + OOB_TAG_OFF); in copy_user_test() 56 unused = __copy_to_user_inatomic(usermem, kmem, siz in copy_user_test() [all...] |
/kernel/linux/linux-6.6/lib/ |
H A D | test_user_copy.c | 47 static int test_check_nonzero_user(char *kmem, char __user *umem, size_t size) in test_check_nonzero_user() argument 64 kmem += start; in test_check_nonzero_user() 81 memset(kmem, 0x0, size); in test_check_nonzero_user() 83 kmem[i] = 0xff; in test_check_nonzero_user() 85 kmem[i] = 0xff; in test_check_nonzero_user() 87 ret |= test(copy_to_user(umem, kmem, size), in test_check_nonzero_user() 94 int expected = is_zeroed(kmem + start, len); in test_check_nonzero_user() 105 static int test_copy_struct_from_user(char *kmem, char __user *umem, in test_copy_struct_from_user() argument 133 memset(kmem, 0x0, size); in test_copy_struct_from_user() 134 ret |= test(copy_struct_from_user(kmem, ksiz in test_copy_struct_from_user() 183 char *kmem; test_user_copy_init() local [all...] |
/kernel/linux/linux-6.6/mm/kasan/ |
H A D | kasan_test_module.c | 20 char *kmem; in copy_user_test() local 25 kmem = kmalloc(size, GFP_KERNEL); in copy_user_test() 26 if (!kmem) in copy_user_test() 34 kfree(kmem); in copy_user_test() 41 unused = copy_from_user(kmem, usermem, size + 1); in copy_user_test() 44 unused = copy_to_user(usermem, kmem, size + 1); in copy_user_test() 47 unused = __copy_from_user(kmem, usermem, size + 1); in copy_user_test() 50 unused = __copy_to_user(usermem, kmem, size + 1); in copy_user_test() 53 unused = __copy_from_user_inatomic(kmem, usermem, size + 1); in copy_user_test() 56 unused = __copy_to_user_inatomic(usermem, kmem, siz in copy_user_test() [all...] |
/kernel/linux/linux-5.10/arch/x86/kernel/cpu/resctrl/ |
H A D | pseudo_lock.c | 247 kfree(plr->kmem); in pseudo_lock_region_clear() 248 plr->kmem = NULL; in pseudo_lock_region_clear() 362 plr->kmem = kzalloc(plr->size, GFP_KERNEL); in pseudo_lock_region_alloc() 363 if (!plr->kmem) { in pseudo_lock_region_alloc() 467 mem_r = plr->kmem; in pseudo_lock_fn() 883 mem_r = READ_ONCE(plr->kmem); in measure_cycles_lat_fn() 988 mem_r = READ_ONCE(plr->kmem); in measure_residency_fn() 1513 physical = __pa(plr->kmem) >> PAGE_SHIFT; in pseudo_lock_dev_mmap() 1535 memset(plr->kmem + off, 0, vsize); in pseudo_lock_dev_mmap()
|
H A D | internal.h | 172 * @kmem: the kernel memory associated with pseudo-locked region 188 void *kmem; member
|
/kernel/linux/linux-6.6/arch/x86/kernel/cpu/resctrl/ |
H A D | pseudo_lock.c | 265 kfree(plr->kmem); in pseudo_lock_region_clear() 266 plr->kmem = NULL; in pseudo_lock_region_clear() 380 plr->kmem = kzalloc(plr->size, GFP_KERNEL); in pseudo_lock_region_alloc() 381 if (!plr->kmem) { in pseudo_lock_region_alloc() 485 mem_r = plr->kmem; in pseudo_lock_fn() 901 mem_r = READ_ONCE(plr->kmem); in measure_cycles_lat_fn() 1006 mem_r = READ_ONCE(plr->kmem); in measure_residency_fn() 1533 physical = __pa(plr->kmem) >> PAGE_SHIFT; in pseudo_lock_dev_mmap() 1555 memset(plr->kmem + off, 0, vsize); in pseudo_lock_dev_mmap()
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/hns/ |
H A D | hns_roce_mr.c | 732 if (mtr->kmem) { in mtr_free_bufs() 733 hns_roce_buf_free(hr_dev, mtr->kmem); in mtr_free_bufs() 734 kfree(mtr->kmem); in mtr_free_bufs() 735 mtr->kmem = NULL; in mtr_free_bufs() 760 mtr->kmem = NULL; in mtr_alloc_bufs() 782 mtr->kmem = kzalloc(sizeof(*mtr->kmem), GFP_KERNEL); in mtr_alloc_bufs() 783 if (!mtr->kmem) { in mtr_alloc_bufs() 784 ibdev_err(ibdev, "Failed to alloc kmem\n"); in mtr_alloc_bufs() 790 mtr->kmem, buf_att in mtr_alloc_bufs() [all...] |
/kernel/linux/linux-6.6/drivers/infiniband/hw/hns/ |
H A D | hns_roce_mr.c | 658 if (mtr->kmem) { in mtr_free_bufs() 659 hns_roce_buf_free(hr_dev, mtr->kmem); in mtr_free_bufs() 660 mtr->kmem = NULL; in mtr_free_bufs() 674 mtr->kmem = NULL; in mtr_alloc_bufs() 684 mtr->kmem = hns_roce_buf_alloc(hr_dev, total_size, in mtr_alloc_bufs() 688 if (IS_ERR(mtr->kmem)) { in mtr_alloc_bufs() 689 ibdev_err(ibdev, "failed to alloc kmem, ret = %ld.\n", in mtr_alloc_bufs() 690 PTR_ERR(mtr->kmem)); in mtr_alloc_bufs() 691 return PTR_ERR(mtr->kmem); in mtr_alloc_bufs() 716 mtr->kmem, page_shif in mtr_map_bufs() [all...] |
/kernel/linux/linux-5.10/drivers/dax/ |
H A D | Makefile | 4 obj-$(CONFIG_DEV_DAX_KMEM) += kmem.o
|
/kernel/linux/linux-6.6/drivers/dax/ |
H A D | Makefile | 4 obj-$(CONFIG_DEV_DAX_KMEM) += kmem.o
|
/kernel/linux/linux-5.10/drivers/crypto/nx/ |
H A D | nx.c | 308 memset(nx_ctx->kmem, 0, nx_ctx->kmem_len); in nx_ctx_init() 669 nx_ctx->kmem = kmalloc(nx_ctx->kmem_len, GFP_KERNEL); in nx_crypto_ctx_init() 670 if (!nx_ctx->kmem) in nx_crypto_ctx_init() 674 nx_ctx->csbcpb = (struct nx_csbcpb *)(round_up((u64)nx_ctx->kmem, in nx_crypto_ctx_init() 749 kfree_sensitive(nx_ctx->kmem); in nx_crypto_ctx_exit() 765 kfree_sensitive(nx_ctx->kmem); in nx_crypto_ctx_aead_exit()
|
H A D | nx.h | 119 void *kmem; /* unaligned, kmalloc'd buffer */ member 120 size_t kmem_len; /* length of kmem */ 126 struct nx_sg *in_sg; /* aligned pointer into kmem to an sg list */ 127 struct nx_sg *out_sg; /* aligned pointer into kmem to an sg list */
|
/kernel/linux/linux-6.6/drivers/crypto/nx/ |
H A D | nx.c | 309 memset(nx_ctx->kmem, 0, nx_ctx->kmem_len); in nx_ctx_init() 670 nx_ctx->kmem = kmalloc(nx_ctx->kmem_len, GFP_KERNEL); in nx_crypto_ctx_init() 671 if (!nx_ctx->kmem) in nx_crypto_ctx_init() 675 nx_ctx->csbcpb = (struct nx_csbcpb *)(round_up((u64)nx_ctx->kmem, in nx_crypto_ctx_init() 750 kfree_sensitive(nx_ctx->kmem); in nx_crypto_ctx_exit() 766 kfree_sensitive(nx_ctx->kmem); in nx_crypto_ctx_aead_exit()
|
H A D | nx.h | 119 void *kmem; /* unaligned, kmalloc'd buffer */ member 120 size_t kmem_len; /* length of kmem */ 126 struct nx_sg *in_sg; /* aligned pointer into kmem to an sg list */ 127 struct nx_sg *out_sg; /* aligned pointer into kmem to an sg list */
|
/kernel/linux/linux-5.10/tools/perf/scripts/perl/ |
H A D | check-perf-trace.pl | 43 sub kmem::kmalloc subroutine 59 flag_str("kmem::kmalloc", "gfp_flags", $gfp_flags));
|
/kernel/linux/linux-6.6/tools/perf/scripts/perl/ |
H A D | check-perf-trace.pl | 43 sub kmem::kmalloc subroutine 59 flag_str("kmem::kmalloc", "gfp_flags", $gfp_flags));
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/i40iw/ |
H A D | i40iw_verbs.h | 113 struct i40iw_dma_mem kmem; member
|
/kernel/linux/linux-5.10/mm/ |
H A D | memcontrol.c | 350 * but only a few kmem-limited. Or also, if we have, for instance, 200 351 * memcgs, and none but the 200th is kmem-limited, we'd have to have a 375 * the alloc/free process all the time. In a small machine, 4 kmem-limited 1697 pr_info("kmem: usage %llukB, limit %llukB, failcnt %lu\n", in mem_cgroup_print_oom_meminfo() 1698 K((u64)page_counter_read(&memcg->kmem)), in mem_cgroup_print_oom_meminfo() 1699 K((u64)memcg->kmem.max), memcg->kmem.failcnt); in mem_cgroup_print_oom_meminfo() 3082 !page_counter_try_charge(&memcg->kmem, nr_pages, &counter)) { in __memcg_kmem_charge() 3090 page_counter_charge(&memcg->kmem, nr_pages); in __memcg_kmem_charge() 3107 page_counter_uncharge(&memcg->kmem, nr_page in __memcg_kmem_uncharge() [all...] |
/kernel/linux/linux-5.10/tools/perf/ |
H A D | perf-completion.sh | 203 if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|
|
/kernel/linux/linux-6.6/drivers/infiniband/hw/irdma/ |
H A D | verbs.h | 124 struct irdma_dma_mem kmem; member
|
H A D | verbs.c | 1789 dma_free_coherent(rf->sc_dev.hw->device, iwcq->kmem.size, in irdma_cq_free_rsrc() 1790 iwcq->kmem.va, iwcq->kmem.pa); in irdma_cq_free_rsrc() 1791 iwcq->kmem.va = NULL; in irdma_cq_free_rsrc() 2001 cq_buf->kmem_buf = iwcq->kmem; in irdma_resize_cq() 2006 iwcq->kmem = kmem_buf; in irdma_resize_cq() 2163 iwcq->kmem.size = ALIGN(round_up(rsize, 256), 256); in irdma_create_cq() 2164 iwcq->kmem.va = dma_alloc_coherent(dev->hw->device, in irdma_create_cq() 2165 iwcq->kmem.size, in irdma_create_cq() 2166 &iwcq->kmem in irdma_create_cq() [all...] |
/kernel/linux/linux-6.6/tools/perf/ |
H A D | perf-completion.sh | 203 if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_ethtool.c | 2118 u8 *kmem; in bnxt_flash_nvram() local 2128 kmem = dma_alloc_coherent(&bp->pdev->dev, data_len, &dma_handle, in bnxt_flash_nvram() 2130 if (!kmem) { in bnxt_flash_nvram() 2135 memcpy(kmem, data, data_len); in bnxt_flash_nvram() 2139 dma_free_coherent(&bp->pdev->dev, data_len, kmem, dma_handle); in bnxt_flash_nvram() 2459 u8 *kmem; in bnxt_flash_package_from_file() local 2467 kmem = dma_alloc_coherent(&bp->pdev->dev, fw->size, in bnxt_flash_package_from_file() 2469 if (!kmem) { in bnxt_flash_package_from_file() 2475 memcpy(kmem, fw->data, fw->size); in bnxt_flash_package_from_file() 2480 dma_free_coherent(&bp->pdev->dev, fw->size, kmem, in bnxt_flash_package_from_file() [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_ethtool.c | 2203 u8 *kmem; in bnxt_flash_nvram() local 2205 kmem = hwrm_req_dma_slice(bp, req, data_len, &dma_handle); in bnxt_flash_nvram() 2206 if (!kmem) { in bnxt_flash_nvram() 2213 memcpy(kmem, data, data_len); in bnxt_flash_nvram() 2608 u8 *kmem = NULL; in bnxt_flash_package_from_fw_obj() local 2632 kmem = hwrm_req_dma_slice(bp, modify, modify_len, &dma_handle); in bnxt_flash_package_from_fw_obj() 2633 if (!kmem && modify_len > PAGE_SIZE) in bnxt_flash_package_from_fw_obj() 2638 if (!kmem) { in bnxt_flash_package_from_fw_obj() 2689 memcpy(kmem, fw->data + copied, len); in bnxt_flash_package_from_fw_obj()
|