rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: Do not export generated KASAN ODR symbols
@ 2025-01-22  0:14 Matthew Maurer
  2025-01-22  8:38 ` Alice Ryhl
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Matthew Maurer @ 2025-01-22  0:14 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross
  Cc: rust-for-linux, linux-kernel, Matthew Maurer

ASAN generates sppecial synthetic symbols to help check for ODR
violations. These synthetic symbols lack debug information, so
gendwarfksyms emits warnings when processing them. No code should ever
have a dependency on these symbols, so we should not be exporting them,
just like the __cfi symbols.

Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
 rust/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/Makefile b/rust/Makefile
index ab300bfb46f6a3e386b86d58120d7aeddc57da37..4f212bd41e74ec9f25445d3af76818332f288e15 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -329,7 +329,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: private bindgen_target_extra = ;
 $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers/helpers.c FORCE
 	$(call if_changed_dep,bindgen)
 
-rust_exports = $(NM) -p --defined-only $(1) | awk '$$2~/(T|R|D|B)/ && $$3!~/__cfi/ { printf $(2),$$3 }'
+rust_exports = $(NM) -p --defined-only $(1) | awk '$$2~/(T|R|D|B)/ && $$3!~/__cfi/ && $$3!~/__odr_asan/ { printf $(2),$$3 }'
 
 quiet_cmd_exports = EXPORTS $@
       cmd_exports = \

---
base-commit: 0939156bc07c9fd2b554d9813352c386dacfc3d9
change-id: 20250116-gendwarfksyms-kasan-rust-2bdbac027f88

Best regards,
-- 
Matthew Maurer <mmaurer@google.com>


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

end of thread, other threads:[~2025-02-06 23:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22  0:14 [PATCH] rust: Do not export generated KASAN ODR symbols Matthew Maurer
2025-01-22  8:38 ` Alice Ryhl
2025-01-22  9:11 ` Miguel Ojeda
2025-02-05 20:08   ` Matthew Maurer
2025-02-05 23:00     ` Miguel Ojeda
2025-02-05 23:03       ` Matthew Maurer
2025-02-05 23:08         ` Miguel Ojeda
2025-02-05 23:12           ` Matthew Maurer
2025-02-05 23:13             ` Miguel Ojeda
2025-02-06 23:04 ` Miguel Ojeda

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).