On Tue, Sep 29, 2020 at 6:00 PM wrote:
>
>
> On 9/29/20 8:09 AM, Souptick Joarder wrote:
> > On Fri, Sep 11, 2020 at 8:12 PM wrote:
> >>
> >> On 9/6/20 2:51 AM, Souptick Joarder wrote:
> >>> In 2019, we introduced pin_user_pages*() and now we are conv
On Fri, Sep 11, 2020 at 8:12 PM wrote:
>
>
> On 9/6/20 2:51 AM, Souptick Joarder wrote:
> > In 2019, we introduced pin_user_pages*() and now we are converting
> > get_user_pages*() to the new API as appropriate. [1] & [2] could
> > be referred for more information.
ace pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Juergen Gross
Cc: David Vrabel
---
drivers/xen/gntdev.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/xen/gntdev.c b/driver
gntdev_get_page()) and then, based on batch->writeable, use
set_page_dirty_lock().
Fixes: a4cdb556cae0 (xen/gntdev: add ioctl for grant copy)
Suggested-by: Boris Ostrovsky
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Juergen Gross
Cc: David Vrabel
---
drivers/xen/gntde
ace pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
---
drivers/xen/gntdev.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 64a9025a..e480509 100644
--- a/drivers/xen/
Hi Boris,
On Sun, Jul 12, 2020 at 9:01 AM Souptick Joarder wrote:
>
> This series contains few clean up, minor bug fixes and
> Convert get_user_pages() to pin_user_pages().
>
> I'm compile tested this, but unable to run-time test,
> so any testing help is m
pages need to be marked as dirty before unpinned it in
unlock_pages() which was oversight. This is fixed now.
Signed-off-by: Souptick Joarder
Suggested-by: John Hubbard
Reviewed-by: Juergen Gross
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
drivers/xen/privcmd.c | 5 -
1
ace pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Reviewed-by: Juergen Gross
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
drivers/xen/privcmd.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/xen/privcmd.c
nto 2 in v2.
v3:
Address review comment. Add review tag.
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
Souptick Joarder (3):
xen/privcmd: Corrected error handling path
xen/privcmd: Mark pages as dirty
xen/privcmd: Convert get_user_pages*() to pin_user_pages*()
driver
from lock_pages() due to error.
With this fix unlock_pages() doesn't need to validate pages[i] till
*nr_pages* for error scenario and few condition checks can be ignored.
Signed-off-by: Souptick Joarder
Reviewed-by: Juergen Gross
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
dr
On Tue, Jul 7, 2020 at 5:15 PM Jürgen Groß wrote:
>
> On 07.07.20 13:40, Souptick Joarder wrote:
> > On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote:
> >>
> >> On 06.07.20 20:16, Souptick Joarder wrote:
> >>> Previously, if lock_pages() end up partia
On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote:
>
> On 06.07.20 20:16, Souptick Joarder wrote:
> > Previously, if lock_pages() end up partially mapping pages, it used
> > to return -ERRNO due to which unlock_pages() have to go through
> > each pages[i] till *nr_pages* to
On Tue, Jul 7, 2020 at 3:08 PM Jürgen Groß wrote:
>
> On 06.07.20 20:16, Souptick Joarder wrote:
> > pages need to be marked as dirty before unpinned it in
> > unlock_pages() which was oversight. This is fixed now.
> >
> > Signed-off-by: Souptick Joarder
> >
ace pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
drivers/xen/privcmd.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
pages need to be marked as dirty before unpinned it in
unlock_pages() which was oversight. This is fixed now.
Signed-off-by: Souptick Joarder
Suggested-by: John Hubbard
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
drivers/xen/privcmd.c | 5 -
1 file changed, 4 insertions
nto 2 in v2.
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
Souptick Joarder (3):
xen/privcmd: Corrected error handling path
xen/privcmd: Mark pages as dirty
xen/privcmd: Convert get_user_pages*() to pin_user_pages*()
drivers/xen/privcmd.c | 32 ++
from lock_pages() due to error.
With this fix unlock_pages() doesn't need to validate pages[i] till
*nr_pages* for error scenario and few condition checks can be ignored.
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
drivers/xen/privc
On Fri, Jun 26, 2020 at 11:22 AM Jürgen Groß wrote:
>
> On 25.06.20 05:02, Souptick Joarder wrote:
> > Previously, if lock_pages() end up partially mapping pages, it used
> > to return -ERRNO due to which unlock_pages() have to go through
> > each pages[i] till *nr_pages
On Fri, Jun 26, 2020 at 5:01 AM Boris Ostrovsky
wrote:
>
> On 6/24/20 11:02 PM, Souptick Joarder wrote:
> > Previously, if lock_pages() end up partially mapping pages, it used
> > to return -ERRNO due to which unlock_pages() have to go through
> > each pages[i] till *nr
On Thu, Jun 25, 2020 at 11:19 AM John Hubbard wrote:
>
> On 2020-06-24 20:02, Souptick Joarder wrote:
> > In 2019, we introduced pin_user_pages*() and now we are converting
> > get_user_pages*() to the new API as appropriate. [1] & [2] could
> > be referred for more in
ace pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Cc: Boris Ostrovsky
Cc: Paul Durrant
---
Hi,
I'm compile tested this, but unable to run-time test, so any testing
help is much appriciated.
drivers/xen/privcmd.c | 10 ++
from lock_pages() due to error.
With this fix unlock_pages() doesn't need to validate pages[i] till
*nr_pages* for error scenario and few condition checks can be ignored.
As discussed, pages need to be marked as dirty before unpinned it in
unlock_pages() which was oversight.
Signed-off-by:
On Wed, Jun 24, 2020 at 9:07 PM Boris Ostrovsky
wrote:
>
> On 6/23/20 9:36 PM, Souptick Joarder wrote:
> > On Tue, Jun 23, 2020 at 11:11 PM Boris Ostrovsky
> > wrote:
> >> On 6/23/20 7:58 AM, Souptick Joarder wrote:
> >>> In 2019, we introduced pin_
On Tue, Jun 23, 2020 at 11:11 PM Boris Ostrovsky
wrote:
>
> On 6/23/20 7:58 AM, Souptick Joarder wrote:
> > In 2019, we introduced pin_user_pages*() and now we are converting
> > get_user_pages*() to the new API as appropriate. [1] & [2] could
> > be referred for more
ith this fix unlock_pages() doesn't need to validate pages[i] till
*nr_pages* for error scenario.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubba
ith this fix unlock_pages() doesn't need to validate pages[i] till
*nr_pages* for error scenario.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubba
On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky
wrote:
>
> On 6/22/20 2:52 PM, Souptick Joarder wrote:
> >
> > I read the code again. I think, this check is needed to handle a scenario
> > when
> > lock_pages() return -ENOSPC. Better to keep this check. Let me post
On Fri, Jun 19, 2020 at 1:00 PM John Hubbard wrote:
>
> On 2020-06-18 20:12, Souptick Joarder wrote:
> > On Wed, Jun 17, 2020 at 11:29 PM Boris Ostrovsky
> > wrote:
> >>
> >> On 6/16/20 11:14 PM, Souptick Joarder wrote:
> >>> In 2019, we introd
On Wed, Jun 17, 2020 at 11:29 PM Boris Ostrovsky
wrote:
>
> On 6/16/20 11:14 PM, Souptick Joarder wrote:
> > In 2019, we introduced pin_user_pages*() and now we are converting
> > get_user_pages*() to the new API as appropriate. [1] & [2] could
> > be referred for
rticles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
---
Hi,
I have compile tested this patch but unable to run-time test,
so any testing help is much appriciated.
Also have a question, why the existing code is not marking the
pages dirty (since it did FOLL_WRITE) ?
drivers/xen
On Mon, Sep 9, 2019 at 9:12 PM Kirill A. Shutemov wrote:
>
> On Sun, Sep 08, 2019 at 03:17:01AM +0530, Souptick Joarder wrote:
> > __online_page_set_limits() is a dummy function and an extra call
> > to this can be avoided.
> >
> > As both of the callers are now rem
As both the callers of this dummy __online_page_set_limits()
is removed, this can be removed permanently.
Signed-off-by: Souptick Joarder
---
include/linux/memory_hotplug.h | 1 -
mm/memory_hotplug.c| 5 -
2 files changed, 6 deletions(-)
diff --git a/include/linux
__online_page_set_limits() is a dummy function and an extra call
to this can be avoided.
As both of the callers are now removed, __online_page_set_limits()
can be removed permanently.
Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits()
xen/ballon: Avoid
__online_page_set_limits() is a dummy function and an extra call
to this function can be avoided.
Signed-off-by: Souptick Joarder
---
drivers/xen/balloon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 4e11de6..05b1f7e 100644
--- a
__online_page_set_limits() is a dummy function and an extra call
to this function can be avoided.
Signed-off-by: Souptick Joarder
---
drivers/hv/hv_balloon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 6fb4ea5..9bab443 100644
--- a
On Fri, Sep 6, 2019 at 7:02 PM Boris Ostrovsky
wrote:
>
> On 9/6/19 8:27 AM, Souptick Joarder wrote:
> > On Mon, Sep 2, 2019 at 2:04 PM Souptick Joarder
> > wrote:
> >> Rather than using static int max_dma_bits, this
> >> can be coverted to use as macr
On Mon, Sep 2, 2019 at 2:04 PM Souptick Joarder wrote:
>
> Rather than using static int max_dma_bits, this
> can be coverted to use as macro.
>
> Signed-off-by: Souptick Joarder
> Reviewed-by: Juergen Gross
If it is still not late, can we get this patch in queue for 5.4 ?
&g
Rather than using static int max_dma_bits, this
can be coverted to use as macro.
Signed-off-by: Souptick Joarder
Reviewed-by: Juergen Gross
---
drivers/xen/swiotlb-xen.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb
Rather than using static int max_dma_bits, this
can be coverted to use as macro.
Signed-off-by: Souptick Joarder
---
drivers/xen/swiotlb-xen.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index ae1df49..d1eced5
+vma->vm_pgoff, while it is exactly
vma_pages(vma).
Converting vm_map_pages() to use vm_map_pages_zero() will fix the
problem.
Marek has tested and confirmed the same.
Reported-by: Marek Marczykowski-Górecki
Signed-off-by: Souptick Joarder
Tested-by: Marek Marczykowski-Górecki
---
drivers/
On Tue, Jul 30, 2019 at 7:52 PM Marek Marczykowski-Górecki
wrote:
>
> On Tue, Jul 30, 2019 at 10:05:42AM -0400, Boris Ostrovsky wrote:
> > On 7/30/19 2:03 AM, Souptick Joarder wrote:
> > > On Mon, Jul 29, 2019 at 7:06 PM Marek Marczykowski-Górecki
> > > wrote:
>
On Mon, Jul 29, 2019 at 7:06 PM Marek Marczykowski-Górecki
wrote:
>
> On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote:
> > On Mon, Jul 29, 2019 at 1:35 PM Souptick Joarder
> > wrote:
> > >
> > > On Sun, Jul 28, 2019 at 11:36 PM Mar
On Mon, Jul 29, 2019 at 1:35 PM Souptick Joarder wrote:
>
> On Sun, Jul 28, 2019 at 11:36 PM Marek Marczykowski-Górecki
> wrote:
> >
> > On Fri, Feb 15, 2019 at 08:18:31AM +0530, Souptick Joarder wrote:
> > > Convert to use vm_map_pages() to map range of k
On Sun, Jul 28, 2019 at 11:36 PM Marek Marczykowski-Górecki
wrote:
>
> On Fri, Feb 15, 2019 at 08:18:31AM +0530, Souptick Joarder wrote:
> > Convert to use vm_map_pages() to map range of kernel
> > memory to user vma.
> >
> > map->count is passed to vm_map_pages(
Convert to use vm_map_pages() to map range of kernel memory
to user vma.
vm_pgoff is treated in V4L2 API as a 'cookie' to select a buffer,
not as a in-buffer offset by design and it always want to mmap a
whole buffer from its beginning.
Signed-off-by: Souptick Joarder
Suggested
nd if that causes regressions, it gives us an easy
way to revert.
Signed-off-by: Souptick Joarder
---
drivers/firewire/core-iso.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index 35e784c..5414
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
---
drivers/iommu/dma-iommu.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index d19f3d6..bacebff
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
---
arch/arm/mm/dma-mapping.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index f1e2922
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Tested on Rockchip hardware and display is working,
including talking to Lima via prime.
Signed-off-by: Souptick Joarder
Tested-by: Heiko Stuebner
---
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 17 ++---
1
Hi Andrew/ Michal,
On Mon, Apr 1, 2019 at 10:56 AM Souptick Joarder wrote:
>
> Hi Andrew,
>
> On Tue, Mar 19, 2019 at 7:47 AM Souptick Joarder wrote:
> >
> > Previouly drivers have their own way of mapping range of
> > kernel pages/memory into user vma and
Hi Andrew,
On Tue, Mar 19, 2019 at 7:47 AM Souptick Joarder wrote:
>
> Previouly drivers have their own way of mapping range of
> kernel pages/memory into user vma and this was done by
> invoking vm_insert_page() within a loop.
>
> As this pattern is common across different dr
ssions, it gives us an easy way to revert.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c
index de01a6d..d02dc43 100644
--- a/d
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
map->count is passed to vm_map_pages() and internal API
verify map->count against count ( count = vma_pages(vma))
for page array boundary overrun condition.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ost
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Oleksandr Andrushchenko
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/xen
display is working, including talking
to Lima via prime.
Signed-off-by: Souptick Joarder
Suggested-by: Russell King
Suggested-by: Matthew Wilcox
Reviewed-by: Mike Rapoport
Tested-by: Heiko Stuebner
---
include/linux/mm.h | 4 +++
mm/memory.c
re is no other change apart from renaming and
using the new interface.
Patch[1/9] & [4/9], Tested on Rockchip hardware.
v3 -> v4:
Fixed build warnings on patch [8/9] reported by kbuild test robot.
Souptick Joarder (9):
mm: Introduce new vm_map_pages() and vm_map_pages_zer
Hi Ira,
On Wed, Feb 20, 2019 at 11:01 AM wrote:
>
> From: Ira Weiny
>
> To facilitate additional options to get_user_pages_fast() change the
> singular write parameter to be gup_flags.
>
> This patch does not change any functionality. New functionality will
> follow in subsequent patches.
>
> S
On Fri, Feb 15, 2019 at 8:06 AM Souptick Joarder wrote:
>
> Previouly drivers have their own way of mapping range of
> kernel pages/memory into user vma and this was done by
> invoking vm_insert_page() within a loop.
>
> As this pattern is common across different drivers, it ca
ssions, it gives us an easy way to revert.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c
index de01a6d..d02dc43 100644
--- a/d
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
map->count is passed to vm_map_pages() and internal API
verify map->count against count ( count = vma_pages(vma))
for page array boundary overrun condition.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ost
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Oleksandr Andrushchenko
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/xen
display is working, including talking
to Lima via prime.
Signed-off-by: Souptick Joarder
Suggested-by: Russell King
Suggested-by: Matthew Wilcox
Reviewed-by: Mike Rapoport
Tested-by: Heiko Stuebner
---
include/linux/mm.h | 4 +++
mm/memory.c
re is no other change apart from renaming and
using the new interface.
Patch[1/9] & [4/9], Tested on Rockchip hardware.
v3 -> v4:
Fixed build warnings on patch [8/9] reported by kbuild test robot.
Souptick Joarder (9):
mm: Introduce new vm_map_pages() and vm_map_pages_zer
placed with
vma_pages(vma).
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/gntdev.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 5efc5ee..7f65ba3 100644
--- a/drivers/xen/gn
ssions, it gives us an easy way to revert.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c
index de01a6d..d02dc43 100644
--- a/d
Convert to use vm_map_pages() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Oleksandr Andrushchenko
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/xen
display is working, including talking
to Lima via prime.
Signed-off-by: Souptick Joarder
Suggested-by: Russell King
Suggested-by: Matthew Wilcox
Reviewed-by: Mike Rapoport
Tested-by: Heiko Stuebner
---
include/linux/mm.h | 4 +++
mm/memory.c
re is no other change apart from renaming and
using the new interface.
Patch[1/9] & [4/9], Tested on Rockchip hardware.
Souptick Joarder (9):
mm: Introduce new vm_map_pages() and vm_map_pages_zero() API
arm: mm: dma-mapping: Convert to use vm_map_pages()
drivers/firewire/core-iso
On Fri, Feb 8, 2019 at 10:52 AM Souptick Joarder wrote:
>
> On Thu, Feb 7, 2019 at 10:17 PM Matthew Wilcox wrote:
> >
> > On Thu, Feb 07, 2019 at 09:19:47PM +0530, Souptick Joarder wrote:
> > > Just thought to take opinion for documentation before placing it in v
On Thu, Feb 7, 2019 at 10:17 PM Matthew Wilcox wrote:
>
> On Thu, Feb 07, 2019 at 09:19:47PM +0530, Souptick Joarder wrote:
> > Just thought to take opinion for documentation before placing it in v3.
> > Does it looks fine ?
> >
> > +/**
> > + * __vm_insert_
On Thu, Feb 7, 2019 at 9:27 PM Mike Rapoport wrote:
>
> Hi Souptick,
>
> On Thu, Feb 07, 2019 at 09:19:47PM +0530, Souptick Joarder wrote:
> > Hi Mike,
> >
> > Just thought to take opinion for documentation before placing it in v3.
> > Does it looks fine ?
&
Hi Mike,
On Thu, Jan 31, 2019 at 2:09 PM Mike Rapoport wrote:
>
> On Thu, Jan 31, 2019 at 08:38:12AM +0530, Souptick Joarder wrote:
> > Previouly drivers have their own way of mapping range of
> > kernel pages/memory into user vma and this was done by
> > invoking vm_ins
On Thu, Jan 31, 2019 at 6:04 PM Heiko Stuebner wrote:
>
> Am Donnerstag, 31. Januar 2019, 13:31:52 CET schrieb Souptick Joarder:
> > On Thu, Jan 31, 2019 at 5:37 PM Heiko Stuebner wrote:
> > >
> > > Am Donnerstag, 31. Januar 2019, 04:08:12 CET schrieb Souptick Joar
On Thu, Jan 31, 2019 at 5:37 PM Heiko Stuebner wrote:
>
> Am Donnerstag, 31. Januar 2019, 04:08:12 CET schrieb Souptick Joarder:
> > Previouly drivers have their own way of mapping range of
> > kernel pages/memory into user vma and this was done by
> > invoking vm_ins
On Thu, Jan 31, 2019 at 2:09 PM Mike Rapoport wrote:
>
> On Thu, Jan 31, 2019 at 08:38:12AM +0530, Souptick Joarder wrote:
> > Previouly drivers have their own way of mapping range of
> > kernel pages/memory into user vma and this was done by
> > invoking vm_ins
ssions, it gives us an easy way to revert.
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c
index de01a6d..a9d7e97 10
uld be replaced with
vma_pages(vma).
Signed-off-by: Souptick Joarder
Reviewed-by: Boris Ostrovsky
---
drivers/xen/gntdev.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 5efc5ee..a930309 100644
--- a/drivers/xen/gn
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Oleksandr Andrushchenko
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm
_could_ then at a later "fix" these drivers which are using
vm_insert_range_buggy() to behave according to the normal vm_pgoff
offsetting simply by removing the _buggy suffix on the function
name and if that causes regressions, it gives us an easy way to revert.
Signed-off-by: Soupti
r discussing with Marek and
vm_insert_range could be used instead of vm_insert_range_buggy.
Souptick Joarder (9):
mm: Introduce new vm_insert_range and vm_insert_range_buggy API
arch/arm/mm/dma-mapping.c: Convert to use vm_insert_range
drivers/firewire/core-iso.c: Convert to use vm_i
On Mon, Jan 14, 2019 at 4:08 PM Oleksandr Andrushchenko
wrote:
>
> On 1/7/19 7:37 PM, Souptick Joarder wrote:
> > Remove duplicate header which is included twice.
> >
> > Signed-off-by: Souptick Joarder
> Reviewed-by: Oleksandr Andrushchenko
Can we get
On Fri, Jan 11, 2019 at 8:33 PM Souptick Joarder wrote:
>
> Previouly drivers have their own way of mapping range of
> kernel pages/memory into user vma and this was done by
> invoking vm_insert_page() within a loop.
>
> As this pattern is common across different drivers, it ca
On Fri, Jan 11, 2019 at 8:31 PM Souptick Joarder wrote:
>
> Previouly drivers have their own way of mapping range of
> kernel pages/memory into user vma and this was done by
> invoking vm_insert_page() within a loop.
>
> As this pattern is common across different drivers, it ca
On Tue, Jan 15, 2019 at 5:01 AM Boris Ostrovsky
wrote:
>
> On 1/11/19 10:13 AM, Souptick Joarder wrote:
> > Convert to use vm_insert_range_buggy() to map range of kernel
> > memory to user vma.
> >
> > This driver has ignored vm_pgoff. We could later "fix"
On Tue, Jan 15, 2019 at 4:58 AM Boris Ostrovsky
wrote:
>
> On 1/11/19 10:12 AM, Souptick Joarder wrote:
> > Convert to use vm_insert_range() to map range of kernel
> > memory to user vma.
> >
> > Signed-off-by: Souptick Joarder
>
> Reviewed-by: Boris Ostrovsk
ssions, it gives us an easy way to revert.
Signed-off-by: Souptick Joarder
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd-buf.c b/drivers/xen/privcmd-buf.c
index de01a6d..a9d7e97 100644
--- a/drivers/xen/privcmd-b
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
---
drivers/xen/gntdev.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index b0b02a5..ca4acee 100644
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c
b/drivers/gpu
_could_ then at a later "fix" these drivers which are using
vm_insert_range_buggy() to behave according to the normal vm_pgoff
offsetting simply by removing the _buggy suffix on the function
name and if that causes regressions, it gives us an easy way to revert.
Signed-off-by: Soupti
ug in [7/9], where user passed length is not
verified against object_count. For any value of length > object_count
it will end up overrun page array which could lead to a potential bug.
This is fixed as part of these conversion.
Souptick Joarder (9):
mm: Introduce new vm_insert_range and vm_inser
Remove duplicate header which is included twice.
Signed-off-by: Souptick Joarder
---
arch/arm/xen/mm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c
index cb44aa2..e1d44b9 100644
--- a/arch/arm/xen/mm.c
+++ b/arch/arm/xen/mm.c
@@ -7,7 +7,6 @@
#include
On Mon, Dec 24, 2018 at 6:53 PM Souptick Joarder wrote:
>
> Convert to use vm_insert_range() to map range of kernel
> memory to user vma.
>
> Signed-off-by: Souptick Joarder
> Reviewed-by: Matthew Wilcox
> Reviewed-by: Boris Ostrovsky
> ---
> drivers/xen/gntdev.c
On Mon, Dec 24, 2018 at 8:51 PM Russell King - ARM Linux
wrote:
>
> Having discussed with Matthew offlist, I think we've come to the
> following conclusion - there's a number of drivers that buggily
> ignore vm_pgoff.
>
> So, what I proposed is:
>
> static int __vm_insert_range(struct vm_struct *v
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Boris Ostrovsky
---
drivers/xen/gntdev.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/xen/gntdev.c b
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Oleksandr Andrushchenko
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 20 ++--
1 file changed, 6 insertions(+), 14 deletions
.
vm_insert_range is the new API which will be used to map a
range of kernel memory/pages to user vma.
This API is tested by Heiko for Rockchip drm driver, on rk3188,
rk3288, rk3328 and rk3399 with graphics.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Mike Rapoport
Reviewed-by
those error check we might end up overrun the page
array.
In rockchip/rockchip_drm_gem.c, added error check which was removed in
v1, as without this it might overrun page array. Adjusted page_count
parameter before passing it to vm_insert_range().
Souptick Joarder
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Boris Ostrovsky
---
drivers/xen/privcmd-buf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/privcmd
Convert to use vm_insert_range() to map range of kernel
memory to user vma.
Signed-off-by: Souptick Joarder
Reviewed-by: Matthew Wilcox
Reviewed-by: Boris Ostrovsky
---
drivers/xen/gntdev.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/xen/gntdev.c b
1 - 100 of 133 matches
Mail list logo