[Kernel-packages] [Bug 1820454] Re: TBS driver make fails

2019-03-21 Thread Kleber Sacilotto de Souza
Hello Jason,

This compilation error is caused by the following upstream stable fix we
have backported to xenial kernel 4.4.0-143.169:

mm: replace get_user_pages() write/force parameters with gup_flags
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/commit/?h=master-next=9c72ad08f1510332e9314046e6a2adba5064f39a

This change was needed to fix a security issue and unfortunately the
external modules using the get_user_pages() API will need to adapt to
the new function signature. The new signature is in place on mainline
kernel for a while already (since v4.9-rc2), so it's likely that your
module already have code in place to use the new signature.

To fix this module you would need some checking similar to:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 168)
[use new API...]

Given that this is a known issue and not really a bug in the kernel, I'm
going to make this bug report as invalid.

Thank you.

** Changed in: linux-signed (Ubuntu)
   Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1820454

Title:
  TBS driver make fails

Status in linux-signed package in Ubuntu:
  Invalid

Bug description:
  16.04 LTS Kernel 4.4.0-143
  When trying to make and install 3rd party drivers from TBSDTV, I receive the 
following errors during make.

  CC [M]  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c: In function 
'videobuf_dma_init_user_locked':
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:187:21: warning: 
passing argument 6 of 'get_user_pages' makes pointer from integer without a 
cast [-Wint-conversion]
   rw == READ, 1, /* force */
   ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: expected 'struct page **' but argument is of 
type 'int'
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:188:9: warning: 
passing argument 7 of 'get_user_pages' from incompatible pointer type 
[-Wincompatible-pointer-types]
   dma->pages, NULL);
   ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: expected 'struct vm_area_struct **' but 
argument is of type 'struct page **'
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:185:8: error: too 
many arguments to function 'get_user_pages'
err = get_user_pages(current, current->mm,
  ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: declared here
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  scripts/Makefile.build:291: recipe for target 
'/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o' failed
  make[3]: *** [/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o] 
Error 1
  Makefile:1454: recipe for target 
'_module_/home/user/Drivers/linux-tbs-drivers/v4l' failed
  make[2]: *** [_module_/home/user/Drivers/linux-tbs-drivers/v4l] Error 2
  make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-143-generic'
  Makefile:51: recipe for target 'default' failed
  make[1]: *** [default] Error 2
  make[1]: Leaving directory '/home/user/Drivers/linux-tbs-drivers/v4l'
  Makefile:26: recipe for target 'all' failed
  make: *** [all] Error 2

  Same drivers make and install without issue on kernel 4.4.0-142

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1820454/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1820454] Re: TBS driver make fails

2019-03-17 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: linux-signed (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1820454

Title:
  TBS driver make fails

Status in linux-signed package in Ubuntu:
  Confirmed

Bug description:
  16.04 LTS Kernel 4.4.0-143
  When trying to make and install 3rd party drivers from TBSDTV, I receive the 
following errors during make.

  CC [M]  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c: In function 
'videobuf_dma_init_user_locked':
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:187:21: warning: 
passing argument 6 of 'get_user_pages' makes pointer from integer without a 
cast [-Wint-conversion]
   rw == READ, 1, /* force */
   ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: expected 'struct page **' but argument is of 
type 'int'
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:188:9: warning: 
passing argument 7 of 'get_user_pages' from incompatible pointer type 
[-Wincompatible-pointer-types]
   dma->pages, NULL);
   ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: expected 'struct vm_area_struct **' but 
argument is of type 'struct page **'
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  /home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:185:8: error: too 
many arguments to function 'get_user_pages'
err = get_user_pages(current, current->mm,
  ^
  In file included from include/linux/scatterlist.h:7:0,
   from include/linux/dma-mapping.h:10,
   from 
/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.c:28:
  include/linux/mm.h:1222:6: note: declared here
   long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
  scripts/Makefile.build:291: recipe for target 
'/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o' failed
  make[3]: *** [/home/user/Drivers/linux-tbs-drivers/v4l/videobuf-dma-sg.o] 
Error 1
  Makefile:1454: recipe for target 
'_module_/home/user/Drivers/linux-tbs-drivers/v4l' failed
  make[2]: *** [_module_/home/user/Drivers/linux-tbs-drivers/v4l] Error 2
  make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-143-generic'
  Makefile:51: recipe for target 'default' failed
  make[1]: *** [default] Error 2
  make[1]: Leaving directory '/home/user/Drivers/linux-tbs-drivers/v4l'
  Makefile:26: recipe for target 'all' failed
  make: *** [all] Error 2

  Same drivers make and install without issue on kernel 4.4.0-142

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1820454/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp