lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1729737768-124596-2-git-send-email-alibuda@linux.alibaba.com>
Date: Thu, 24 Oct 2024 10:42:45 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com>
To: kgraul@...ux.ibm.com,
	wenjia@...ux.ibm.com,
	jaka@...ux.ibm.com,
	ast@...nel.org,
	daniel@...earbox.net,
	andrii@...nel.org,
	martin.lau@...ux.dev,
	pabeni@...hat.com,
	song@...nel.org,
	sdf@...gle.com,
	haoluo@...gle.com,
	yhs@...com,
	edumazet@...gle.com,
	john.fastabend@...il.com,
	kpsingh@...nel.org,
	jolsa@...nel.org,
	guwen@...ux.alibaba.com
Cc: kuba@...nel.org,
	davem@...emloft.net,
	netdev@...r.kernel.org,
	linux-s390@...r.kernel.org,
	linux-rdma@...r.kernel.org,
	bpf@...r.kernel.org,
	dtcccc@...ux.alibaba.com
Subject: [PATCH bpf-next 1/4] bpf: export necessary sympols for modules

From: "D. Wythe" <alibuda@...ux.alibaba.com>

This patch exports two necessary symbols for registering struct_ops
or kfunc with tristate subsystem.

Find the corresponding btf_id by name and type with
btf_find_by_name_kind().

And find the string in btf by offset with btf_str_by_offset(),
used to look up the names of structure members.

Signed-off-by: D. Wythe <alibuda@...ux.alibaba.com>
---
 kernel/bpf/btf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 75e4fe8..315e49b 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -567,6 +567,7 @@ s32 btf_find_by_name_kind(const struct btf *btf, const char *name, u8 kind)
 
 	return -ENOENT;
 }
+EXPORT_SYMBOL_GPL(btf_find_by_name_kind);
 
 s32 bpf_find_btf_id(const char *name, u32 kind, struct btf **btf_p)
 {
@@ -789,6 +790,7 @@ const char *btf_str_by_offset(const struct btf *btf, u32 offset)
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(btf_str_by_offset);
 
 static bool btf_name_valid_identifier(const struct btf *btf, u32 offset)
 {
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ