• Home
  • Raw
  • Download

Lines Matching +full:sleep +full:- +full:map

1 .. SPDX-License-Identifier: GPL-2.0
3 .. _kfuncs-header-label:
30 ----------------------------
54 -------------------------------
62 ---------------------
78 --------------------
102 -------------------------
119 -------------------------
139 ----------------------------
166 -------------------------------------
174 ---------------------
203 ---------------------
207 is eventually released using a release kfunc, or transferred to a map using a
213 ----------------------
222 ---------------------
231 --------------------------
244 Pointers to non-BTF objects (e.g. scalar pointers) may also be passed to
245 KF_TRUSTED_ARGS kfuncs, and may have a non-zero offset.
262 .. code-block:: c
270 .. code-block:: c
290 .. code-block:: c
296 -----------------------
298 The KF_SLEEPABLE flag is used for kfuncs that may sleep. Such kfuncs can only
302 --------------------------
311 -----------------
315 that the objects are valid and there is no use-after-free. The pointers are not
324 ------------------------
339 encouraged to make their use-cases known as early as possible, and participate
344 --------------------------
366 2.6 Specifying no-cast aliases with ___init
367 --------------------------------------------
377 .. code-block:: c
389 In some cases, this type-aliasing behavior is not desired. ``struct
392 .. code-block:: c
414 kfuncs provide a kernel <-> kernel API, and thus are not bound by any of the
415 strict stability restrictions associated with kernel <-> user UAPIs. This means
441 refactoring cannot typically change callers in-place when a kfunc changes,
446 symbols, and out-of-tree BPF programs that use kfuncs should be considered
453 will not ever hard-block a change in the kernel purely for stability
457 case-by-case basis, and which is informed by data points such as those
464 ---------------------
492 case-by-case basis, and will typically depend on how widespread the use of
510 -------------------------------
515 .. kernel-doc:: kernel/bpf/helpers.c
522 .. code-block:: c
537 * the task in a map, and the map will automatically
547 embedded in a map value without having to acquire a reference:
549 .. code-block:: c
556 * in a map using RCU.
571 bpf_printk("Global task %s is valid", local_copy->comm);
581 ----
587 .. kernel-doc:: kernel/bpf/helpers.c
592 .. code-block:: c
599 lookup = bpf_task_from_pid(task->pid);
602 return -ENOENT;
604 if (lookup->pid != task->pid) {
606 * globally-unique pid from the init_pid_ns. Thus,
611 return -EINVAL;
623 --------------------------
627 .. kernel-doc:: kernel/bpf/helpers.c
633 ----
640 .. kernel-doc:: kernel/bpf/helpers.c
643 .. kernel-doc:: kernel/bpf/helpers.c
650 .. code-block:: c
662 parent = bpf_cgroup_ancestor(cgrp, cgrp->level - 1);
664 return -ENOENT;
666 bpf_printk("Parent id is %d", parent->self.id);
674 ---------------------------
677 destroy struct cpumask * objects. Please refer to :ref:`cpumasks-header-label`