Skip to contentSkip to conversation

linux-next: manual merge of the akpm-current tree with the tip tree

DISCUSSION Stephen Rothwell 7 participants 13 messages Jul 28, 2015 – Sep 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in:

arch/x86/entry/syscalls/syscall_32.tbl

between commit:

9dea5dc921b5 ("x86/entry/syscalls: Wire up 32-bit direct socket calls")

from the tip tree and commit:

0a36ab281187 ("userfaultfd: activate syscall")
f721d9f04de4 ("mm: mlock: add new mlock, munlock, and munlockall system calls")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 34 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc arch/x86/entry/syscalls/syscall_32.tbl
index 25e3cf1cd8fd,d68b13925aa4..000000000000
--- a/arch/x86/entry/syscalls/syscall_32.tbl
+++ b/arch/x86/entry/syscalls/syscall_32.tbl
@@@ -365,18 -365,7 +365,22 @@@
  356	i386	memfd_create		sys_memfd_create
  357	i386	bpf			sys_bpf
  358	i386	execveat		sys_execveat			stub32_execveat
 -359	i386	userfaultfd		sys_userfaultfd
 -360	i386	mlock2			sys_mlock2
 -361	i386	munlock2		sys_munlock2
 -362	i386	munlockall2		sys_munlockall2
 +359	i386	socket			sys_socket
 +360	i386	socketpair		sys_socketpair
 +361	i386	bind			sys_bind
 +362	i386	connect			sys_connect
 +363	i386	listen			sys_listen
 +364	i386	accept4			sys_accept4
 +365	i386	getsockopt		sys_getsockopt			compat_sys_getsockopt
 +366	i386	setsockopt		sys_setsockopt			compat_sys_setsockopt
 +367	i386	getsockname		sys_getsockname
 +368	i386	getpeername		sys_getpeername
 +369	i386	sendto			sys_sendto
 +370	i386	sendmsg			sys_sendmsg			compat_sys_sendmsg
 +371	i386	recvfrom		sys_recvfrom			compat_sys_recvfrom
 +372	i386	recvmsg			sys_recvmsg			compat_sys_recvmsg
 +373	i386	shutdown		sys_shutdown
++374	i386	userfaultfd		sys_userfaultfd
++375	i386	mlock2			sys_mlock2
++376	i386	munlock2		sys_munlock2
++377	i386	munlockall2		sys_munlockall2
#1 lore raw

Hello Stephen,

Quoted 2 lines · Stephen Rothwell

-359 i386 userfaultfd sys_userfaultfd
++374 i386 userfaultfd sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

One related question: is it ok to ship kernels in production right now with the userfaultfd syscall number 374 for x86 32bit ABI (after the above change) and 323 for x86-64 64bit ABI, with these syscalls number registered in linux-next or it may keep changing like it has just happened? I refer only to userfaultfd syscalls of x86 32bit and x86-64 64bit, not all other syscalls in linux-next.

Of course, I know full well that the standard answer is no, and in fact the above is an expected and fine change. In other words what I'm really asking is if I wonder if I could get an agreement here that from now on, the syscall number of userfaultfd for x86 32bit and x86-64 64bit won't change anymore in linux-next and it's already reserved just like if it was already upstream.

Again: I'd only seek such guarantee for the x86-64 64bit and x86 32bit ABIs (not any other arch, and not any other syscall). If I could get such a guarantee from you within the next week or two, that would avoid me complications and some work, so I thought it was worth asking. If it's not possible never mind.

Thanks,
Andrea

===

Quoted 1 line

From 873093c32b4b1d0b6c3f18ec1e52b56c24f67457 Mon Sep 17 00:00:00 2001

From: Andrea Arcangeli <[email protected]>
Date: Wed, 29 Jul 2015 18:53:17 +0200
Subject: [PATCH] userfaultfd: selftest: update userfaultfd x86 32bit syscall
number

It changed as result of linux-next merge of other syscalls.

---
 tools/testing/selftests/vm/userfaultfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vm/userfaultfd.c +1 -1
index 0c0b839..76071b1 100644
@@ -69,7 +69,7 @@
 #ifdef __x86_64__
 #define __NR_userfaultfd 323
 #elif defined(__i386__)
-#define __NR_userfaultfd 359
+#define __NR_userfaultfd 374
 #elif defined(__powewrpc__)
 #define __NR_userfaultfd 364
 #else
#2 lore raw
Quoted 26 lines · Andrea Arcangeli

Hello Stephen,

Quoted 2 lines · Stephen Rothwell
 -359 i386    userfaultfd             sys_userfaultfd
++374 i386    userfaultfd             sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

One related question: is it ok to ship kernels in production right now with the userfaultfd syscall number 374 for x86 32bit ABI (after the above change) and 323 for x86-64 64bit ABI, with these syscalls number registered in linux-next or it may keep changing like it has just happened? I refer only to userfaultfd syscalls of x86 32bit and x86-64 64bit, not all other syscalls in linux-next.

Of course, I know full well that the standard answer is no, and in fact the above is an expected and fine change. In other words what I'm really asking is if I wonder if I could get an agreement here that from now on, the syscall number of userfaultfd for x86 32bit and x86-64 64bit won't change anymore in linux-next and it's already reserved just like if it was already upstream.

Quoted 5 lines

Again: I'd only seek such guarantee for the x86-64 64bit and x86 32bit ABIs (not any other arch, and not any other syscall). If I could get such a guarantee from you within the next week or two, that would avoid me complications and some work, so I thought it was worth asking. If it's not possible never mind.

My (limited) understanding is that this is up to the arch maintainers. I certainly didn't intend to preempt your syscall number, but my patch beat your patch to -tip :-p

-tip people: want to assign Andrea a pair of syscall numbers?

--Andy

#3 lore raw
Quoted 33 lines · Andy Lutomirski
Quoted 26 lines · Andrea Arcangeli

Hello Stephen,

Quoted 2 lines · Stephen Rothwell
 -359 i386    userfaultfd             sys_userfaultfd
++374 i386    userfaultfd             sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

One related question: is it ok to ship kernels in production right now with the userfaultfd syscall number 374 for x86 32bit ABI (after the above change) and 323 for x86-64 64bit ABI, with these syscalls number registered in linux-next or it may keep changing like it has just happened? I refer only to userfaultfd syscalls of x86 32bit and x86-64 64bit, not all other syscalls in linux-next.

Of course, I know full well that the standard answer is no, and in fact the above is an expected and fine change. In other words what I'm really asking is if I wonder if I could get an agreement here that from now on, the syscall number of userfaultfd for x86 32bit and x86-64 64bit won't change anymore in linux-next and it's already reserved just like if it was already upstream.

Quoted 5 lines

Again: I'd only seek such guarantee for the x86-64 64bit and x86 32bit ABIs (not any other arch, and not any other syscall). If I could get such a guarantee from you within the next week or two, that would avoid me complications and some work, so I thought it was worth asking. If it's not possible never mind.

Quoted 5 lines

My (limited) understanding is that this is up to the arch maintainers. I certainly didn't intend to preempt your syscall number, but my patch beat your patch to -tip :-p

-tip people: want to assign Andrea a pair of syscall numbers?

Sure, just send a patch ....

#5 lore raw
In reply to Andrea Arcangeli

Hi Andrea,

Quoted 10 lines · On Wed, 29 Jul 2015 19:12:56 +0200 Andrea Arcangeli <[email protected]> wrote:
Quoted 2 lines · Stephen Rothwell

-359 i386 userfaultfd sys_userfaultfd
++374 i386 userfaultfd sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

I have added the below patch to linux-next from today.

Quoted 6 lines

One related question: is it ok to ship kernels in production right now with the userfaultfd syscall number 374 for x86 32bit ABI (after the above change) and 323 for x86-64 64bit ABI, with these syscalls number registered in linux-next or it may keep changing like it has just happened? I refer only to userfaultfd syscalls of x86 32bit and x86-64 64bit, not all other syscalls in linux-next.

These numbers are certainly not in any way official, they are just the result of my merge conflict fixup. So, yes, they could change again if someone adds another new syscall to any tree but Andrew's.

Quoted 6 lines

Of course, I know full well that the standard answer is no, and in fact the above is an expected and fine change. In other words what I'm really asking is if I wonder if I could get an agreement here that from now on, the syscall number of userfaultfd for x86 32bit and x86-64 64bit won't change anymore in linux-next and it's already reserved just like if it was already upstream.

Like Thomas said, send a patch to the x86 maintainers. I suspect (if the rest of the implementation needs to stay in Andrew's tree) that it could be a simple as a patch to the syscall tables using ni_syscall and a comment. Thomas?

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#6 lore raw
Quoted 34 lines · Stephen Rothwell

Hi Andrea,

Quoted 10 lines · On Wed, 29 Jul 2015 19:12:56 +0200 Andrea Arcangeli <[email protected]> wrote:
Quoted 2 lines · Stephen Rothwell

-359 i386 userfaultfd sys_userfaultfd
++374 i386 userfaultfd sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

I have added the below patch to linux-next from today.

Quoted 6 lines

One related question: is it ok to ship kernels in production right now with the userfaultfd syscall number 374 for x86 32bit ABI (after the above change) and 323 for x86-64 64bit ABI, with these syscalls number registered in linux-next or it may keep changing like it has just happened? I refer only to userfaultfd syscalls of x86 32bit and x86-64 64bit, not all other syscalls in linux-next.

These numbers are certainly not in any way official, they are just the result of my merge conflict fixup. So, yes, they could change again if someone adds another new syscall to any tree but Andrew's.

Quoted 6 lines

Of course, I know full well that the standard answer is no, and in fact the above is an expected and fine change. In other words what I'm really asking is if I wonder if I could get an agreement here that from now on, the syscall number of userfaultfd for x86 32bit and x86-64 64bit won't change anymore in linux-next and it's already reserved just like if it was already upstream.

Quoted 4 lines

Like Thomas said, send a patch to the x86 maintainers. I suspect (if the rest of the implementation needs to stay in Andrew's tree) that it could be a simple as a patch to the syscall tables using ni_syscall and a comment. Thomas?

Yes, that's all it takes to reserve a syscall number.

Thanks,

tglx

#4 lore raw
In reply to Thomas Gleixner
Quoted 4 lines · Thomas Gleixner
Quoted 1 line · Andy Lutomirski

-tip people: want to assign Andrea a pair of syscall numbers?

Sure, just send a patch ....

Awesome, I just sent the patch to register the syscall against -tip with the usual placeholder that will return -ENOSYS.

Thanks,
Andrea

#7 lore raw
In reply to Andrea Arcangeli

Hi Linus,

Quoted 10 lines · On Wed, 29 Jul 2015 19:12:56 +0200 Andrea Arcangeli <[email protected]> wrote:
Quoted 2 lines · Stephen Rothwell

-359 i386 userfaultfd sys_userfaultfd
++374 i386 userfaultfd sys_userfaultfd

Do I understand correctly the syscall number of userfaultfd for x86 32bit has just changed from 359 to 374? Appreciated that you CCed me on such a relevant change to be sure I didn't miss it.

Then the below is needed as well.

The below patch was missed when the userfaultfd stuff and the x86 changes were merged. I have repeated the patch in the clear below.

From: Andrea Arcangeli <[email protected]>
Date: Wed, 29 Jul 2015 18:53:17 +0200
Subject: [PATCH] userfaultfd: selftest: update userfaultfd x86 32bit syscall number

It changed as result of linux-next merge of other syscalls.

---
 tools/testing/selftests/vm/userfaultfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vm/userfaultfd.c +1 -1
index 0c0b839..76071b1 100644
@@ -69,7 +69,7 @@
 #ifdef __x86_64__
 #define __NR_userfaultfd 323
 #elif defined(__i386__)
-#define __NR_userfaultfd 359
+#define __NR_userfaultfd 374
 #elif defined(__powewrpc__)
 #define __NR_userfaultfd 364
 #else
Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#8 lore raw
Quoted 3 lines · Stephen Rothwell

The below patch was missed when the userfaultfd stuff and the x86 changes were merged. I have repeated the patch in the clear below.

When forwarding patches, please add your sign-off. I can see (and apply) the original in this thread, so I guess it doesn't matter in this particular case, but in general that's what you should be doing so that I don't then have to find the other email just to apply the patch from the original author.

Also, this wasn't actually a real merge error. This was just a bug in the whole process. Andrew's patches sent to me had been updated with the right number for all the other cases, why hadn't this been folded into the series too? Apparently Andrew's series has simply been buggy for the last month or more, and that was true even before it was sent to me and while it was cooking in -next.. Tssk.

Linus

#9 lore raw

Hi Linus,

Quoted 11 lines · On Tue, 8 Sep 2015 11:11:25 -0700 Linus Torvalds…
Quoted 3 lines · Stephen Rothwell

The below patch was missed when the userfaultfd stuff and the x86 changes were merged. I have repeated the patch in the clear below.

When forwarding patches, please add your sign-off. I can see (and apply) the original in this thread, so I guess it doesn't matter in this particular case, but in general that's what you should be doing so that I don't then have to find the other email just to apply the patch from the original author.

Ooops, sorry about that. I really should know better.

Quoted 6 lines

Also, this wasn't actually a real merge error. This was just a bug in the whole process. Andrew's patches sent to me had been updated with the right number for all the other cases, why hadn't this been folded into the series too? Apparently Andrew's series has simply been buggy for the last month or more, and that was true even before it was sent to me and while it was cooking in -next.. Tssk.

I have been applying that patch I sent to you to -next for some time. I guess I expected Andrew to pick it up when he rebased his patch series before submitting it to you. These things sometimes slip through the cracks.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#10 lore raw
Quoted 5 lines · Stephen Rothwell

I have been applying that patch I sent to you to -next for some time. I guess I expected Andrew to pick it up when he rebased his patch series before submitting it to you. These things sometimes slip through the cracks.

I suspect Andrew saw that patch, and thought it was a merge fixup like you sometimes send out, and didn't realize that it actually applied directly to his series.

Linus

#11 lore raw
Quoted 10 lines · On Tue, 8 Sep 2015 16:03:23 -0700 Linus Torvalds…
Quoted 5 lines · Stephen Rothwell

I have been applying that patch I sent to you to -next for some time. I guess I expected Andrew to pick it up when he rebased his patch series before submitting it to you. These things sometimes slip through the cracks.

I suspect Andrew saw that patch, and thought it was a merge fixup like you sometimes send out, and didn't realize that it actually applied directly to his series.

I've had it all the time, as a post-linux-next fixup - the idea being that I send it to you after its linux-next preconditions have been merged up.

However I failed to put that patch inside the stephen-take-these-bits markers, so it never went from -mm into -next.

New syscalls are rather a pain, both from the patch-monkeying POV and also because nobody knows what the syscall numbers will be until everything lands in mainline. Oh well, it doesn't happen often and it's easy stuff.

#12 lore raw

Hi Andrew,

Quoted 4 lines · Andrew Morton

New syscalls are rather a pain, both from the patch-monkeying POV and also because nobody knows what the syscall numbers will be until everything lands in mainline. Oh well, it doesn't happen often and it's easy stuff.

One more reason to let the assignment of syscall numbers be handled
(1) by the architecture maintainer, (2) after -rc1, even for x86.

If x86 is no more the canonical source, scripts/checksyscalls.sh needs an update, though.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds