On Mon, 27 Jan 2020, Boris Ostrovsky wrote:
> (Sorry, with proper addressing now)
>
> On 1/27/20 6:29 PM, Boris Ostrovsky wrote:
> >
> >
> > On 1/27/20 4:37 PM, Marek Marczykowski-Górecki wrote:
> >>
> >>>> Loading Linux 5.5.0-accecn30 ...
> >>>>
> >>>> .[5;22H [ initrd.img-5.5.0-acc 16.52MiB 100% 10.23MiB/s
> >>>> ].[5;1HSetting up swapspace version 1, size = 1073737728 bytes
> >>>> /dev/xvda3: clean, 852118/1294896 files, 3076785/5190907 blocks
> >>>> [ 2.730931] BUG: kernel NULL pointer dereference, address:
> >>>> 00000000000003b0
> >>>> [ 2.730959] #PF: supervisor read access in kernel mode
> >>>> [ 2.730966] #PF: error_code(0x0000) - not-present page
> >>>> [ 2.730973] PGD 0 P4D 0
> >>>> [ 2.730978] Oops: 0000 [#1] SMP PTI
> >>>> [ 2.730985] CPU: 1 PID: 402 Comm: qubesdb-daemon Tainted: G
> >>>> O 5.5.0-accecn30 #31
> >>>> [ 2.731000] RIP: 0010:mmu_interval_read_begin+0x24/0xc0
> >
> >
> >
> >
> > This looks like it could well be
> > d3eeb1d77c5d0af9df442db63722928238310a86. Can you revert it and see if
> > it makes a difference?
> >
> > (+Jason)
> >
> > -boris
> >
> >
> >
> >
> >>>> [ 2.731008] Code: e9 51 66 e1 ff 90 0f 1f 44 00 00 41 54 49 89 fc 55
> >>>> 53 48 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 48 8b 47
> >>>> 38 <48> 8b a8 b0 03 00 00 48 8d 5d 0c 48 89 df e8 49 27 6f 00 4d 8b 64
> >>>> [ 2.731030] RSP: 0018:ffff9873001e7d20 EFLAGS: 00010246
> >>>> [ 2.731037] RAX: 0000000000000000 RBX: ffff8a4e94712500 RCX:
> >>>> 0000000000000000
>
>
>
> I am pretty sure it is.
>
> RAX=0 most likely means that map->notifier is NULL (assuming your
> compiler generates code similar to mine).
>
> I believe you at least need
>
>
> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
> index 4fc83e3f..d35cf0b 100644
> --- a/drivers/xen/gntdev.c
> +++ b/drivers/xen/gntdev.c
> @@ -1016,7 +1016,8 @@ static int gntdev_mmap(struct file *flip, struct
> vm_area_struct *vma)
> * and we are holding it now, there is no need for the
> notifier_range
> * locking pattern.
> */
> - mmu_interval_read_begin(&map->notifier);
> + if (use_ptemod)
> + mmu_interval_read_begin(&map->notifier);
>
> if (use_ptemod) {
> map->pages_vm_start = vma->vm_start;
>
>
> and maybe more. Give that a try.
Thanks, I'll try to get these tested tomorrow evening.
--
i.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel