Merge branch 'Enable cpumasks to be used as kptrs'
authorAlexei Starovoitov <ast@kernel.org>
Wed, 25 Jan 2023 15:57:50 +0000 (07:57 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 25 Jan 2023 15:57:50 +0000 (07:57 -0800)
commit0cea651d6fdbcb279a1c5441a419a2f437896e7b
treecf15beb62b62a44ac9b4e294f7cd3ccf43e7b2c0
parentb613d335a743cf0e0ef0ccba9ad129904e2a26fb
parent027bdec89364e94753a2211ca87800c765fbd75d
Merge branch 'Enable cpumasks to be used as kptrs'

David Vernet says:

====================

This is part 3 of https://lore.kernel.org/all/20230119235833.2948341-1-void@manifault.com/

Part 2: https://lore.kernel.org/bpf/20230120192523.3650503-1-void@manifault.com/

This series is based off of commit b613d335a743 ("bpf: Allow trusted
args to walk struct when checking BTF IDs").

Changelog:
----------
v2 -> v3:
- Rebase onto master (commit described above). Only conflict that
  required resolution was updating the task_kfunc selftest suite error
  message location.
- Put copyright onto one line in kernel/bpf/cpumask.c.
- Remove now-unneeded pid-checking logic from
  progs/nested_trust_success.c.
- Fix a couple of small grammatical typos in documentation.

v1 -> v2:
- Put back 'static' keyword in bpf_find_btf_id()
  (kernel test robot <lkp@intel.com>)
- Surround cpumask kfuncs in __diag() blocks to avoid no-prototype build
  warnings (kernel test robot <lkp@intel.com>)
- Enable ___init suffixes to a type definition to signal that a type is
  a nocast alias of another type. That is, that when passed to a kfunc
  that expects one of the two types, the verifier will reject the other
  even if they're equivalent according to the C standard (Kumar and
  Alexei)
- Reject NULL for all trusted args, not just PTR_TO_MEM (Kumar)
- Reject both NULL and PTR_MAYBE_NULL for all trusted args (Kumar and
  Alexei )
- Improve examples given in cpumask documentation (Alexei)
- Use __success macro for nested_trust test (Alexei)
- Fix comment typo in struct bpf_cpumask comment header.
- Fix another example in the bpf_cpumask doc examples.
- Add documentation for ___init suffix change mentioned above.
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>