public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit
@ 2023-10-17  8:29 Jiri Slaby (SUSE)
  2023-10-17  8:30 ` Jiri Slaby
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-10-17  8:29 UTC (permalink / raw)
  To: keescook; +Cc: linux-kernel, Andrei Vagin, Peter Zijlstra (Intel), Jiri Slaby

From: Andrei Vagin <avagin@google.com>

Commit 7d5cb68af638 (perf/benchmark: add a new benchmark for
seccom_unotify) added a reference to __NR_seccomp into perf. This is
fine as it added also a definition of __NR_seccomp for 64-bit. But it
failed to do so for 32-bit as instead of ifndef, ifdef was used.

Fix this typo (so fix the build of perf on 32-bit).

Fixes: 7d5cb68af638 (perf/benchmark: add a new benchmark for seccom_unotify)
Cc: Andrei Vagin <avagin@google.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
 tools/arch/x86/include/uapi/asm/unistd_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h
index 4798f9d18fe8..9de35df1afc3 100644
--- a/tools/arch/x86/include/uapi/asm/unistd_32.h
+++ b/tools/arch/x86/include/uapi/asm/unistd_32.h
@@ -26,6 +26,6 @@
 #ifndef __NR_setns
 #define __NR_setns 346
 #endif
-#ifdef __NR_seccomp
+#ifndef __NR_seccomp
 #define __NR_seccomp 354
 #endif
-- 
2.42.0


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

* [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit
@ 2023-10-17  8:30 Jiri Slaby (SUSE)
  2023-10-17 16:51 ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-10-17  8:30 UTC (permalink / raw)
  To: keescook
  Cc: linux-kernel, Jiri Slaby (SUSE), Andrei Vagin,
	Peter Zijlstra (Intel)

Commit 7d5cb68af638 (perf/benchmark: add a new benchmark for
seccom_unotify) added a reference to __NR_seccomp into perf. This is
fine as it added also a definition of __NR_seccomp for 64-bit. But it
failed to do so for 32-bit as instead of ifndef, ifdef was used.

Fix this typo (so fix the build of perf on 32-bit).

Fixes: 7d5cb68af638 (perf/benchmark: add a new benchmark for seccom_unotify)
Cc: Andrei Vagin <avagin@google.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
 tools/arch/x86/include/uapi/asm/unistd_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h
index 4798f9d18fe8..9de35df1afc3 100644
--- a/tools/arch/x86/include/uapi/asm/unistd_32.h
+++ b/tools/arch/x86/include/uapi/asm/unistd_32.h
@@ -26,6 +26,6 @@
 #ifndef __NR_setns
 #define __NR_setns 346
 #endif
-#ifdef __NR_seccomp
+#ifndef __NR_seccomp
 #define __NR_seccomp 354
 #endif
-- 
2.42.0


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

* Re: [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit
  2023-10-17  8:29 [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit Jiri Slaby (SUSE)
@ 2023-10-17  8:30 ` Jiri Slaby
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2023-10-17  8:30 UTC (permalink / raw)
  To: keescook; +Cc: linux-kernel, Andrei Vagin, Peter Zijlstra (Intel)

Ignore this one, I mangled authorship.

On 17. 10. 23, 10:29, Jiri Slaby (SUSE) wrote:
> From: Andrei Vagin <avagin@google.com>
> 
> Commit 7d5cb68af638 (perf/benchmark: add a new benchmark for
> seccom_unotify) added a reference to __NR_seccomp into perf. This is
> fine as it added also a definition of __NR_seccomp for 64-bit. But it
> failed to do so for 32-bit as instead of ifndef, ifdef was used.
> 
> Fix this typo (so fix the build of perf on 32-bit).
> 
> Fixes: 7d5cb68af638 (perf/benchmark: add a new benchmark for seccom_unotify)
> Cc: Andrei Vagin <avagin@google.com>
> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
> Cc: Kees Cook <keescook@chromium.org>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> ---
>   tools/arch/x86/include/uapi/asm/unistd_32.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h
> index 4798f9d18fe8..9de35df1afc3 100644
> --- a/tools/arch/x86/include/uapi/asm/unistd_32.h
> +++ b/tools/arch/x86/include/uapi/asm/unistd_32.h
> @@ -26,6 +26,6 @@
>   #ifndef __NR_setns
>   #define __NR_setns 346
>   #endif
> -#ifdef __NR_seccomp
> +#ifndef __NR_seccomp
>   #define __NR_seccomp 354
>   #endif

-- 
js
suse labs


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

* Re: [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit
  2023-10-17  8:30 Jiri Slaby (SUSE)
@ 2023-10-17 16:51 ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2023-10-17 16:51 UTC (permalink / raw)
  To: Jiri Slaby (SUSE)
  Cc: Kees Cook, linux-kernel, Andrei Vagin, Peter Zijlstra (Intel)

On Tue, 17 Oct 2023 10:30:19 +0200, Jiri Slaby (SUSE) wrote:
> Commit 7d5cb68af638 (perf/benchmark: add a new benchmark for
> seccom_unotify) added a reference to __NR_seccomp into perf. This is
> fine as it added also a definition of __NR_seccomp for 64-bit. But it
> failed to do so for 32-bit as instead of ifndef, ifdef was used.
> 
> Fix this typo (so fix the build of perf on 32-bit).
> 
> [...]

Applied to for-linus/seccomp, thanks!

[1/1] perf/benchmark: fix seccom_unotify benchmark for 32-bit
      https://git.kernel.org/kees/c/65159865e69e

Take care,

-- 
Kees Cook


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

end of thread, other threads:[~2023-10-17 16:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17  8:29 [PATCH] perf/benchmark: fix seccom_unotify benchmark for 32-bit Jiri Slaby (SUSE)
2023-10-17  8:30 ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2023-10-17  8:30 Jiri Slaby (SUSE)
2023-10-17 16:51 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox