linux/Documentation
David Vernet 027bdec893 bpf/docs: Document the nocast aliasing behavior of ___init
When comparing BTF IDs for pointers being passed to kfunc arguments, the
verifier will allow pointer types that are equivalent according to the C
standard. For example, for:

struct bpf_cpumask {
	cpumask_t cpumask;
	refcount_t usage;
};

The verifier will allow a struct bpf_cpumask * to be passed to a kfunc
that takes a const struct cpumask * (cpumask_t is a typedef of struct
cpumask). The exception to this rule is if a type is suffixed with
___init, such as:

struct nf_conn___init {
	struct nf_conn ct;
};

The verifier will _not_ allow a struct nf_conn___init * to be passed to
a kfunc that expects a struct nf_conn *. This patch documents this
behavior in the kfuncs documentation page.

Signed-off-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20230125143816.721952-8-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-01-25 07:57:50 -08:00
..
2022-12-23 12:00:24 -08:00
2022-12-19 08:34:39 -06:00
2022-12-14 12:20:00 -08:00
2022-12-19 08:54:17 -06:00
2022-11-15 10:07:40 +01:00
2022-12-21 10:18:17 -08:00
2022-10-09 22:30:23 -07:00
2022-12-13 19:29:45 -08:00
2023-01-23 09:38:10 -08:00
2022-12-12 13:55:31 -08:00
2022-09-28 09:02:45 +02:00
2022-12-21 18:57:24 -08:00
2022-12-14 09:15:43 -08:00
2022-10-03 16:39:37 -07:00