All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 11:03 ` Xiaoming Ni
  0 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 11:03 UTC (permalink / raw)
  To: acme, alexander.shishkin, arnd, borntraeger, catalin.marinas,
	christian, cyphar, dhowells, ebiederm, fenghua.yu, geert, gor,
	heiko.carstens, ink, jolsa, linux, lkp, mark.rutland, mattst88,
	minchan, mingo, monstr, namhyung, nixiaoming, peterz, rth,
	sargun, sfr, tony.luck, will, akpm
  Cc: alex.huangjianhui, zhongjubin, linux-kernel, linux-s390,
	clang-built-linux, kbuild-all, linux-mm

Build error on s390:
	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
	>> (.rodata+0x1288): undefined reference to `__s390_'

In commit ("All arch: remove system call sys_sysctl")
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_sysctl			compat_sys_sysctl
+149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock

After the patch is integrated, there is a format error in the generated
arch/s390/include/generated/asm/syscall_table.h:
	SYSCALL(sys_fdatasync, sys_fdatasync)
	SYSCALL(sys_ni_syscall,) /* cause build error */
	SYSCALL(sys_mlock,sys_mlock)

There are holes in the system call number in
 arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
these hole numbers will be automatically filled with "NI_SYSCALL".
Therefore, delete the number 149 to fix the current compilation failure.
 Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.

Fixes: ("All arch: remove system call sys_sysctl")
Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
---
 arch/s390/kernel/syscalls/syscall.tbl           | 1 -
 tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index f17aaf6fe5de..bcaf93994e3c 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock
 151  common	munlock			sys_munlock			sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
index 0193f9b98753..eb77d0d01d8f 100644
--- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			compat_sys_mlock
 151  common	munlock			sys_munlock			compat_sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 11:03 ` Xiaoming Ni
  0 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 11:03 UTC (permalink / raw)
  To: acme, alexander.shishkin, arnd, borntraeger, catalin.marinas,
	christian, cyphar, dhowells, ebiederm, fenghua.yu, geert, gor,
	heiko.carstens, ink, jolsa, linux, lkp, mark.rutland, mattst88,
	minchan, mingo, monstr, namhyung, nixiaoming, peterz, rth,
	sargun, sfr, tony.luck, will, akpm
  Cc: alex.huangjianhui, zhongjubin, linux-kernel, linux-s390,
	clang-built-linux, kbuild-all, linux-mm

Build error on s390:
	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
	>> (.rodata+0x1288): undefined reference to `__s390_'

In commit ("All arch: remove system call sys_sysctl")
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_sysctl			compat_sys_sysctl
+149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock

After the patch is integrated, there is a format error in the generated
arch/s390/include/generated/asm/syscall_table.h:
	SYSCALL(sys_fdatasync, sys_fdatasync)
	SYSCALL(sys_ni_syscall,) /* cause build error */
	SYSCALL(sys_mlock,sys_mlock)

There are holes in the system call number in
 arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
these hole numbers will be automatically filled with "NI_SYSCALL".
Therefore, delete the number 149 to fix the current compilation failure.
 Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.

Fixes: ("All arch: remove system call sys_sysctl")
Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
---
 arch/s390/kernel/syscalls/syscall.tbl           | 1 -
 tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index f17aaf6fe5de..bcaf93994e3c 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock
 151  common	munlock			sys_munlock			sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
index 0193f9b98753..eb77d0d01d8f 100644
--- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			compat_sys_mlock
 151  common	munlock			sys_munlock			compat_sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 11:03 ` Xiaoming Ni
  0 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 11:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2607 bytes --]

Build error on s390:
	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
	>> (.rodata+0x1288): undefined reference to `__s390_'

In commit ("All arch: remove system call sys_sysctl")
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_sysctl			compat_sys_sysctl
+149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock

After the patch is integrated, there is a format error in the generated
arch/s390/include/generated/asm/syscall_table.h:
	SYSCALL(sys_fdatasync, sys_fdatasync)
	SYSCALL(sys_ni_syscall,) /* cause build error */
	SYSCALL(sys_mlock,sys_mlock)

There are holes in the system call number in
 arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
these hole numbers will be automatically filled with "NI_SYSCALL".
Therefore, delete the number 149 to fix the current compilation failure.
 Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.

Fixes: ("All arch: remove system call sys_sysctl")
Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming(a)huawei.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
---
 arch/s390/kernel/syscalls/syscall.tbl           | 1 -
 tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index f17aaf6fe5de..bcaf93994e3c 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			sys_mlock
 151  common	munlock			sys_munlock			sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
index 0193f9b98753..eb77d0d01d8f 100644
--- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
@@ -138,7 +138,6 @@
 146  common	writev			sys_writev			compat_sys_writev
 147  common	getsid			sys_getsid			sys_getsid
 148  common	fdatasync		sys_fdatasync			sys_fdatasync
-149  common	_sysctl			sys_ni_syscall
 150  common	mlock			sys_mlock			compat_sys_mlock
 151  common	munlock			sys_munlock			compat_sys_munlock
 152  common	mlockall		sys_mlockall			sys_mlockall
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
  2020-06-18 11:03 ` Xiaoming Ni
@ 2020-06-18 11:27   ` Heiko Carstens
  -1 siblings, 0 replies; 10+ messages in thread
From: Heiko Carstens @ 2020-06-18 11:27 UTC (permalink / raw)
  To: Xiaoming Ni
  Cc: acme, alexander.shishkin, arnd, borntraeger, catalin.marinas,
	christian, cyphar, dhowells, ebiederm, fenghua.yu, geert, gor,
	ink, jolsa, linux, lkp, mark.rutland, mattst88, minchan, mingo,
	monstr, namhyung, peterz, rth, sargun, sfr, tony.luck, will,
	akpm, alex.huangjianhui, zhongjubin, linux-kernel, linux-s390,
	clang-built-linux, kbuild-all, linux-mm

On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
> Build error on s390:
> 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
> 	>> (.rodata+0x1288): undefined reference to `__s390_'
> 
> In commit ("All arch: remove system call sys_sysctl")
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
> +149  common	_sysctl			sys_ni_syscall
>  150  common	mlock			sys_mlock			sys_mlock
> 
> After the patch is integrated, there is a format error in the generated
> arch/s390/include/generated/asm/syscall_table.h:
> 	SYSCALL(sys_fdatasync, sys_fdatasync)
> 	SYSCALL(sys_ni_syscall,) /* cause build error */
> 	SYSCALL(sys_mlock,sys_mlock)
> 
> There are holes in the system call number in
>  arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
> these hole numbers will be automatically filled with "NI_SYSCALL".
> Therefore, delete the number 149 to fix the current compilation failure.
>  Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
> 
> Fixes: ("All arch: remove system call sys_sysctl")
> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
> ---
>  arch/s390/kernel/syscalls/syscall.tbl           | 1 -
>  tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
> index f17aaf6fe5de..bcaf93994e3c 100644
> --- a/arch/s390/kernel/syscalls/syscall.tbl
> +++ b/arch/s390/kernel/syscalls/syscall.tbl
> @@ -138,7 +138,6 @@
>  146  common	writev			sys_writev			compat_sys_writev
>  147  common	getsid			sys_getsid			sys_getsid
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_ni_syscall

This is not correct. It should be changed to:

   149  common	_sysctl			-				-

Otherwise the generated __NR__sysctl define will be lost from
unistd.h, which should not happen. Looking at the link above it
_looks_ like a similar mistake was done for arm64.

> diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> index 0193f9b98753..eb77d0d01d8f 100644
> --- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> +++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> @@ -138,7 +138,6 @@
>  146  common	writev			sys_writev			compat_sys_writev
>  147  common	getsid			sys_getsid			sys_getsid
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_ni_syscall

Same here.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 11:27   ` Heiko Carstens
  0 siblings, 0 replies; 10+ messages in thread
From: Heiko Carstens @ 2020-06-18 11:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2728 bytes --]

On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
> Build error on s390:
> 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
> 	>> (.rodata+0x1288): undefined reference to `__s390_'
> 
> In commit ("All arch: remove system call sys_sysctl")
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
> +149  common	_sysctl			sys_ni_syscall
>  150  common	mlock			sys_mlock			sys_mlock
> 
> After the patch is integrated, there is a format error in the generated
> arch/s390/include/generated/asm/syscall_table.h:
> 	SYSCALL(sys_fdatasync, sys_fdatasync)
> 	SYSCALL(sys_ni_syscall,) /* cause build error */
> 	SYSCALL(sys_mlock,sys_mlock)
> 
> There are holes in the system call number in
>  arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
> these hole numbers will be automatically filled with "NI_SYSCALL".
> Therefore, delete the number 149 to fix the current compilation failure.
>  Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
> 
> Fixes: ("All arch: remove system call sys_sysctl")
> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming(a)huawei.com/
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
> ---
>  arch/s390/kernel/syscalls/syscall.tbl           | 1 -
>  tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
> index f17aaf6fe5de..bcaf93994e3c 100644
> --- a/arch/s390/kernel/syscalls/syscall.tbl
> +++ b/arch/s390/kernel/syscalls/syscall.tbl
> @@ -138,7 +138,6 @@
>  146  common	writev			sys_writev			compat_sys_writev
>  147  common	getsid			sys_getsid			sys_getsid
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_ni_syscall

This is not correct. It should be changed to:

   149  common	_sysctl			-				-

Otherwise the generated __NR__sysctl define will be lost from
unistd.h, which should not happen. Looking at the link above it
_looks_ like a similar mistake was done for arm64.

> diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> index 0193f9b98753..eb77d0d01d8f 100644
> --- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> +++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
> @@ -138,7 +138,6 @@
>  146  common	writev			sys_writev			compat_sys_writev
>  147  common	getsid			sys_getsid			sys_getsid
>  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> -149  common	_sysctl			sys_ni_syscall

Same here.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
  2020-06-18 11:27   ` Heiko Carstens
@ 2020-06-18 11:52     ` Will Deacon
  -1 siblings, 0 replies; 10+ messages in thread
From: Will Deacon @ 2020-06-18 11:52 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Xiaoming Ni, acme, alexander.shishkin, arnd, borntraeger,
	catalin.marinas, christian, cyphar, dhowells, ebiederm,
	fenghua.yu, geert, gor, ink, jolsa, linux, lkp, mark.rutland,
	mattst88, minchan, mingo, monstr, namhyung, peterz, rth, sargun,
	sfr, tony.luck, akpm, alex.huangjianhui, zhongjubin,
	linux-kernel, linux-s390, clang-built-linux, kbuild-all,
	linux-mm

On Thu, Jun 18, 2020 at 01:27:02PM +0200, Heiko Carstens wrote:
> On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
> > Build error on s390:
> > 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
> > 	>> (.rodata+0x1288): undefined reference to `__s390_'
> > 
> > In commit ("All arch: remove system call sys_sysctl")
> >  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> > -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
> > +149  common	_sysctl			sys_ni_syscall
> >  150  common	mlock			sys_mlock			sys_mlock
> > 
> > After the patch is integrated, there is a format error in the generated
> > arch/s390/include/generated/asm/syscall_table.h:
> > 	SYSCALL(sys_fdatasync, sys_fdatasync)
> > 	SYSCALL(sys_ni_syscall,) /* cause build error */
> > 	SYSCALL(sys_mlock,sys_mlock)
> > 
> > There are holes in the system call number in
> >  arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
> > these hole numbers will be automatically filled with "NI_SYSCALL".
> > Therefore, delete the number 149 to fix the current compilation failure.
> >  Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
> > 
> > Fixes: ("All arch: remove system call sys_sysctl")
> > Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
> > ---
> >  arch/s390/kernel/syscalls/syscall.tbl           | 1 -
> >  tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
> >  2 files changed, 2 deletions(-)
> > 
> > diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
> > index f17aaf6fe5de..bcaf93994e3c 100644
> > --- a/arch/s390/kernel/syscalls/syscall.tbl
> > +++ b/arch/s390/kernel/syscalls/syscall.tbl
> > @@ -138,7 +138,6 @@
> >  146  common	writev			sys_writev			compat_sys_writev
> >  147  common	getsid			sys_getsid			sys_getsid
> >  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> > -149  common	_sysctl			sys_ni_syscall
> 
> This is not correct. It should be changed to:
> 
>    149  common	_sysctl			-				-
> 
> Otherwise the generated __NR__sysctl define will be lost from
> unistd.h, which should not happen. Looking at the link above it
> _looks_ like a similar mistake was done for arm64.

I think we're ok on arm64, since it's only the compat syscall table that
is being updated and we don't export compat uapi headers (rather, they
come from arch/arm/).

Will

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 11:52     ` Will Deacon
  0 siblings, 0 replies; 10+ messages in thread
From: Will Deacon @ 2020-06-18 11:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2557 bytes --]

On Thu, Jun 18, 2020 at 01:27:02PM +0200, Heiko Carstens wrote:
> On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
> > Build error on s390:
> > 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
> > 	>> (.rodata+0x1288): undefined reference to `__s390_'
> > 
> > In commit ("All arch: remove system call sys_sysctl")
> >  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> > -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
> > +149  common	_sysctl			sys_ni_syscall
> >  150  common	mlock			sys_mlock			sys_mlock
> > 
> > After the patch is integrated, there is a format error in the generated
> > arch/s390/include/generated/asm/syscall_table.h:
> > 	SYSCALL(sys_fdatasync, sys_fdatasync)
> > 	SYSCALL(sys_ni_syscall,) /* cause build error */
> > 	SYSCALL(sys_mlock,sys_mlock)
> > 
> > There are holes in the system call number in
> >  arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
> > these hole numbers will be automatically filled with "NI_SYSCALL".
> > Therefore, delete the number 149 to fix the current compilation failure.
> >  Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
> > 
> > Fixes: ("All arch: remove system call sys_sysctl")
> > Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming(a)huawei.com/
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
> > ---
> >  arch/s390/kernel/syscalls/syscall.tbl           | 1 -
> >  tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
> >  2 files changed, 2 deletions(-)
> > 
> > diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
> > index f17aaf6fe5de..bcaf93994e3c 100644
> > --- a/arch/s390/kernel/syscalls/syscall.tbl
> > +++ b/arch/s390/kernel/syscalls/syscall.tbl
> > @@ -138,7 +138,6 @@
> >  146  common	writev			sys_writev			compat_sys_writev
> >  147  common	getsid			sys_getsid			sys_getsid
> >  148  common	fdatasync		sys_fdatasync			sys_fdatasync
> > -149  common	_sysctl			sys_ni_syscall
> 
> This is not correct. It should be changed to:
> 
>    149  common	_sysctl			-				-
> 
> Otherwise the generated __NR__sysctl define will be lost from
> unistd.h, which should not happen. Looking at the link above it
> _looks_ like a similar mistake was done for arm64.

I think we're ok on arm64, since it's only the compat syscall table that
is being updated and we don't export compat uapi headers (rather, they
come from arch/arm/).

Will

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
  2020-06-18 11:27   ` Heiko Carstens
  (?)
@ 2020-06-18 13:49     ` Xiaoming Ni
  -1 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 13:49 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: acme, alexander.shishkin, arnd, borntraeger, catalin.marinas,
	christian, cyphar, dhowells, ebiederm, fenghua.yu, geert, gor,
	ink, jolsa, linux, lkp, mark.rutland, mattst88, minchan, mingo,
	monstr, namhyung, peterz, rth, sargun, sfr, tony.luck, will,
	akpm, alex.huangjianhui, zhongjubin, linux-kernel, linux-s390,
	clang-built-linux, kbuild-all, linux-mm

On 2020/6/18 19:27, Heiko Carstens wrote:
> On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
>> Build error on s390:
>> 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
>> 	>> (.rodata+0x1288): undefined reference to `__s390_'
>>
>> In commit ("All arch: remove system call sys_sysctl")
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
>> +149  common	_sysctl			sys_ni_syscall
>>   150  common	mlock			sys_mlock			sys_mlock
>>
>> After the patch is integrated, there is a format error in the generated
>> arch/s390/include/generated/asm/syscall_table.h:
>> 	SYSCALL(sys_fdatasync, sys_fdatasync)
>> 	SYSCALL(sys_ni_syscall,) /* cause build error */
>> 	SYSCALL(sys_mlock,sys_mlock)
>>
>> There are holes in the system call number in
>>   arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
>> these hole numbers will be automatically filled with "NI_SYSCALL".
>> Therefore, delete the number 149 to fix the current compilation failure.
>>   Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
>>
>> Fixes: ("All arch: remove system call sys_sysctl")
>> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
>> ---
>>   arch/s390/kernel/syscalls/syscall.tbl           | 1 -
>>   tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
>>   2 files changed, 2 deletions(-)
>>
>> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
>> index f17aaf6fe5de..bcaf93994e3c 100644
>> --- a/arch/s390/kernel/syscalls/syscall.tbl
>> +++ b/arch/s390/kernel/syscalls/syscall.tbl
>> @@ -138,7 +138,6 @@
>>   146  common	writev			sys_writev			compat_sys_writev
>>   147  common	getsid			sys_getsid			sys_getsid
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_ni_syscall
> 
> This is not correct. It should be changed to:
> 
>     149  common	_sysctl			-				-
> 
thanks for your guidance

> Otherwise the generated __NR__sysctl define will be lost from
> unistd.h, which should not happen. Looking at the link above it
> _looks_ like a similar mistake was done for arm64.
> 
Using holes will cause the definition of __NR__sysctl to be missing in 
include/asm/unistd_32.h and include/asm/unistd_64.h

For arm64, I observed that "sys_afs_syscall", "sys_get_kernel_syms" and 
other commented out syscalls have no corresponding definition _NR_XXX in 
unistd.h, is it not a problem on arm64?

                         /* 127 was sys_create_module */
__SYSCALL(127, sys_ni_syscall)

                         /* 130 was sys_get_kernel_syms */
__SYSCALL(130, sys_ni_syscall)

                         /* 137 was sys_afs_syscall */
__SYSCALL(137, sys_ni_syscall)


Thanks
Xiaoming Ni



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 13:49     ` Xiaoming Ni
  0 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 13:49 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: acme, alexander.shishkin, arnd, borntraeger, catalin.marinas,
	christian, cyphar, dhowells, ebiederm, fenghua.yu, geert, gor,
	ink, jolsa, linux, lkp, mark.rutland, mattst88, minchan, mingo,
	monstr, namhyung, peterz, rth, sargun, sfr, tony.luck, will,
	akpm, alex.huangjianhui, zhongjubin, linux-kernel, linux-s390,
	clang-built-linux, kbuild-all, linux-mm

On 2020/6/18 19:27, Heiko Carstens wrote:
> On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
>> Build error on s390:
>> 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
>> 	>> (.rodata+0x1288): undefined reference to `__s390_'
>>
>> In commit ("All arch: remove system call sys_sysctl")
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
>> +149  common	_sysctl			sys_ni_syscall
>>   150  common	mlock			sys_mlock			sys_mlock
>>
>> After the patch is integrated, there is a format error in the generated
>> arch/s390/include/generated/asm/syscall_table.h:
>> 	SYSCALL(sys_fdatasync, sys_fdatasync)
>> 	SYSCALL(sys_ni_syscall,) /* cause build error */
>> 	SYSCALL(sys_mlock,sys_mlock)
>>
>> There are holes in the system call number in
>>   arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
>> these hole numbers will be automatically filled with "NI_SYSCALL".
>> Therefore, delete the number 149 to fix the current compilation failure.
>>   Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
>>
>> Fixes: ("All arch: remove system call sys_sysctl")
>> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
>> ---
>>   arch/s390/kernel/syscalls/syscall.tbl           | 1 -
>>   tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
>>   2 files changed, 2 deletions(-)
>>
>> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
>> index f17aaf6fe5de..bcaf93994e3c 100644
>> --- a/arch/s390/kernel/syscalls/syscall.tbl
>> +++ b/arch/s390/kernel/syscalls/syscall.tbl
>> @@ -138,7 +138,6 @@
>>   146  common	writev			sys_writev			compat_sys_writev
>>   147  common	getsid			sys_getsid			sys_getsid
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_ni_syscall
> 
> This is not correct. It should be changed to:
> 
>     149  common	_sysctl			-				-
> 
thanks for your guidance

> Otherwise the generated __NR__sysctl define will be lost from
> unistd.h, which should not happen. Looking at the link above it
> _looks_ like a similar mistake was done for arm64.
> 
Using holes will cause the definition of __NR__sysctl to be missing in 
include/asm/unistd_32.h and include/asm/unistd_64.h

For arm64, I observed that "sys_afs_syscall", "sys_get_kernel_syms" and 
other commented out syscalls have no corresponding definition _NR_XXX in 
unistd.h, is it not a problem on arm64?

                         /* 127 was sys_create_module */
__SYSCALL(127, sys_ni_syscall)

                         /* 130 was sys_get_kernel_syms */
__SYSCALL(130, sys_ni_syscall)

                         /* 137 was sys_afs_syscall */
__SYSCALL(137, sys_ni_syscall)


Thanks
Xiaoming Ni

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] s390: fix build error for sys_call_table_emu
@ 2020-06-18 13:49     ` Xiaoming Ni
  0 siblings, 0 replies; 10+ messages in thread
From: Xiaoming Ni @ 2020-06-18 13:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2977 bytes --]

On 2020/6/18 19:27, Heiko Carstens wrote:
> On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
>> Build error on s390:
>> 	arch/s390/kernel/entry.o: in function `sys_call_table_emu':
>> 	>> (.rodata+0x1288): undefined reference to `__s390_'
>>
>> In commit ("All arch: remove system call sys_sysctl")
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_sysctl			compat_sys_sysctl
>> +149  common	_sysctl			sys_ni_syscall
>>   150  common	mlock			sys_mlock			sys_mlock
>>
>> After the patch is integrated, there is a format error in the generated
>> arch/s390/include/generated/asm/syscall_table.h:
>> 	SYSCALL(sys_fdatasync, sys_fdatasync)
>> 	SYSCALL(sys_ni_syscall,) /* cause build error */
>> 	SYSCALL(sys_mlock,sys_mlock)
>>
>> There are holes in the system call number in
>>   arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h,
>> these hole numbers will be automatically filled with "NI_SYSCALL".
>> Therefore, delete the number 149 to fix the current compilation failure.
>>   Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
>>
>> Fixes: ("All arch: remove system call sys_sysctl")
>> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming(a)huawei.com/
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
>> ---
>>   arch/s390/kernel/syscalls/syscall.tbl           | 1 -
>>   tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
>>   2 files changed, 2 deletions(-)
>>
>> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
>> index f17aaf6fe5de..bcaf93994e3c 100644
>> --- a/arch/s390/kernel/syscalls/syscall.tbl
>> +++ b/arch/s390/kernel/syscalls/syscall.tbl
>> @@ -138,7 +138,6 @@
>>   146  common	writev			sys_writev			compat_sys_writev
>>   147  common	getsid			sys_getsid			sys_getsid
>>   148  common	fdatasync		sys_fdatasync			sys_fdatasync
>> -149  common	_sysctl			sys_ni_syscall
> 
> This is not correct. It should be changed to:
> 
>     149  common	_sysctl			-				-
> 
thanks for your guidance

> Otherwise the generated __NR__sysctl define will be lost from
> unistd.h, which should not happen. Looking at the link above it
> _looks_ like a similar mistake was done for arm64.
> 
Using holes will cause the definition of __NR__sysctl to be missing in 
include/asm/unistd_32.h and include/asm/unistd_64.h

For arm64, I observed that "sys_afs_syscall", "sys_get_kernel_syms" and 
other commented out syscalls have no corresponding definition _NR_XXX in 
unistd.h, is it not a problem on arm64?

                         /* 127 was sys_create_module */
__SYSCALL(127, sys_ni_syscall)

                         /* 130 was sys_get_kernel_syms */
__SYSCALL(130, sys_ni_syscall)

                         /* 137 was sys_afs_syscall */
__SYSCALL(137, sys_ni_syscall)


Thanks
Xiaoming Ni


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-18 13:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 11:03 [PATCH] s390: fix build error for sys_call_table_emu Xiaoming Ni
2020-06-18 11:03 ` Xiaoming Ni
2020-06-18 11:03 ` Xiaoming Ni
2020-06-18 11:27 ` Heiko Carstens
2020-06-18 11:27   ` Heiko Carstens
2020-06-18 11:52   ` Will Deacon
2020-06-18 11:52     ` Will Deacon
2020-06-18 13:49   ` Xiaoming Ni
2020-06-18 13:49     ` Xiaoming Ni
2020-06-18 13:49     ` Xiaoming Ni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.