LKML Archive mirror
 help / color / mirror / Atom feed
* [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
@ 2023-06-09  9:10 tip-bot2 for Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot2 for Ingo Molnar @ 2023-06-09  9:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Ingo Molnar, Josh Poimboeuf, linux-kernel, Peter Zijlstra, x86

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     f2d89c50301987db9e9252919fb6ce2ecdb667c7
Gitweb:        https://git.kernel.org/tip/f2d89c50301987db9e9252919fb6ce2ecdb667c7
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Fri, 09 Jun 2023 11:04:53 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 09 Jun 2023 11:04:53 +02:00

x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y

Recent commit:

  020126239b8f Revert "x86/orc: Make it callthunk aware"

Made the only user of is_callthunk() depend on CONFIG_BPF_JIT=y, while
the definition of the helper function is unconditional.

Addresses this build failure:

   arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function]

Move is_callthunk() inside the #ifdef block.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
---
 arch/x86/kernel/callthunks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/callthunks.c b/arch/x86/kernel/callthunks.c
index 8e0a9b6..fcb8eea 100644
--- a/arch/x86/kernel/callthunks.c
+++ b/arch/x86/kernel/callthunks.c
@@ -293,6 +293,7 @@ void *callthunks_translate_call_dest(void *dest)
 	return target ? : dest;
 }
 
+#ifdef CONFIG_BPF_JIT
 static bool is_callthunk(void *addr)
 {
 	unsigned int tmpl_size = SKL_TMPL_SIZE;
@@ -306,7 +307,6 @@ static bool is_callthunk(void *addr)
 	return !bcmp((void *)(dest - tmpl_size), tmpl, tmpl_size);
 }
 
-#ifdef CONFIG_BPF_JIT
 int x86_call_depth_emit_accounting(u8 **pprog, void *func)
 {
 	unsigned int tmpl_size = SKL_TMPL_SIZE;

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

* [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
@ 2023-06-09  9:18 tip-bot2 for Ingo Molnar
  2023-06-09 21:24 ` Josh Poimboeuf
  0 siblings, 1 reply; 3+ messages in thread
From: tip-bot2 for Ingo Molnar @ 2023-06-09  9:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Ingo Molnar, Josh Poimboeuf, linux-kernel, Peter Zijlstra, x86

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     301cf77e21317b3465c5e2bb0188df24bbf1c2e2
Gitweb:        https://git.kernel.org/tip/301cf77e21317b3465c5e2bb0188df24bbf1c2e2
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Fri, 09 Jun 2023 11:04:53 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 09 Jun 2023 11:09:04 +02:00

x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y

Recent commit:

  020126239b8f Revert "x86/orc: Make it callthunk aware"

Made the only user of is_callthunk() depend on CONFIG_BPF_JIT=y, while
the definition of the helper function is unconditional.

Move is_callthunk() inside the #ifdef block.

Addresses this build failure:

   arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function]

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
---
 arch/x86/kernel/callthunks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/callthunks.c b/arch/x86/kernel/callthunks.c
index 8e0a9b6..fcb8eea 100644
--- a/arch/x86/kernel/callthunks.c
+++ b/arch/x86/kernel/callthunks.c
@@ -293,6 +293,7 @@ void *callthunks_translate_call_dest(void *dest)
 	return target ? : dest;
 }
 
+#ifdef CONFIG_BPF_JIT
 static bool is_callthunk(void *addr)
 {
 	unsigned int tmpl_size = SKL_TMPL_SIZE;
@@ -306,7 +307,6 @@ static bool is_callthunk(void *addr)
 	return !bcmp((void *)(dest - tmpl_size), tmpl, tmpl_size);
 }
 
-#ifdef CONFIG_BPF_JIT
 int x86_call_depth_emit_accounting(u8 **pprog, void *func)
 {
 	unsigned int tmpl_size = SKL_TMPL_SIZE;

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

* Re: [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
  2023-06-09  9:18 [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y tip-bot2 for Ingo Molnar
@ 2023-06-09 21:24 ` Josh Poimboeuf
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Poimboeuf @ 2023-06-09 21:24 UTC (permalink / raw)
  To: tip-bot2 for Ingo Molnar
  Cc: linux-tip-commits, Ingo Molnar, linux-kernel, Peter Zijlstra, x86

On Fri, Jun 09, 2023 at 09:18:13AM -0000, tip-bot2 for Ingo Molnar wrote:
> The following commit has been merged into the objtool/core branch of tip:
> 
> Commit-ID:     301cf77e21317b3465c5e2bb0188df24bbf1c2e2
> Gitweb:        https://git.kernel.org/tip/301cf77e21317b3465c5e2bb0188df24bbf1c2e2
> Author:        Ingo Molnar <mingo@kernel.org>
> AuthorDate:    Fri, 09 Jun 2023 11:04:53 +02:00
> Committer:     Ingo Molnar <mingo@kernel.org>
> CommitterDate: Fri, 09 Jun 2023 11:09:04 +02:00
> 
> x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y
> 
> Recent commit:
> 
>   020126239b8f Revert "x86/orc: Make it callthunk aware"
> 
> Made the only user of is_callthunk() depend on CONFIG_BPF_JIT=y, while
> the definition of the helper function is unconditional.
> 
> Move is_callthunk() inside the #ifdef block.
> 
> Addresses this build failure:
> 
>    arch/x86/kernel/callthunks.c:296:13: error: ‘is_callthunk’ defined but not used [-Werror=unused-function]

Sorry about that.  The bots didn't complain for some reason :-/

-- 
Josh

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

end of thread, other threads:[~2023-06-09 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09  9:18 [tip: objtool/core] x86/orc: Make the is_callthunk() definition depend on CONFIG_BPF_JIT=y tip-bot2 for Ingo Molnar
2023-06-09 21:24 ` Josh Poimboeuf
  -- strict thread matches above, loose matches on Subject: below --
2023-06-09  9:10 tip-bot2 for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).