2015-07-16 05:20:39

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the akpm-current tree

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:108: Error: __NR_syscalls is not equal to the size of the syscall table

Caused by commit

d221fc1f0f25 ("mm: mlock: add new mlock, munlock, and munlockall system calls")

I have added the following fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 16 Jul 2015 14:58:53 +1000
Subject: [PATCH] mm: mlock: fix for add new mlock, munlock, and munlockall system calls

Signed-off-by: Stephen Rothwell <[email protected]>
---
arch/arm/include/asm/unistd.h | 2 +-
arch/arm/kernel/calls.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 32640c431a08..2516c09d65d7 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -19,7 +19,7 @@
* This may need to be greater than __NR_last_syscall+1 in order to
* account for the padding in the syscall table
*/
-#define __NR_syscalls (388)
+#define __NR_syscalls (392)

/*
* *NOTE*: This is a ghost syscall private to the kernel. Only the
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 514e77b26414..88808221383b 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -399,7 +399,7 @@
CALL(sys_execveat)
CALL(sys_mlock2)
CALL(sys_munlock2)
-/* 400 */ CALL(sys_munlockall2)
+/* 390 */ CALL(sys_munlockall2)
#ifndef syscalls_counted
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
#define syscalls_counted
--
2.1.4

--
Cheers,
Stephen Rothwell [email protected]


2015-07-16 14:37:02

by Eric B Munson

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/16/2015 01:20 AM, Stephen Rothwell wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> arch/arm/kernel/entry-common.S: Assembler messages:
> arch/arm/kernel/entry-common.S:108: Error: __NR_syscalls is not
> equal to the size of the syscall table
>
> Caused by commit
>
> d221fc1f0f25 ("mm: mlock: add new mlock, munlock, and munlockall
> system calls")
>
> I have added the following fix patch for today:

Andrew,

I have an updated set that addresses the build failures by completing
the system call additions. It does not yet address Jon's concern
about applying MLOCK_ONFAULT to a region with pages that are already
present (this is in progress).

Do you want the updated syscalls now or wait until the whole thing is
ready?

>
> From: Stephen Rothwell <[email protected]> Date: Thu, 16 Jul
> 2015 14:58:53 +1000 Subject: [PATCH] mm: mlock: fix for add new
> mlock, munlock, and munlockall system calls
>
> Signed-off-by: Stephen Rothwell <[email protected]> ---
> arch/arm/include/asm/unistd.h | 2 +- arch/arm/kernel/calls.S
> | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/unistd.h
> b/arch/arm/include/asm/unistd.h index 32640c431a08..2516c09d65d7
> 100644 --- a/arch/arm/include/asm/unistd.h +++
> b/arch/arm/include/asm/unistd.h @@ -19,7 +19,7 @@ * This may need
> to be greater than __NR_last_syscall+1 in order to * account for
> the padding in the syscall table */ -#define __NR_syscalls (388)
> +#define __NR_syscalls (392)

IIUC, this should be 391.

>
> /* * *NOTE*: This is a ghost syscall private to the kernel. Only
> the diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
> index 514e77b26414..88808221383b 100644 ---
> a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -399,7
> +399,7 @@ CALL(sys_execveat) CALL(sys_mlock2) CALL(sys_munlock2)
> -/* 400 */ CALL(sys_munlockall2) +/* 390 */ CALL(sys_munlockall2)
> #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3)
> & ~3) - NR_syscalls #define syscalls_counted
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVp8GLAAoJELbVsDOpoOa9D7AQAIzPHDWeQwR5wDBBo1OyrY8N
vczsi8h9P4HlTfXH3jv6TYkcTdRRgLJN5ExIcFXUj3dRC+foYjLg+WvSszpJBuBT
ACc8jjuR+TdcDBSPrQ52QJiGwjKmQZ061HtWyCglveHl6fcAdgVq0/VLjjuEKGGj
uOFUNNjzWxCkGViOUzTdAsUsY/G6MlDMDERHUsdKkQYF4lofcaQB31L3EvcNBFHU
r9XIgzyiLDgJ22BgNs0tHBrv3JuQgrf3cEYIhYfwXj8JyrrCHo3IvcfkafGYCrIT
cTTPpnfTjPKWD2P14R4OAuLViB3GLGeKc//aSS3UZh3y0m1Bzw157BXGCQawqrUu
xRH+Ft0+gwcmI6Ez/trqu25NTq1KnOsot9XZFK2l3R0CYfYMwNOOUiNRk2+3PElk
gLu8nhGCF+f4OE7S5zQjcnnZ9rCAEprg/9ewMdRQXlT4719msDuQdzgequrzl55+
bQJQCPGIvyZhiP+Eh3LgvhJky/XY2xacs5FaHOgTYIeuHd794VQhncEbrbthMS3S
t94JjTAWssi7nHvau0ASZ3iR5R7iw0WJrvAARUiqkoZxMXQiOW5Tb3KQ+C9gp4KZ
l6w23L7MhdAMGrY5yLX1o+itet6o3nUksi4DK3qFNcr1gKVYwkXsEIkk6Bv3lRyx
rAFP155JAY6t3kyTso+I
=276b
-----END PGP SIGNATURE-----

2015-07-16 18:59:50

by Andrew Morton

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

On Thu, 16 Jul 2015 10:36:59 -0400 Eric B Munson <[email protected]> wrote:

> I have an updated set that addresses the build failures by completing
> the system call additions. It does not yet address Jon's concern
> about applying MLOCK_ONFAULT to a region with pages that are already
> present (this is in progress).
>
> Do you want the updated syscalls now or wait until the whole thing is
> ready?

When it's ready, please.

2015-07-16 21:53:04

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

Hi Eric,

On Thu, 16 Jul 2015 10:36:59 -0400 Eric B Munson <[email protected]> wrote:
>
> > From: Stephen Rothwell <[email protected]> Date: Thu, 16 Jul
> > 2015 14:58:53 +1000 Subject: [PATCH] mm: mlock: fix for add new
> > mlock, munlock, and munlockall system calls
> >
> > Signed-off-by: Stephen Rothwell <[email protected]> ---
> > arch/arm/include/asm/unistd.h | 2 +- arch/arm/kernel/calls.S
> > | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/unistd.h
> > b/arch/arm/include/asm/unistd.h index 32640c431a08..2516c09d65d7
> > 100644 --- a/arch/arm/include/asm/unistd.h +++
> > b/arch/arm/include/asm/unistd.h @@ -19,7 +19,7 @@ * This may need
> > to be greater than __NR_last_syscall+1 in order to * account for
> > the padding in the syscall table */ -#define __NR_syscalls (388)
> > +#define __NR_syscalls (392)
>
> IIUC, this should be 391.

Read the comment above - it has to be 392 for padding. (I actually
tried 391 and it fails to build.)

BTW, what mail client are you using - it really made a mess :-(

--
Cheers,
Stephen Rothwell [email protected]

2015-07-20 14:57:47

by Eric B Munson

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

On Fri, 17 Jul 2015, Stephen Rothwell wrote:

> Hi Eric,
>
> On Thu, 16 Jul 2015 10:36:59 -0400 Eric B Munson <[email protected]> wrote:
> >
> > > From: Stephen Rothwell <[email protected]> Date: Thu, 16 Jul
> > > 2015 14:58:53 +1000 Subject: [PATCH] mm: mlock: fix for add new
> > > mlock, munlock, and munlockall system calls
> > >
> > > Signed-off-by: Stephen Rothwell <[email protected]> ---
> > > arch/arm/include/asm/unistd.h | 2 +- arch/arm/kernel/calls.S
> > > | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/arm/include/asm/unistd.h
> > > b/arch/arm/include/asm/unistd.h index 32640c431a08..2516c09d65d7
> > > 100644 --- a/arch/arm/include/asm/unistd.h +++
> > > b/arch/arm/include/asm/unistd.h @@ -19,7 +19,7 @@ * This may need
> > > to be greater than __NR_last_syscall+1 in order to * account for
> > > the padding in the syscall table */ -#define __NR_syscalls (388)
> > > +#define __NR_syscalls (392)
> >
> > IIUC, this should be 391.
>
> Read the comment above - it has to be 392 for padding. (I actually
> tried 391 and it fails to build.)

I saw the comment but it wasn't clear to me what that padding value
should be (does __NR_syscalls need to be even, %4, %8, etc). Is there
somewhere that I missed that describes what the padding needs to be and
when it should be present?

>
> BTW, what mail client are you using - it really made a mess :-(
>

That was thunderbird, which has started acting up on me, not sure why it
mangled everything. Back to mutt now that I have my laptop back.
Hopefully this one is in better shape.


Attachments:
(No filename) (1.57 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments