All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools uapi asm: Update asm-generic/unistd.h
@ 2019-01-08 22:17 Laura Abbott
  2019-01-09 13:15 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Laura Abbott @ 2019-01-08 22:17 UTC (permalink / raw)
  To: Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: Laura Abbott, Peter Zijlstra, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-kernel, Arnd Bergmann

Commit 4e21565b7fd4 ("asm-generic: add kexec_file_load system
call to unistd.h") added the system call to the generic header
but not to the perf copy resulting a compile failure on aarch64
When running mksyscalltbl

BUILDSTDERR: <stdin>: In function 'main':
BUILDSTDERR: <stdin>:273:44: error: '__NR_kexec_file_load' undeclared (first use in this function)
BUILDSTDERR: <stdin>:273:44: note: each undeclared identifier is reported only once for each function it appears in

Fix this by syncing up.

Fixes: 4e21565b7fd4 ("asm-generic: add kexec_file_load system call to unistd.h")
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
Found this on Fedora when compiling 5.0-rc1, I hadn't seen a patch
queued yet.
---
 tools/include/uapi/asm-generic/unistd.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h
index c7f3321fbe43..d90127298f12 100644
--- a/tools/include/uapi/asm-generic/unistd.h
+++ b/tools/include/uapi/asm-generic/unistd.h
@@ -738,9 +738,11 @@ __SYSCALL(__NR_statx,     sys_statx)
 __SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents)
 #define __NR_rseq 293
 __SYSCALL(__NR_rseq, sys_rseq)
+#define __NR_kexec_file_load 294
+__SYSCALL(__NR_kexec_file_load,     sys_kexec_file_load)
 
 #undef __NR_syscalls
-#define __NR_syscalls 294
+#define __NR_syscalls 295
 
 /*
  * 32 bit systems traditionally used different
-- 
2.20.1


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

* Re: [PATCH] tools uapi asm: Update asm-generic/unistd.h
  2019-01-08 22:17 [PATCH] tools uapi asm: Update asm-generic/unistd.h Laura Abbott
@ 2019-01-09 13:15 ` Arnaldo Carvalho de Melo
  2019-01-09 15:29   ` Laura Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-01-09 13:15 UTC (permalink / raw)
  To: Laura Abbott
  Cc: Ingo Molnar, Peter Zijlstra, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-kernel, Arnd Bergmann

Em Tue, Jan 08, 2019 at 02:17:58PM -0800, Laura Abbott escreveu:
> Commit 4e21565b7fd4 ("asm-generic: add kexec_file_load system
> call to unistd.h") added the system call to the generic header
> but not to the perf copy resulting a compile failure on aarch64

Humm, that shouldn't happen, i.e. kernel developers don't have to update
anything in tools/ as part of their normal kernel development workflows.

They can if they wish, but are not required, so the build failure was
due to something else or a pre-existing bug where tools/ living stuff
used things outside tools/.

> When running mksyscalltbl

Lemme try this on my Orangi PI zero... 

- Arnaldo

> BUILDSTDERR: <stdin>: In function 'main':
> BUILDSTDERR: <stdin>:273:44: error: '__NR_kexec_file_load' undeclared (first use in this function)
> BUILDSTDERR: <stdin>:273:44: note: each undeclared identifier is reported only once for each function it appears in
> 
> Fix this by syncing up.
> 
> Fixes: 4e21565b7fd4 ("asm-generic: add kexec_file_load system call to unistd.h")
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
> Found this on Fedora when compiling 5.0-rc1, I hadn't seen a patch
> queued yet.
> ---
>  tools/include/uapi/asm-generic/unistd.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h
> index c7f3321fbe43..d90127298f12 100644
> --- a/tools/include/uapi/asm-generic/unistd.h
> +++ b/tools/include/uapi/asm-generic/unistd.h
> @@ -738,9 +738,11 @@ __SYSCALL(__NR_statx,     sys_statx)
>  __SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents)
>  #define __NR_rseq 293
>  __SYSCALL(__NR_rseq, sys_rseq)
> +#define __NR_kexec_file_load 294
> +__SYSCALL(__NR_kexec_file_load,     sys_kexec_file_load)
>  
>  #undef __NR_syscalls
> -#define __NR_syscalls 294
> +#define __NR_syscalls 295
>  
>  /*
>   * 32 bit systems traditionally used different
> -- 
> 2.20.1

-- 

- Arnaldo

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

* Re: [PATCH] tools uapi asm: Update asm-generic/unistd.h
  2019-01-09 13:15 ` Arnaldo Carvalho de Melo
@ 2019-01-09 15:29   ` Laura Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Laura Abbott @ 2019-01-09 15:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Peter Zijlstra, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, linux-kernel, Arnd Bergmann

On 1/9/19 5:15 AM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 08, 2019 at 02:17:58PM -0800, Laura Abbott escreveu:
>> Commit 4e21565b7fd4 ("asm-generic: add kexec_file_load system
>> call to unistd.h") added the system call to the generic header
>> but not to the perf copy resulting a compile failure on aarch64
> 
> Humm, that shouldn't happen, i.e. kernel developers don't have to update
> anything in tools/ as part of their normal kernel development workflows.
> 
> They can if they wish, but are not required, so the build failure was
> due to something else or a pre-existing bug where tools/ living stuff
> used things outside tools/.
> 

I think that's the issue, I couldn't reproduce the issue until I
installed the 5.0-rc1 headers. This is the invocation of the script
(paths trimmed)

/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl' 'gcc' 'gcc' /tools /tools/arch/arm64/include/uapi/asm/unistd.h > arch/arm64/include/generated/asm/syscalls.c


In tools/perf/arch/arm64/entry/syscalls/mksyscalltbl,

$hostcc -I $incpath/include/uapi -o $create_table_exe -x c -

This was the gcc command that was failing.
tools/arch/arm64/include/uapi/asm/unistd.h includes asm-generic/unistd.h
so I think that's what's leaking from the system.

>> When running mksyscalltbl
> 
> Lemme try this on my Orangi PI zero...
> 
> - Arnaldo
> >> BUILDSTDERR: <stdin>: In function 'main':
>> BUILDSTDERR: <stdin>:273:44: error: '__NR_kexec_file_load' undeclared (first use in this function)
>> BUILDSTDERR: <stdin>:273:44: note: each undeclared identifier is reported only once for each function it appears in
>>
>> Fix this by syncing up.
>>
>> Fixes: 4e21565b7fd4 ("asm-generic: add kexec_file_load system call to unistd.h")
>> Signed-off-by: Laura Abbott <labbott@redhat.com>
>> ---
>> Found this on Fedora when compiling 5.0-rc1, I hadn't seen a patch
>> queued yet.
>> ---
>>   tools/include/uapi/asm-generic/unistd.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h
>> index c7f3321fbe43..d90127298f12 100644
>> --- a/tools/include/uapi/asm-generic/unistd.h
>> +++ b/tools/include/uapi/asm-generic/unistd.h
>> @@ -738,9 +738,11 @@ __SYSCALL(__NR_statx,     sys_statx)
>>   __SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents)
>>   #define __NR_rseq 293
>>   __SYSCALL(__NR_rseq, sys_rseq)
>> +#define __NR_kexec_file_load 294
>> +__SYSCALL(__NR_kexec_file_load,     sys_kexec_file_load)
>>   
>>   #undef __NR_syscalls
>> -#define __NR_syscalls 294
>> +#define __NR_syscalls 295
>>   
>>   /*
>>    * 32 bit systems traditionally used different
>> -- 
>> 2.20.1
> 


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

end of thread, other threads:[~2019-01-09 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08 22:17 [PATCH] tools uapi asm: Update asm-generic/unistd.h Laura Abbott
2019-01-09 13:15 ` Arnaldo Carvalho de Melo
2019-01-09 15:29   ` Laura Abbott

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.