search for: kcov_common_handle

Displaying 14 results from an estimated 14 matches for "kcov_common_handle".

2023 May 31
1
[syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue
...tic int vhost_worker_create(struct vhost_dev *dev) { - struct vhost_worker *worker; struct vhost_task *vtsk; char name[TASK_COMM_LEN]; int ret; - worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); - if (!worker) - return -ENOMEM; - - dev->worker = worker; - worker->kcov_handle = kcov_common_handle(); - init_llist_head(&worker->work_list); + dev->worker.kcov_handle = kcov_common_handle(); + init_llist_head(&dev->worker.work_list); snprintf(name, sizeof(name), "vhost-%d", current->pid); - vtsk = vhost_task_create(vhost_worker, worker, name); + vtsk = vhost_tas...
2023 Jun 05
1
[PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
...tic int vhost_worker_create(struct vhost_dev *dev) { - struct vhost_worker *worker; struct vhost_task *vtsk; char name[TASK_COMM_LEN]; - int ret; - - worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); - if (!worker) - return -ENOMEM; - dev->worker = worker; - worker->kcov_handle = kcov_common_handle(); - init_llist_head(&worker->work_list); + init_llist_head(&dev->worker.work_list); snprintf(name, sizeof(name), "vhost-%d", current->pid); - vtsk = vhost_task_create(vhost_worker, worker, name); - if (!vtsk) { - ret = -ENOMEM; - goto free_worker; - } + vtsk = vhos...
2023 Jun 05
1
[PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
...tic int vhost_worker_create(struct vhost_dev *dev) { - struct vhost_worker *worker; struct vhost_task *vtsk; char name[TASK_COMM_LEN]; - int ret; - - worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); - if (!worker) - return -ENOMEM; - dev->worker = worker; - worker->kcov_handle = kcov_common_handle(); - init_llist_head(&worker->work_list); + init_llist_head(&dev->worker.work_list); snprintf(name, sizeof(name), "vhost-%d", current->pid); - vtsk = vhost_task_create(vhost_worker, worker, name); - if (!vtsk) { - ret = -ENOMEM; - goto free_worker; - } + vtsk = vhos...
2023 Jun 06
1
[PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
...ev) > { >- struct vhost_worker *worker; > struct vhost_task *vtsk; > char name[TASK_COMM_LEN]; >- int ret; >- >- worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); >- if (!worker) >- return -ENOMEM; > >- dev->worker = worker; >- worker->kcov_handle = kcov_common_handle(); >- init_llist_head(&worker->work_list); >+ init_llist_head(&dev->worker.work_list); > snprintf(name, sizeof(name), "vhost-%d", current->pid); > >- vtsk = vhost_task_create(vhost_worker, worker, name); >- if (!vtsk) { >- ret = -ENOMEM; >- goto...
2023 Jun 06
2
[PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
...b45ff0e at syzkaller.appspotmail.com Ok. Will do. >> -??? } >> +??? vtsk = vhost_task_create(vhost_worker, &dev->worker, name); >> +??? if (!vtsk) >> +??????? return -ENOMEM; >> >> -??? worker->vtsk = vtsk; >> +??? dev->worker.kcov_handle = kcov_common_handle(); >> +??? dev->worker.vtsk = vtsk; > > vhost_work_queue() is called by vhost_transport_send_pkt() without > holding vhost_dev.mutex (like vhost_poll_queue() in several places). > > If vhost_work_queue() finds dev->worker.vtsk not NULL, how can we > be sure that for...
2023 Jun 06
1
[PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls
...ll do. > > > >> -??? } > >> +??? vtsk = vhost_task_create(vhost_worker, &dev->worker, name); > >> +??? if (!vtsk) > >> +??????? return -ENOMEM; > >> > >> -??? worker->vtsk = vtsk; > >> +??? dev->worker.kcov_handle = kcov_common_handle(); > >> +??? dev->worker.vtsk = vtsk; > > > > vhost_work_queue() is called by vhost_transport_send_pkt() without > > holding vhost_dev.mutex (like vhost_poll_queue() in several places). > > > > If vhost_work_queue() finds dev->worker.vtsk not NULL, how...
2023 Jun 01
1
[syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue
...ev) > { >- struct vhost_worker *worker; > struct vhost_task *vtsk; > char name[TASK_COMM_LEN]; > int ret; > >- worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); >- if (!worker) >- return -ENOMEM; >- >- dev->worker = worker; >- worker->kcov_handle = kcov_common_handle(); >- init_llist_head(&worker->work_list); >+ dev->worker.kcov_handle = kcov_common_handle(); >+ init_llist_head(&dev->worker.work_list); > snprintf(name, sizeof(name), "vhost-%d", current->pid); > >- vtsk = vhost_task_create(vhost_worker, worker, na...
2019 Oct 25
0
[PATCH v2 3/3] vhost, kcov: collect coverage from vhost_worker
...mod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=s390 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp at intel.com> All errors (new ones prefixed by >>): >> ERROR: "kcov_common_handle" [drivers/vhost/vhost.ko] undefined! ERROR: "kcov_remote_stop" [drivers/vhost/vhost.ko] undefined! ERROR: "kcov_remote_start" [drivers/vhost/vhost.ko] undefined! ERROR: "kcov_remote_stop" [drivers/usb/core/usbcore.ko] undefined! ERROR: "kcov_remot...
2019 Oct 23
0
[PATCH v2 1/3] kcov: remote coverage support
...PTR_ERR(remote); > + } > + } It's worrisome that this code can perform up to 65536 GFP_ATOMIC allocations without coming up for air. The possibility of ENOMEM or of causing collateral problems is significant. It doesn't look too hard to change this to use GFP_KERNEL? > +u64 kcov_common_handle(void) > +{ > + return current->kcov_handle; > +} I don't immediately understand what this "common handle" thing is all about. Code is rather lacking in this sort of high-level commentary?
2020 May 29
0
[PATCH 1/6] vhost: allow device that does not depend on vhost worker
...ker = use_worker; dev->msg_handler = msg_handler; init_llist_head(&dev->work_list); init_waitqueue_head(&dev->wait); @@ -549,18 +556,21 @@ long vhost_dev_set_owner(struct vhost_dev *dev) /* No owner, become one */ dev->mm = get_task_mm(current); dev->kcov_handle = kcov_common_handle(); - worker = kthread_create(vhost_worker, dev, "vhost-%d", current->pid); - if (IS_ERR(worker)) { - err = PTR_ERR(worker); - goto err_worker; - } + if (dev->use_worker) { + worker = kthread_create(vhost_worker, dev, + "vhost-%d", current->pid); + if (IS_ERR(wor...
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...*vhost_worker_create(struct vhost_dev *dev) { struct vhost_worker *worker; struct vhost_task *vtsk; char name[TASK_COMM_LEN]; + int ret; + u32 id; worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); if (!worker) return NULL; - dev->worker = worker; worker->kcov_handle = kcov_common_handle(); init_llist_head(&worker->work_list); + /* + * We increase the refcount for the initial creation and then + * later each time it's attached to a virtqueue. + */ + refcount_set(&worker->refcount, 1); snprintf(name, sizeof(name), "vhost-%d", current->pid);...
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various vhost patches in mst's tree and the vhost_task patchset in Christian Brauner's tree: git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git kernel.user_worker branch: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker The latter patchset handles the review comment
2020 May 29
12
[PATCH 0/6] vDPA: doorbell mapping
Hi all: This series introduce basic functionality of doorbell mapping support for vhost-vDPA. Userspace program may use mmap() to map a the doorbell of a specific virtqueue into its address space. This is help to reudce the syscall or vmexit overhead. A new vdpa_config_ops was introduced to report the location of the doorbell, vhost_vdpa may then choose to map the doorbell when: - The doorbell
2020 May 29
12
[PATCH 0/6] vDPA: doorbell mapping
Hi all: This series introduce basic functionality of doorbell mapping support for vhost-vDPA. Userspace program may use mmap() to map a the doorbell of a specific virtqueue into its address space. This is help to reudce the syscall or vmexit overhead. A new vdpa_config_ops was introduced to report the location of the doorbell, vhost_vdpa may then choose to map the doorbell when: - The doorbell