linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] lib/Kconfig.debug: add prompt for kernel module BTF
@ 2022-02-09  5:21 Connor O'Brien
  2022-02-09 19:27 ` Yonghong Song
  0 siblings, 1 reply; 2+ messages in thread
From: Connor O'Brien @ 2022-02-09  5:21 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, netdev, bpf, linux-kernel, Connor O'Brien

With DEBUG_INFO_BTF_MODULES enabled, a BTF mismatch between vmlinux
and a separately-built module prevents the module from loading, even
if the ABI is otherwise compatible and the module would otherwise load
without issues. Currently this can be avoided only by disabling BTF
entirely; disabling just module BTF would be sufficient but is not
possible with the current Kconfig.

Add a prompt for DEBUG_INFO_BTF_MODULES to allow it to be disabled
independently.

Signed-off-by: Connor O'Brien <connoro@google.com>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1555da672275..a6bbd4bb2bde 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -334,7 +334,7 @@ config PAHOLE_HAS_BTF_TAG
 	  these attributes, so make the config depend on CC_IS_CLANG.
 
 config DEBUG_INFO_BTF_MODULES
-	def_bool y
+	bool "Generate BTF typeinfo for modules"
 	depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
 	help
 	  Generate compact split BTF type information for kernel modules.
-- 
2.35.0.263.gb82422642f-goog


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

* Re: [PATCH bpf-next] lib/Kconfig.debug: add prompt for kernel module BTF
  2022-02-09  5:21 [PATCH bpf-next] lib/Kconfig.debug: add prompt for kernel module BTF Connor O'Brien
@ 2022-02-09 19:27 ` Yonghong Song
  0 siblings, 0 replies; 2+ messages in thread
From: Yonghong Song @ 2022-02-09 19:27 UTC (permalink / raw)
  To: Connor O'Brien, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: Martin KaFai Lau, Song Liu, John Fastabend, KP Singh, netdev,
	bpf, linux-kernel



On 2/8/22 9:21 PM, Connor O'Brien wrote:
> With DEBUG_INFO_BTF_MODULES enabled, a BTF mismatch between vmlinux
> and a separately-built module prevents the module from loading, even
> if the ABI is otherwise compatible and the module would otherwise load
> without issues. Currently this can be avoided only by disabling BTF
> entirely; disabling just module BTF would be sufficient but is not
> possible with the current Kconfig.
> 
> Add a prompt for DEBUG_INFO_BTF_MODULES to allow it to be disabled
> independently.
> 
> Signed-off-by: Connor O'Brien <connoro@google.com>

Acked-by: Yonghong Song <yhs@fb.com>

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

end of thread, other threads:[~2022-02-09 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09  5:21 [PATCH bpf-next] lib/Kconfig.debug: add prompt for kernel module BTF Connor O'Brien
2022-02-09 19:27 ` Yonghong Song

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 NNTP newsgroup(s).