Summary: | x11-drivers/nvidia-drivers-415.25 with >=sys-kernel/gentoo-sources-4.4.168 - .../work/kernel/common/inc/nv-mm.h:44:9: error: too many arguments to function ‘get_user_pages’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Sachau <tommy> |
Component: | Current packages | Assignee: | Jeroen Roovers (RETIRED) <jer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo-bugzilla, kernel, spike |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=678558 https://bugzilla.kernel.org/show_bug.cgi?id=202365 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Thomas Sachau
![]() Same here... since kernel 4.4.168 the NVIDIA driver doesn't compile anymore (stops with "error: too many arguments to function ‘get_user_pages’"). With kernel 4.4.167, everything still works. No upstream bug report yet? https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.168 commit 8e50b8b07f462ab4b91bc1491b1c91bd75e4ad40 Author: Lorenzo Stoakes <lstoakes@gmail.com> Date: Thu Oct 13 01:20:16 2016 +0100 mm: replace get_user_pages() write/force parameters with gup_flags commit 768ae309a96103ed02eb1e111e838c87854d8b51 upstream. This removes the 'write' and 'force' from get_user_pages() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> [bwh: Backported to 4.4: - Drop changes in rapidio, vchiq, goldfish - Keep the "write" variable in amdgpu_ttm_tt_pin_userptr() as it's still needed - Also update calls from various other places that now use get_user_pages_remote() upstream, which were updated there by commit 9beae1ea8930 "mm: replace get_user_pages_remote() write/force ..." - Also update calls from hfi1 and ipath - Adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---> Mainline get_user_pages takes 5 arguments: /usr/src/linux-4.20.2-gentoo/include/linux/mm.h: long get_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas); ---> LTS with special backport takes 7 arguments: /usr/src/linux-4.4.170-gentoo/include/linux/mm.h: long get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas); kernel/conftest.sh: # Conftest #1: Check if get_user_pages accepts 6 arguments. # Return if true. # Fall through to conftest #2 on failure. ---> In 4.4.170 it does not: it takes 7 arguments and not 6 so it falls through to conftest #2. # Conftest #2: Check if get_user_pages has gup_flags instead of write and force parameters. # Return if available. # Fall through to default case if absent. echo "$CONFTEST_PREAMBLE #include <linux/mm.h> long get_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) { return 0; }" > conftest$$.c ---> In 4.4.170 it does not: It takes 7 arguments and not 5. $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 rm -f conftest$$.c if [ -f conftest$$.o ]; then echo "#undef NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions" echo "#undef NV_GET_USER_PAGES_HAS_TASK_STRUCT" | append_conftest "functions" rm -f conftest$$.o return ---> In 4.4.170 this does not work: get_user_pages is now assumed to take 6 arguments. There's also a bug entry on bugzilla.kernel.org about this issue: Bug 202365 - broked nvidia and vbox drivers ------------------------------------------- https://bugzilla.kernel.org/show_bug.cgi?id=202365 *** Bug 678578 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d35b944f7d98634d84623831ba7a525b3fbacad commit 5d35b944f7d98634d84623831ba7a525b3fbacad Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2019-02-23 14:53:07 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2019-02-23 14:56:18 +0000 x11-drivers/nvidia-drivers: Versions 390.116 410.104 418.43 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=675310 Signed-off-by: Jeroen Roovers <jer@gentoo.org> x11-drivers/nvidia-drivers/Manifest | 12 + .../nvidia-drivers/nvidia-drivers-390.116.ebuild | 582 ++++++++++++++++++++ .../nvidia-drivers/nvidia-drivers-410.104.ebuild | 585 +++++++++++++++++++++ .../nvidia-drivers/nvidia-drivers-418.43.ebuild | 578 ++++++++++++++++++++ 4 files changed, 1757 insertions(+) what about nvidia-drivers-340.107? can it be fixed as well? (In reply to Nick Soveiko from comment #8) > what about nvidia-drivers-340.107? can it be fixed as well? You would have to ask Nvidia or come up with your own patches (as usual) or use an older kernel (/branch). |