lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a03_v849mauL5SvX=5n1DGnaii9XeGJJF7Z1rO+n2H+xg@mail.gmail.com>
Date:   Tue, 5 Mar 2019 17:49:38 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Juergen Gross <jgross@...e.com>
Cc:     Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>,
        Paul Durrant <paul.durrant@...rix.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        xen-devel <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH] [v2] xen: avoid link error on ARM

On Tue, Mar 5, 2019 at 3:57 PM Juergen Gross <jgross@...e.com> wrote:
> On 05/03/2019 14:43, Boris Ostrovsky wrote:
> > On 3/5/19 8:30 AM, Arnd Bergmann wrote:

> >> @@ -809,15 +789,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file, void __user *udata)
> >>              goto out;
> >>
> >>      if (xen_feature(XENFEAT_auto_translated_physmap)) {
> >> -            struct remap_pfn r = {
> >> -                    .mm = vma->vm_mm,
> >> -                    .pages = vma->vm_private_data,
> >> -                    .prot = vma->vm_page_prot,
> >> -            };
> >> -
> >> -            rc = apply_to_page_range(r.mm, kdata.addr,
> >> -                                     kdata.num << PAGE_SHIFT,
> >> -                                     remap_pfn_fn, &r);
> >> +            rc = xen_remap_vma_range(vma, kdata.addr, kdata.num << PAGE_SHIFT);
> >
> > I wonder whether drivers/xen/xlate_mmu.c might be a good place for these
> > routines.
>
> Hmm, probably. This would require a stub in the header to avoid
> problems in case of CONFIG_XEN_AUTO_XLATE not defined, though
> (the #ifdef is already there).
>
> I think this is the cleanest solution.

Putting it into xlate_mmu.c was my first attempt, but I was not sure how to
solve the dependency on CONFIG_XEN_AUTO_XLATE. So
xen_feature(XENFEAT_auto_translated_physmap)) would be guaranteed
to return false if CONFIG_XEN_AUTO_XLATE is disabled?

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ