Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-28 Thread Miguel Ojeda
On Fri, May 24, 2019 at 8:07 AM Souptick Joarder wrote: > > > > Taking a quick look now, by the way, why does vm_map_pages_zero() (and > > > __vm_map_pages() etc.) get a pointer to an array instead of a pointer > > > to the first element? > > For this particular driver, one page is getting mapped

[PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-26 Thread Souptick Joarder
While using mmap, the incorrect values of length and vm_pgoff are ignored and this driver goes ahead with mapping fbdev.buffer to user vma. Convert vm_insert_pages() to use vm_map_pages_zero(). We could later "fix" these drivers to behave according to the normal vm_pgoff offsetting simply by

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-24 Thread Souptick Joarder
On Thu, May 23, 2019 at 6:53 PM Miguel Ojeda wrote: > > On Mon, May 20, 2019 at 5:26 PM Souptick Joarder wrote: > > > > While using mmap, the incorrect value of length and vm_pgoff are > > ignored and this driver go ahead with mapping fbdev.buffer > > to user vma. > > Typos: values*, goes* (same

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-24 Thread Souptick Joarder
On Fri, May 24, 2019 at 9:52 AM Miguel Ojeda wrote: > > On Thu, May 23, 2019 at 2:58 PM Miguel Ojeda > wrote: > > > > Taking a quick look now, by the way, why does vm_map_pages_zero() (and > > __vm_map_pages() etc.) get a pointer to an array instead of a pointer > > to the first element? For

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-23 Thread Miguel Ojeda
On Thu, May 23, 2019 at 2:58 PM Miguel Ojeda wrote: > > Taking a quick look now, by the way, why does vm_map_pages_zero() (and > __vm_map_pages() etc.) get a pointer to an array instead of a pointer > to the first element? Also, in __vm_map_pages(), semantically w.r.t. to the comment, shouldn't

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-23 Thread Miguel Ojeda
On Mon, May 20, 2019 at 5:26 PM Souptick Joarder wrote: > > While using mmap, the incorrect value of length and vm_pgoff are > ignored and this driver go ahead with mapping fbdev.buffer > to user vma. Typos: values*, goes* (same for the other patch) > Convert vm_insert_pages() to use

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-23 Thread Miguel Ojeda
On Thu, May 23, 2019 at 10:18 AM Souptick Joarder wrote: > > Miguel, Ack from Robin is missing in linux-next-20190523 when applied. Thanks for the warning! I wanted to review first but didn't get to it yet. Taking a quick look now, by the way, why does vm_map_pages_zero() (and __vm_map_pages()

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-23 Thread Souptick Joarder
On Tue, May 21, 2019 at 12:24 PM Robin van der Gracht wrote: > > On Mon, 20 May 2019 21:00:58 +0530 > Souptick Joarder wrote: > > > While using mmap, the incorrect value of length and vm_pgoff are > > ignored and this driver go ahead with mapping fbdev.buffer > > to user vma. > > > > Convert

Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-21 Thread Robin van der Gracht
On Mon, 20 May 2019 21:00:58 +0530 Souptick Joarder wrote: > While using mmap, the incorrect value of length and vm_pgoff are > ignored and this driver go ahead with mapping fbdev.buffer > to user vma. > > Convert vm_insert_pages() to use vm_map_pages_zero(). We could later > "fix" these

[PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero()

2019-05-20 Thread Souptick Joarder
While using mmap, the incorrect value of length and vm_pgoff are ignored and this driver go ahead with mapping fbdev.buffer to user vma. Convert vm_insert_pages() to use vm_map_pages_zero(). We could later "fix" these drivers to behave according to the normal vm_pgoff offsetting simply by