+ xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: xen/privcmd-buf.c: convert to use vm_map_pages_zero()
has been added to the -mm tree.  Its filename is
     xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Subject: xen/privcmd-buf.c: convert to use vm_map_pages_zero()

Convert to use vm_map_pages_zero() to map range of kernel memory to user
vma.

This driver has ignored vm_pgoff.  We could later "fix" these drivers to
behave according to the normal vm_pgoff offsetting simply by removing the
_zero suffix on the function name and if that causes regressions, it gives
us an easy way to revert.

Link: http://lkml.kernel.org/r/acf678e81d554d01a9b590716ac0ccbdcdf71c25.1552921225.git.jrdr.linux@xxxxxxxxx
Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Heiko Stuebner <heiko@xxxxxxxxx>
Cc: Joerg Roedel <joro@xxxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxxxxx>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
Cc: Pawel Osciak <pawel@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxxx>
Cc: Robin Murphy <robin.murphy@xxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: Sandy Huang <hjc@xxxxxxxxxxxxxx>
Cc: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Cc: Thierry Reding <treding@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/xen/privcmd-buf.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/drivers/xen/privcmd-buf.c~xen-privcmd-bufc-convert-to-use-vm_map_pages_zero
+++ a/drivers/xen/privcmd-buf.c
@@ -165,12 +165,8 @@ static int privcmd_buf_mmap(struct file
 	if (vma_priv->n_pages != count)
 		ret = -ENOMEM;
 	else
-		for (i = 0; i < vma_priv->n_pages; i++) {
-			ret = vm_insert_page(vma, vma->vm_start + i * PAGE_SIZE,
-					     vma_priv->pages[i]);
-			if (ret)
-				break;
-		}
+		ret = vm_map_pages_zero(vma, vma_priv->pages,
+						vma_priv->n_pages);
 
 	if (ret)
 		privcmd_buf_vmapriv_free(vma_priv);
_

Patches currently in -mm which might be from jrdr.linux@xxxxxxxxx are

mm-introduce-new-vm_map_pages-and-vm_map_pages_zero-api.patch
arm-mm-dma-mapping-convert-to-use-vm_map_pages.patch
drivers-firewire-core-isoc-convert-to-use-vm_map_pages_zero.patch
drm-rockchip-rockchip_drm_gemc-convert-to-use-vm_map_pages.patch
drm-xen-xen_drm_front_gemc-convert-to-use-vm_map_pages.patch
iommu-dma-iommuc-convert-to-use-vm_map_pages.patch
videobuf2-videobuf2-dma-sgc-convert-to-use-vm_map_pages.patch
xen-gntdevc-convert-to-use-vm_map_pages.patch
xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux