Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532821

Re: [PATCHv4 06/10] xen: Switch to using __pa_symbol

From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCHv4 06/10] xen: Switch to using __pa_symbol
Date 2016-11-29 23:30 +0100
Message-ID <sIZ4t-60M-13@gated-at.bofh.it> (permalink)
References <sIVNf-3Mq-3@gated-at.bofh.it> <sIVNg-3Mq-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/29/2016 01:55 PM, Laura Abbott wrote:
> __pa_symbol is the correct macro to use on kernel
> symbols. Switch to this from __pa.
>
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
> Found during a sweep of the kernel. Untested.
> ---
>  drivers/xen/xenbus/xenbus_dev_backend.c | 2 +-
>  drivers/xen/xenfs/xenstored.c           | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/xenbus/xenbus_dev_backend.c b/drivers/xen/xenbus/xenbus_dev_backend.c
> index 4a41ac9..31ca2bf 100644
> --- a/drivers/xen/xenbus/xenbus_dev_backend.c
> +++ b/drivers/xen/xenbus/xenbus_dev_backend.c
> @@ -99,7 +99,7 @@ static int xenbus_backend_mmap(struct file *file, struct vm_area_struct *vma)
>  		return -EINVAL;
>  
>  	if (remap_pfn_range(vma, vma->vm_start,
> -			    virt_to_pfn(xen_store_interface),
> +			    PHYS_PFN(__pa_symbol(xen_store_interface)),
>  			    size, vma->vm_page_prot))
>  		return -EAGAIN;
>  
> diff --git a/drivers/xen/xenfs/xenstored.c b/drivers/xen/xenfs/xenstored.c
> index fef20db..21009ea 100644
> --- a/drivers/xen/xenfs/xenstored.c
> +++ b/drivers/xen/xenfs/xenstored.c
> @@ -38,7 +38,7 @@ static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma)
>  		return -EINVAL;
>  
>  	if (remap_pfn_range(vma, vma->vm_start,
> -			    virt_to_pfn(xen_store_interface),
> +			    PHYS_PFN(__pa_symbol(xen_store_interface)),
>  			    size, vma->vm_page_prot))
>  		return -EAGAIN;
>  


I suspect this won't work --- xen_store_interface doesn't point to a
kernel symbol.

-boris

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv4 00/10] CONFIG_DEBUG_VIRTUAL for arm64 Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
  [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
    Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Kees Cook <keescook@chromium.org> - 2016-11-29 20:40 +0100
      Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-06 19:20 +0100
        Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Kees Cook <keescook@chromium.org> - 2016-12-06 21:20 +0100
          Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-07 15:00 +0100
    Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-06 19:30 +0100
  [PATCHv4 10/10] arm64: Add support for CONFIG_DEBUG_VIRTUAL Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
    Re: [PATCHv4 10/10] arm64: Add support for CONFIG_DEBUG_VIRTUAL Mark Rutland <mark.rutland@arm.com> - 2016-12-06 20:00 +0100
  [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and lm_alias Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
    Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and  lm_alias Laura Abbott <labbott@redhat.com> - 2016-12-01 20:20 +0100
    Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and  lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-06 18:30 +0100
    Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and  lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-06 18:50 +0100
    Re: [PATCHv4 08/10] mm/kasan: Switch to using __pa_symbol and  lm_alias Mark Rutland <mark.rutland@arm.com> - 2016-12-06 20:30 +0100
  [PATCHv4 06/10] xen: Switch to using __pa_symbol Laura Abbott <labbott@redhat.com> - 2016-11-29 20:00 +0100
    Re: [PATCHv4 06/10] xen: Switch to using __pa_symbol Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-11-29 23:30 +0100
      Re: [PATCHv4 06/10] xen: Switch to using __pa_symbol Laura Abbott <labbott@redhat.com> - 2016-11-29 23:50 +0100
  [PATCH 0/3] ARM: Add support for CONFIG_DEBUG_VIRTUAL Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 21:00 +0100
    [PATCH 3/3] ARM: Add support for CONFIG_DEBUG_VIRTUAL Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 21:00 +0100
      Re: [PATCH 3/3] ARM: Add support for CONFIG_DEBUG_VIRTUAL Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 21:50 +0100
      Re: [PATCH 3/3] ARM: Add support for CONFIG_DEBUG_VIRTUAL Laura Abbott <labbott@redhat.com> - 2016-12-07 03:10 +0100
        Re: [PATCH 3/3] ARM: Add support for CONFIG_DEBUG_VIRTUAL Florian Fainelli <f.fainelli@gmail.com> - 2016-12-07 03:30 +0100
    [PATCH 2/3] ARM: Utilize __pa_symbol in lieu of __pa Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 21:00 +0100
    [PATCH 1/3] ARM: Define KERNEL_START and KERNEL_END Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 21:00 +0100
      Re: [PATCH 1/3] ARM: Define KERNEL_START and KERNEL_END Florian Fainelli <f.fainelli@gmail.com> - 2016-12-06 23:50 +0100
      RE: [PATCH 1/3] ARM: Define KERNEL_START and KERNEL_END Chris Brandt <Chris.Brandt@renesas.com> - 2016-12-06 23:50 +0100
      Re: [PATCH 1/3] ARM: Define KERNEL_START and KERNEL_END kbuild test robot <lkp@intel.com> - 2016-12-07 07:20 +0100

csiph-web