Skip to contentSkip to conversation

Build failure in -next with get_user_pages_remote() API change

DISCUSSION Mark Brown 4 participants 6 messages Jul 10, 2020 – Jul 23, 2020

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Today's -next fails to build in various arm64 configs with:

arch/arm64/kernel/mte.c:225:23: error: too many arguments to function call, expected 7, have 8

                                            &page, &vma, NULL);
                                                         ^~~~
./include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
             ^~~~~~~~~~~
./include/linux/mm.h:1705:6: note: 'get_user_pages_remote' declared here
long get_user_pages_remote(struct mm_struct *mm,
     ^

1 error generated.

caused by b7363b0ab88d66d3c (mm/gup: remove task_struct pointer for all gup code) which updated the signature of get_user_pages_remote() without updating the caller in mte.c.

#1 lore raw
Quoted 11 lines · Mark Brown

Today's -next fails to build in various arm64 configs with:

arch/arm64/kernel/mte.c:225:23: error: too many arguments to function call, expected 7, have 8

                                            &page, &vma, NULL);
                                                         ^~~~
./include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
             ^~~~~~~~~~~
./include/linux/mm.h:1705:6: note: 'get_user_pages_remote' declared here
long get_user_pages_remote(struct mm_struct *mm,
     ^
Quoted 5 lines

1 error generated.

caused by b7363b0ab88d66d3c (mm/gup: remove task_struct pointer for all gup code) which updated the signature of get_user_pages_remote() without updating the caller in mte.c.

We should need to squash into "mm/gup: remove task_struct pointer for all gup code" with:

arch/arm64/kernel/mte.c +1 -1
index 934639ab225d..11e558b02a05 100644
@@ -221,7 +221,7 @@ static int __access_remote_tags(struct task_struct *tsk, struct mm_struct *mm,
                void *maddr;
                struct page *page = NULL;
 
-               ret = get_user_pages_remote(tsk, mm, addr, 1, gup_flags,
+               ret = get_user_pages_remote(mm, addr, 1, gup_flags,
                                            &page, &vma, NULL);
                if (ret <= 0)
                        break;

Seems to be a new caller merged recently, so it got left behind during the rebases... Sorry for not noticing that.

Thanks,

Signature · 1 line
Peter Xu
#2 lore raw
Quoted 35 lines · Peter Xu
Quoted 11 lines · Mark Brown

Today's -next fails to build in various arm64 configs with:

arch/arm64/kernel/mte.c:225:23: error: too many arguments to function call, expected 7, have 8

                                            &page, &vma, NULL);
                                                         ^~~~
./include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
             ^~~~~~~~~~~
./include/linux/mm.h:1705:6: note: 'get_user_pages_remote' declared here
long get_user_pages_remote(struct mm_struct *mm,
     ^
Quoted 5 lines

1 error generated.

caused by b7363b0ab88d66d3c (mm/gup: remove task_struct pointer for all gup code) which updated the signature of get_user_pages_remote() without updating the caller in mte.c.

We should need to squash into "mm/gup: remove task_struct pointer for all gup code" with:

arch/arm64/kernel/mte.c +1 -1
index 934639ab225d..11e558b02a05 100644
@@ -221,7 +221,7 @@ static int __access_remote_tags(struct task_struct *tsk, struct mm_struct *mm,
                void *maddr;
                struct page *page = NULL;
 
-               ret = get_user_pages_remote(tsk, mm, addr, 1, gup_flags,
+               ret = get_user_pages_remote(mm, addr, 1, gup_flags,
                                            &page, &vma, NULL);
                if (ret <= 0)
                        break;
Quoted 2 lines

Seems to be a new caller merged recently, so it got left behind during the rebases... Sorry for not noticing that.

Andrew, IIUC this can still have its chance to be squashed into existing commit, or please let me know if there's anything I can do (resend the affected last patch, or send a fixup patch, ...). Thanks!

Signature · 1 line
Peter Xu
maintainer
#3 lore raw
In reply to Peter Xu
Quoted 35 lines · Peter Xu
Quoted 11 lines · Mark Brown

Today's -next fails to build in various arm64 configs with:

arch/arm64/kernel/mte.c:225:23: error: too many arguments to function call, expected 7, have 8

                                            &page, &vma, NULL);
                                                         ^~~~
./include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
             ^~~~~~~~~~~
./include/linux/mm.h:1705:6: note: 'get_user_pages_remote' declared here
long get_user_pages_remote(struct mm_struct *mm,
     ^
Quoted 5 lines

1 error generated.

caused by b7363b0ab88d66d3c (mm/gup: remove task_struct pointer for all gup code) which updated the signature of get_user_pages_remote() without updating the caller in mte.c.

We should need to squash into "mm/gup: remove task_struct pointer for all gup code" with:

arch/arm64/kernel/mte.c +1 -1
index 934639ab225d..11e558b02a05 100644
@@ -221,7 +221,7 @@ static int __access_remote_tags(struct task_struct *tsk, struct mm_struct *mm,
                void *maddr;
                struct page *page = NULL;
 
-               ret = get_user_pages_remote(tsk, mm, addr, 1, gup_flags,
+               ret = get_user_pages_remote(mm, addr, 1, gup_flags,
                                            &page, &vma, NULL);
                if (ret <= 0)
                        break;
Quoted 2 lines

Seems to be a new caller merged recently, so it got left behind during the rebases... Sorry for not noticing that.

The mte code is only in -next but since it's based on 5.8-rc3, we can't change it without breaking it.

Is there a stable branch somewhere with the gup patches? If not, I can provisionally drop the affected MTE patches from -next and push them upstream closer to the -rc1 (it's the ptrace support from MTE).

Signature · 1 line
Catalin
#4 lore raw
Quoted 18 lines · On Fri, 10 Jul 2020 16:23:58 +0100 Catalin Marinas <[email protected]>…
Quoted 12 lines
arch/arm64/kernel/mte.c +1 -1
@@ -221,7 +221,7 @@ static int __access_remote_tags(struct task_struct *tsk, struct mm_struct *mm,
                void *maddr;
                struct page *page = NULL;
 
-               ret = get_user_pages_remote(tsk, mm, addr, 1, gup_flags,
+               ret = get_user_pages_remote(mm, addr, 1, gup_flags,
                                            &page, &vma, NULL);
                if (ret <= 0)
                        break;
Quoted 2 lines

Seems to be a new caller merged recently, so it got left behind during the rebases... Sorry for not noticing that.

The mte code is only in -next but since it's based on 5.8-rc3, we can't change it without breaking it.

Quoted 3 lines

Is there a stable branch somewhere with the gup patches? If not, I can provisionally drop the affected MTE patches from -next and push them upstream closer to the -rc1 (it's the ptrace support from MTE).

Is OK. I restaged this patch series to come after linux-next's material and added Peter's fixup. I'll merge this series into Linus after the ARM tree has merged so everything will land nicely.

Happens often ;)

maintainer
#5 lore raw
Quoted 19 lines · Andrew Morton
Quoted 18 lines · On Fri, 10 Jul 2020 16:23:58 +0100 Catalin Marinas <[email protected]>…
Quoted 12 lines
arch/arm64/kernel/mte.c +1 -1
@@ -221,7 +221,7 @@ static int __access_remote_tags(struct task_struct *tsk, struct mm_struct *mm,
                void *maddr;
                struct page *page = NULL;
 
-               ret = get_user_pages_remote(tsk, mm, addr, 1, gup_flags,
+               ret = get_user_pages_remote(mm, addr, 1, gup_flags,
                                            &page, &vma, NULL);
                if (ret <= 0)
                        break;
Quoted 2 lines

Seems to be a new caller merged recently, so it got left behind during the rebases... Sorry for not noticing that.

The mte code is only in -next but since it's based on 5.8-rc3, we can't change it without breaking it.

Quoted 7 lines
Quoted 3 lines

Is there a stable branch somewhere with the gup patches? If not, I can provisionally drop the affected MTE patches from -next and push them upstream closer to the -rc1 (it's the ptrace support from MTE).

Is OK. I restaged this patch series to come after linux-next's material and added Peter's fixup. I'll merge this series into Linus after the ARM tree has merged so everything will land nicely.

Just a heads-up that I'll drop the arm64 MTE series from -next, postponing the merging until 5.10 (there is an ongoing discussion on the prctl() aspect and I don't want to be forced to change the user ABI after upstreaming). You'll get another conflict for Peter's hunk above.

Thanks.

Signature · 1 line
Catalin