From nobody Wed Jan 22 09:42:25 2025 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66D662EAE6 for ; Wed, 22 Jan 2025 00:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737504888; cv=none; b=NErH9xH0LpZn2jf2isbPSTWkL/TJi6UQKMzAWkQ94Ljezfb01wZhwlUQ158lsEJvGDke+shZEZ7pae6E9hKYzuS9gMk19PKswGzLwBtH0Eu+Pj0rElzcA2nn4HG1O0NS7NqIxMq4s4Em+XLddTmKOwllyRCTbmi86iuvs+9x4tA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737504888; c=relaxed/simple; bh=FwYJaStDXdGMdB0qjyLfGzemUoqUNCxgZQGdmS2F2P4=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=FvSPapgeZL3bjQLE95RXMD82YXB4ExnLI6iGSLSDbZfMvHbVqt3hJowCVMp8egIZkH1/f7fZbMS9k9bhdsuBKCbPTZjpWELweBwEmQTqdFnDcuczhhzU03QEzVv9ofbZCfaSZPWaFFpWowpGWiVUh6cOGnInJZ5dC/oEaPX/bWY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NLsbktni; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NLsbktni" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2ef35de8901so11457352a91.3 for ; Tue, 21 Jan 2025 16:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737504886; x=1738109686; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=pYaho9hyTknTGpu45IGAstiusf8bXdQAQ8h+cpS7izU=; b=NLsbktni8x9mcg7HDYF3pOWi20awZqkVSSFdHlbZs+3uXW5+MxFjhbSgURI9C/V/NC OCdMj1ZjycqKUSKgvuFeN3rYJ/VMb1c7xpmhvNJLmXtvDXLljQ2iF5rGvMG6CJz9aJOK pXZYhMOYw60Ni1jyE5XFAP6hnVbV08ViFQkUtON3yEYwZ66I4gS7Can/dCAZKV71sxj5 Q4LOZm2RSr2oRDeRRecFjY5NvMU0fuFOTaHT6NfYOQySwpEDwm5DFNqdSrS6dx4DEfmR Ao3lc1XnTrzMZe/0rbJKYdxpa15AwoSwA0L4ufJ5ElhzvCDqKFS9iBZlph9PvRH1wZSM xdKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737504886; x=1738109686; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pYaho9hyTknTGpu45IGAstiusf8bXdQAQ8h+cpS7izU=; b=N9QFLGWiwoSrAXgdLW0TKNOQxLDRT8WkpTUY8FcvkQAnwIbZgX+LiltTbxm8CeUKkS 8/66vfG0dynpp+bwSMS6LloXp38uO560iwbp5lrOghCTmtQppqkWYc3rV8BdEwczpJzZ t7nHd+szVmEbHmCvdMSbdgnqMI9cr5dhgj6wBEhbovIeazv5Tti1wB6K95kTrX32MOMJ e8y82ngFYYnuG0NnZn46/h6BSw3Q+0JMHzgIqMlfsemusIxoRiy5cABZvHmCCUjUh48X kMAudm6LC3tU0oO5nLYPTEYUmyDfoo9DQLwqH3yvfpV4SEL/rPAukJT0hNxDN45I+lBr e1vA== X-Forwarded-Encrypted: i=1; AJvYcCWpPVE518P5Qsvy/AgqeGhtH5DWEqNBP7+aa9T/jOpNVmA2+BxiMJXDsj+9BYMWXaZu5d0/sY00hSVy3Kw=@vger.kernel.org X-Gm-Message-State: AOJu0YxNwZjbs6vb90zKgFzYUdFQ5+VQZt/Ok5RRRzmuo5wTlpnS6OzS d4sSfE/B/415LlMWtUi7R5YFsHeqDfRI8bnBs0cj7a2Tm0oW04w1VHOOCZje8I2SlsVTNuVzP3x PXA0ubQ== X-Google-Smtp-Source: AGHT+IETq99d638srfDvUmEZerQh8rahFiGVspnc2A9FdV/8o4aliKIB++mQUz3umfayyWSxK4GsSygnKQ4G X-Received: from pjty12.prod.google.com ([2002:a17:90a:ca8c:b0:2ef:95f4:4619]) (user=mmaurer job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:d444:b0:2f1:2fa5:1924 with SMTP id 98e67ed59e1d1-2f782d38336mr24033784a91.26.1737504885662; Tue, 21 Jan 2025 16:14:45 -0800 (PST) Date: Wed, 22 Jan 2025 00:14:43 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHI4kGcC/x3MwQrCMAyA4VcZORtoC3PFVxEP2Zp2YVglcToZe 3eLx+/w/zsYq7DBpdtB+S0mj9rgTx1MM9XCKKkZggu98/6MhWv6kObFvnfDhYwq6movDGMaaXJ hyDFCy5/KWbb/+no7jh/MAxueagAAAA== X-Change-Id: 20250116-gendwarfksyms-kasan-rust-2bdbac027f88 X-Mailer: b4 0.15-dev Message-ID: <20250122-gendwarfksyms-kasan-rust-v1-1-5ee5658f4fb6@google.com> Subject: [PATCH] rust: Do not export generated KASAN ODR symbols From: Matthew Maurer To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Maurer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Acked-by: Miguel Ojeda Reviewed-by: Alice Ryhl --- rust/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Makefile b/rust/Makefile index ab300bfb46f6a3e386b86d58120d7aeddc57da37..4f212bd41e74ec9f25445d3af76= 818332f288e15 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -329,7 +329,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: private = bindgen_target_extra =3D ; $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers/helpers.c FO= RCE $(call if_changed_dep,bindgen) =20 -rust_exports =3D $(NM) -p --defined-only $(1) | awk '$$2~/(T|R|D|B)/ && $$= 3!~/__cfi/ { printf $(2),$$3 }' +rust_exports =3D $(NM) -p --defined-only $(1) | awk '$$2~/(T|R|D|B)/ && $$= 3!~/__cfi/ && $$3!~/__odr_asan/ { printf $(2),$$3 }' =20 quiet_cmd_exports =3D EXPORTS $@ cmd_exports =3D \ --- base-commit: 0939156bc07c9fd2b554d9813352c386dacfc3d9 change-id: 20250116-gendwarfksyms-kasan-rust-2bdbac027f88 Best regards, --=20 Matthew Maurer