Files
linux/kernel
Yonghong Song 12c49ac4cf bpf: btf: check name validity for various types
[ Upstream commit eb04bbb608 ]

This patch added name checking for the following types:
 . BTF_KIND_PTR, BTF_KIND_ARRAY, BTF_KIND_VOLATILE,
   BTF_KIND_CONST, BTF_KIND_RESTRICT:
     the name must be null
 . BTF_KIND_STRUCT, BTF_KIND_UNION: the struct/member name
     is either null or a valid identifier
 . BTF_KIND_ENUM: the enum type name is either null or a valid
     identifier; the enumerator name must be a valid identifier.
 . BTF_KIND_FWD: the name must be a valid identifier
 . BTF_KIND_TYPEDEF: the name must be a valid identifier

For those places a valid name is required, the name must be
a valid C identifier. This can be relaxed later if we found
use cases for a different (non-C) frontend.

Fixes: 69b693f0ae ("bpf: btf: Introduce BPF Type Format (BTF)")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-13 08:52:09 +01:00
..
2019-12-01 09:17:13 +01:00
2019-12-13 08:51:11 +01:00
2019-05-31 06:46:17 -07:00
2019-12-01 09:17:17 +01:00
2018-04-27 14:34:51 +02:00
2019-12-01 09:17:38 +01:00
2019-01-13 09:51:06 +01:00
2018-07-03 09:20:44 +02:00
2018-06-07 16:56:28 -04:00