data_type large_stringclasses 3
values | source large_stringclasses 29
values | code large_stringlengths 98 49.4M | filepath large_stringlengths 5 161 ⌀ | message large_stringclasses 234
values | commit large_stringclasses 234
values | subject large_stringclasses 418
values | critique large_stringlengths 101 1.26M ⌀ | metadata dict |
|---|---|---|---|---|---|---|---|---|
source | linux | ================================
Frequently asked questions (FAQ)
================================
Two sets of Questions and Answers (Q&A) are maintained.
.. toctree::
:maxdepth: 1
bpf_design_QA
bpf_devel_QA | Documentation/bpf/faq.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
.. _fs_kfuncs-header-label:
=====================
BPF filesystem kfuncs
=====================
BPF LSM programs need to access filesystem data from LSM hooks. The following
BPF kfuncs can be used to get these data.
* ``bpf_get_file_xattr()``
* ``bpf_get_fsverity_digest()``
To ... | Documentation/bpf/fs_kfuncs.rst | null | null | null | null | null |
source | linux | =========================
BPF Graph Data Structures
=========================
This document describes implementation details of new-style "graph" data
structures (linked_list, rbtree), with particular focus on the verifier's
implementation of semantics specific to those data structures.
Although no specific verifier ... | Documentation/bpf/graph_ds_impl.rst | null | null | null | null | null |
source | linux | Helper functions
================
* `bpf-helpers(7)`_ maintains a list of helpers available to eBPF programs.
.. Links
.. _bpf-helpers(7): https://man7.org/linux/man-pages/man7/bpf-helpers.7.html | Documentation/bpf/helpers.rst | null | null | null | null | null |
source | linux | =================
BPF Documentation
=================
This directory contains documentation for the BPF (Berkeley Packet
Filter) facility, with a focus on the extended BPF version (eBPF).
This kernel side documentation is still work in progress.
The Cilium project also maintains a `BPF and XDP Reference Guide`_
that ... | Documentation/bpf/index.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
.. _kfuncs-header-label:
=============================
BPF Kernel Functions (kfuncs)
=============================
1. Introduction
===============
BPF Kernel Functions or more commonly known as kfuncs are functions in the Linux
kernel which are exposed for use by BPF programs. Un... | Documentation/bpf/kfuncs.rst | null | null | null | null | null |
source | linux | .. contents::
.. sectnum::
==========================
Linux implementation notes
==========================
This document provides more details specific to the Linux kernel implementation of the eBPF instruction set.
Byte swap instructions
======================
``BPF_FROM_LE`` and ``BPF_FROM_BE`` exist as aliases ... | Documentation/bpf/linux-notes.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
====================
BPF LLVM Relocations
====================
This document describes LLVM BPF backend relocation types.
Relocation Record
=================
LLVM BPF backend records each relocation with the following 16-byte
ELF structure::
typedef struct
... | Documentation/bpf/llvm_reloc.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
================================================
BPF_MAP_TYPE_ARRAY and BPF_MAP_TYPE_PERCPU_ARRAY
================================================
.. note::
- ``BPF_MAP_TYPE_ARRAY`` was introduced in kernel version 3.19
- ``BPF_MAP_TYP... | Documentation/bpf/map_array.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
=========================
BPF_MAP_TYPE_BLOOM_FILTER
=========================
.. note::
- ``BPF_MAP_TYPE_BLOOM_FILTER`` was introduced in kernel version 5.16
``BPF_MAP_TYPE_BLOOM_FILTER`` provides a BPF bloom filter map. Bloom
filters ar... | Documentation/bpf/map_bloom_filter.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2020 Google LLC.
===========================
BPF_MAP_TYPE_CGROUP_STORAGE
===========================
The ``BPF_MAP_TYPE_CGROUP_STORAGE`` map type represents a local fix-sized
storage. It is only available with ``CONFIG_CGROUP_BPF``, and to programs that
attach... | Documentation/bpf/map_cgroup_storage.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Meta Platforms, Inc. and affiliates.
=========================
BPF_MAP_TYPE_CGRP_STORAGE
=========================
The ``BPF_MAP_TYPE_CGRP_STORAGE`` map type represents a local fix-sized
storage for cgroups. It is only available with ``CONFIG_CGROUPS``.
T... | Documentation/bpf/map_cgrp_storage.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
===================
BPF_MAP_TYPE_CPUMAP
===================
.. note::
- ``BPF_MAP_TYPE_CPUMAP`` was introduced in kernel version 4.15
.. kernel-doc:: kernel/bpf/cpumap.c
:doc: cpu map
An example use-case for this map type is software b... | Documentation/bpf/map_cpumap.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
=================================================
BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_DEVMAP_HASH
=================================================
.. note::
- ``BPF_MAP_TYPE_DEVMAP`` was introduced in kernel version 4.14
- ``BPF_MAP_... | Documentation/bpf/map_devmap.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
.. Copyright (C) 2022-2023 Isovalent, Inc.
===============================================
BPF_MAP_TYPE_HASH, with PERCPU and LRU Variants
===============================================
.. note::
- ``BPF_MAP_TYPE_HASH`` was introduced in... | Documentation/bpf/map_hash.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
=====================
BPF_MAP_TYPE_LPM_TRIE
=====================
.. note::
- ``BPF_MAP_TYPE_LPM_TRIE`` was introduced in kernel version 4.11
``BPF_MAP_TYPE_LPM_TRIE`` provides a longest prefix match algorithm that
can be used to match I... | Documentation/bpf/map_lpm_trie.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
========================================================
BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
========================================================
.. note::
- ``BPF_MAP_TYPE_ARRAY_OF_MAPS`` and ``BPF_MAP_TYPE_HASH_... | Documentation/bpf/map_of_maps.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
=========================================
BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK
=========================================
.. note::
- ``BPF_MAP_TYPE_QUEUE`` and ``BPF_MAP_TYPE_STACK`` were introduced
in kernel version 4.20
``BPF... | Documentation/bpf/map_queue_stack.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
=======================
BPF_MAP_TYPE_SK_STORAGE
=======================
.. note::
- ``BPF_MAP_TYPE_SK_STORAGE`` was introduced in kernel version 5.2
``BPF_MAP_TYPE_SK_STORAGE`` is used to provide socket-local storage for BPF
programs. A ... | Documentation/bpf/map_sk_storage.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright Red Hat
==============================================
BPF_MAP_TYPE_SOCKMAP and BPF_MAP_TYPE_SOCKHASH
==============================================
.. note::
- ``BPF_MAP_TYPE_SOCKMAP`` was introduced in kernel version 4.14
- ``BPF_MAP_TYPE_SOCKHASH`` was in... | Documentation/bpf/map_sockmap.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
===================
BPF_MAP_TYPE_XSKMAP
===================
.. note::
- ``BPF_MAP_TYPE_XSKMAP`` was introduced in kernel version 4.18
The ``BPF_MAP_TYPE_XSKMAP`` is used as a backend map for XDP BPF helper
call ``bpf_redirect_map()`` and... | Documentation/bpf/map_xskmap.rst | null | null | null | null | null |
source | linux | ========
BPF maps
========
BPF 'maps' provide generic storage of different types for sharing data between
kernel and user space. There are several storage types available, including
hash, array, bloom filter and radix-tree. Several of the map types exist to
support specific BPF helpers that perform actions based on th... | Documentation/bpf/maps.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
============================
BPF_PROG_TYPE_CGROUP_SOCKOPT
============================
``BPF_PROG_TYPE_CGROUP_SOCKOPT`` program type can be attached to two
cgroup hooks:
* ``BPF_CGROUP_GETSOCKOPT`` - called every time process executes ``getsockopt``
system call.
* ``BPF_CGROUP_S... | Documentation/bpf/prog_cgroup_sockopt.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
===========================
BPF_PROG_TYPE_CGROUP_SYSCTL
===========================
This document describes ``BPF_PROG_TYPE_CGROUP_SYSCTL`` program type that
provides cgroup-bpf hook for sysctl.
The hook has to be attached to a cgroup and will be called every ti... | Documentation/bpf/prog_cgroup_sysctl.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
============================
BPF_PROG_TYPE_FLOW_DISSECTOR
============================
Overview
========
Flow dissector is a routine that parses metadata out of the packets. It's
used in the various places in the networking subsystem (RFS, flow hash, etc).
BPF flow dissector is a... | Documentation/bpf/prog_flow_dissector.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
.. Copyright (C) 2020 Google LLC.
================
LSM BPF Programs
================
These BPF programs allow runtime instrumentation of the LSM hooks by privileged
users to implement system-wide MAC (Mandatory Access Control) and Audit
policies using eBPF.
Structure
---------
T... | Documentation/bpf/prog_lsm.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
=====================
BPF sk_lookup program
=====================
BPF sk_lookup program type (``BPF_PROG_TYPE_SK_LOOKUP``) introduces programmability
into the socket lookup performed by the transport layer when a packet is to be
delivered locally.
When invoked BP... | Documentation/bpf/prog_sk_lookup.rst | null | null | null | null | null |
source | linux | =============
Program Types
=============
.. toctree::
:maxdepth: 1
:glob:
prog_*
For a list of all program types, see :ref:`program_types_and_elf` in
the :ref:`libbpf` documentation. | Documentation/bpf/programs.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0-only
.. Copyright (C) 2022 Red Hat, Inc.
========
Redirect
========
XDP_REDIRECT
############
Supported maps
--------------
XDP_REDIRECT works with the following map types:
- ``BPF_MAP_TYPE_DEVMAP``
- ``BPF_MAP_TYPE_DEVMAP_HASH``
- ``BPF_MAP_TYPE_CPUMAP``
- ``BPF_MAP_TYPE_XSKMAP``... | Documentation/bpf/redirect.rst | null | null | null | null | null |
source | linux | ===============
BPF ring buffer
===============
This document describes BPF ring buffer design, API, and implementation details.
.. contents::
:local:
:depth: 2
Motivation
----------
There are two distinctive motivators for this work, which are not satisfied by
existing perf buffer, which prompted creation ... | Documentation/bpf/ringbuf.rst | null | null | null | null | null |
source | linux | ===================
Testing BPF on s390
===================
1. Introduction
***************
IBM Z are mainframe computers, which are descendants of IBM System/360 from
year 1964. They are supported by the Linux kernel under the name "s390". This
document describes how to test BPF in an s390 QEMU guest.
2. One-time s... | Documentation/bpf/s390.rst | null | null | null | null | null |
source | linux | ===========
Syscall API
===========
The primary info for the bpf syscall is available in the `man-pages`_
for `bpf(2)`_. For more information about the userspace API, see
Documentation/userspace-api/ebpf/index.rst.
.. Links:
.. _man-pages: https://www.kernel.org/doc/man-pages/
.. _bpf(2): https://man7.org/linux/man-p... | Documentation/bpf/syscall_api.rst | null | null | null | null | null |
source | linux | =========================
Testing and debugging BPF
=========================
.. toctree::
:maxdepth: 1
drgn
s390 | Documentation/bpf/test_debug.rst | null | null | null | null | null |
source | linux | =============
eBPF verifier
=============
The safety of the eBPF program is determined in two steps.
First step does DAG check to disallow loops and other CFG validation.
In particular it will detect programs that have unreachable instructions.
(though classic BPF checker allows them)
Second step starts from the fir... | Documentation/bpf/verifier.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
.. _libbpf:
======
libbpf
======
If you are looking to develop BPF applications using the libbpf library, this
directory contains important documentation that you should read.
To get started, it is recommended to begin with the :doc:`libbpf Overview
<libbpf_ove... | Documentation/bpf/libbpf/index.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
Building libbpf
===============
libelf and zlib are internal dependencies of libbpf and thus are required to link
against and must be installed on the system for applications to work.
pkg-config is used by default to find libelf, and the program called
can be ove... | Documentation/bpf/libbpf/libbpf_build.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
API naming convention
=====================
libbpf API provides access to a few logically separated groups of
functions and types. Every group has its own naming convention
described here. It's recommended to follow these conventions whenever a
new function or ty... | Documentation/bpf/libbpf/libbpf_naming_convention.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
===============
libbpf Overview
===============
libbpf is a C-based library containing a BPF loader that takes compiled BPF
object files and prepares and loads them into the Linux kernel. libbpf takes the
heavy lifting of loading, verifying, and attaching BPF programs to various
ke... | Documentation/bpf/libbpf/libbpf_overview.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
.. _program_types_and_elf:
Program Types and ELF Sections
==============================
The table below lists the program types, their attach types where relevant and the ELF section
names supported by libbpf for them. The ELF section names follow these rules:
... | Documentation/bpf/libbpf/program_types.rst | null | null | null | null | null |
source | linux | .. contents::
.. sectnum::
===================================================
BPF ABI Recommended Conventions and Guidelines v1.0
===================================================
This is version 1.0 of an informational document containing recommended
conventions and guidelines for producing portable BPF program b... | Documentation/bpf/standardization/abi.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
===================
BPF Standardization
===================
This directory contains documents that are being iterated on as part of the BPF
standardization effort with the IETF. See the `IETF BPF Working Group`_ page
for the working group charter, documents, and ... | Documentation/bpf/standardization/index.rst | null | null | null | null | null |
source | linux | .. contents::
.. sectnum::
======================================
BPF Instruction Set Architecture (ISA)
======================================
eBPF, also commonly
referred to as BPF, is a technology with origins in the Linux kernel
that can run untrusted programs in a privileged context such as an
operating system k... | Documentation/bpf/standardization/instruction-set.rst | null | null | null | null | null |
source | linux | =======================
A Linux CD-ROM standard
=======================
:Author: David van Leeuwen <david@ElseWare.cistron.nl>
:Date: 12 March 1999
:Updated by: Erik Andersen (andersee@debian.org)
:Updated by: Jens Axboe (axboe@image.dk)
Introduction
============
Linux is probably the Unix-like operating system tha... | Documentation/cdrom/cdrom-standard.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
======
CD-ROM
======
.. toctree::
:maxdepth: 1
cdrom-standard | Documentation/cdrom/index.rst | null | null | null | null | null |
source | linux | Assembler Annotations
=====================
Copyright (c) 2017-2019 Jiri Slaby
This document describes the new macros for annotation of data and code in
assembly. In particular, it contains information about ``SYM_FUNC_START``,
``SYM_FUNC_END``, ``SYM_CODE_START``, and similar.
Rationale
---------
Some code like ent... | Documentation/core-api/asm-annotations.rst | null | null | null | null | null |
source | linux | ========================================
Generic Associative Array Implementation
========================================
Overview
========
This associative array implementation is an object container with the following
properties:
1. Objects are opaque pointers. The implementation does not care where they
poin... | Documentation/core-api/assoc_array.rst | null | null | null | null | null |
source | linux | ===========================
Boot time memory management
===========================
Early system initialization cannot use "normal" memory management
simply because it is not set up yet. But there is still need to
allocate memory for various data structures, for instance for the
physical page allocator.
A specialized... | Documentation/core-api/boot-time-mm.rst | null | null | null | null | null |
source | linux | ==================================
Cache and TLB Flushing Under Linux
==================================
:Author: David S. Miller <davem@redhat.com>
This document describes the cache/tlb flushing interfaces called
by the Linux VM subsystem. It enumerates over each interface,
describes its intended purpose, and what ... | Documentation/core-api/cachetlb.rst | null | null | null | null | null |
source | linux | ==================
Cgroup Kernel APIs
==================
Device Memory Cgroup API (dmemcg)
=================================
.. kernel-doc:: kernel/cgroup/dmem.c
:export: | Documentation/core-api/cgroup.rst | null | null | null | null | null |
source | linux | ================
Circular Buffers
================
:Author: David Howells <dhowells@redhat.com>
:Author: Paul E. McKenney <paulmck@linux.ibm.com>
Linux provides a number of features that can be used to implement circular
buffering. There are two sets of such features:
(1) Convenience functions for determining inf... | Documentation/core-api/circular-buffers.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
===========================
Scope-based Cleanup Helpers
===========================
.. kernel-doc:: include/linux/cleanup.h
:doc: scope-based cleanup helpers | Documentation/core-api/cleanup.rst | null | null | null | null | null |
source | linux | =========================
CPU hotplug in the Kernel
=========================
:Date: September, 2021
:Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Rusty Russell <rusty@rustcorp.com.au>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Ashok Raj <ashok.raj@intel.com>,
Joel Schopp... | Documentation/core-api/cpu_hotplug.rst | null | null | null | null | null |
source | linux | ============================================
The object-lifetime debugging infrastructure
============================================
:Author: Thomas Gleixner
Introduction
============
debugobjects is a generic infrastructure to track the life time of
kernel objects and validate the operations on those.
debugobjec... | Documentation/core-api/debug-objects.rst | null | null | null | null | null |
source | linux | ===========================================================================
Using physical DMA provided by OHCI-1394 FireWire controllers for debugging
===========================================================================
Introduction
------------
Basically all FireWire controllers which are in use today are co... | Documentation/core-api/debugging-via-ohci1394.rst | null | null | null | null | null |
source | linux | =========================
Dynamic DMA mapping Guide
=========================
:Author: David S. Miller <davem@redhat.com>
:Author: Richard Henderson <rth@cygnus.com>
:Author: Jakub Jelinek <jakub@redhat.com>
This is a guide to device driver writers on how to use the DMA API
with example pseudo-code. For a concise de... | Documentation/core-api/dma-api-howto.rst | null | null | null | null | null |
source | linux | ============================================
Dynamic DMA mapping using the generic device
============================================
:Author: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
This document describes the DMA API. For a more gentle introduction
of the API (and actual examples), see Docume... | Documentation/core-api/dma-api.rst | null | null | null | null | null |
source | linux | ==============
DMA attributes
==============
This document describes the semantics of the DMA attributes that are
defined in linux/dma-mapping.h.
DMA_ATTR_WEAK_ORDERING
----------------------
DMA_ATTR_WEAK_ORDERING specifies that reads and writes to the mapping
may be weakly ordered, that is that reads and writes ma... | Documentation/core-api/dma-attributes.rst | null | null | null | null | null |
source | linux | ============================
DMA with ISA and LPC devices
============================
:Author: Pierre Ossman <drzeus@drzeus.cx>
This document describes how to do DMA transfers using the old ISA DMA
controller. Even though ISA is more or less dead today the LPC bus
uses the same DMA system so it will be around for qu... | Documentation/core-api/dma-isa-lpc.rst | null | null | null | null | null |
source | linux | Entry/exit handling for exceptions, interrupts, syscalls and KVM
================================================================
All transitions between execution domains require state updates which are
subject to strict ordering constraints. State updates are required for the
following:
* Lockdep
* RCU / Contex... | Documentation/core-api/entry.rst | null | null | null | null | null |
source | linux | =====================
The errseq_t datatype
=====================
An errseq_t is a way of recording errors in one place, and allowing any
number of "subscribers" to tell whether it has changed since a previous
point where it was sampled.
The initial use case for this is tracking errors for file
synchronization syscal... | Documentation/core-api/errseq.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
Floating-point API
==================
Kernel code is normally prohibited from using floating-point (FP) registers or
instructions, including the C float and double data types. This rule reduces
system call overhead, because the kernel does not need to save and restore the
userspac... | Documentation/core-api/floating-point.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
===========
Folio Queue
===========
:Author: David Howells <dhowells@redhat.com>
.. Contents:
* Overview
* Initialisation
* Adding and removing folios
* Querying information about a folio
* Querying information about a folio_queue
* Folio queue iteration
* Folio marks
* ... | Documentation/core-api/folio_queue.rst | null | null | null | null | null |
source | linux | The genalloc/genpool subsystem
==============================
There are a number of memory-allocation subsystems in the kernel, each
aimed at a specific need. Sometimes, however, a kernel developer needs to
implement a new allocator for a specific range of special-purpose memory;
often that memory is located on a dev... | Documentation/core-api/genalloc.rst | null | null | null | null | null |
source | linux | =================================
Generic radix trees/sparse arrays
=================================
.. kernel-doc:: include/linux/generic-radix-tree.h
:doc: Generic radix trees/sparse arrays
generic radix tree functions
----------------------------
.. kernel-doc:: include/linux/generic-radix-tree.h
:function... | Documentation/core-api/generic-radix-tree.rst | null | null | null | null | null |
source | linux | .. include:: <isonum.txt>
==========================
Linux generic IRQ handling
==========================
:Copyright: |copy| 2005-2010: Thomas Gleixner
:Copyright: |copy| 2005-2006: Ingo Molnar
Introduction
============
The generic interrupt handling layer is designed to provide a complete
abstraction of interrup... | Documentation/core-api/genericirq.rst | null | null | null | null | null |
source | linux | .. _gfp_mask_from_fs_io:
=================================
GFP masks used from FS/IO context
=================================
:Date: May, 2018
:Author: Michal Hocko <mhocko@kernel.org>
Introduction
============
Code paths in the filesystem and IO stacks must be careful when
allocating memory to prevent recursion d... | Documentation/core-api/gfp_mask-from-fs-io.rst | null | null | null | null | null |
source | linux | ======================================
Housekeeping
======================================
CPU Isolation moves away kernel work that may otherwise run on any CPU.
The purpose of its related features is to reduce the OS jitter that some
extreme workloads can't stand, such as in some DPDK usecases.
The kernel work mov... | Documentation/core-api/housekeeping.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
=============
ID Allocation
=============
:Author: Matthew Wilcox
Overview
========
A common problem to solve is allocating identifiers (IDs); generally
small numbers which identify a thing. Examples include file descriptors,
process IDs, packet identifiers in networking protoc... | Documentation/core-api/idr.rst | null | null | null | null | null |
source | linux | ======================
Core API Documentation
======================
This is the beginning of a manual for core kernel APIs. The conversion
(and writing!) of documents for this manual is much appreciated!
Core utilities
==============
This section has general and "core core" documentation. The first is a
massive g... | Documentation/core-api/index.rst | null | null | null | null | null |
source | linux | ====================
The Linux Kernel API
====================
Basic C Library Functions
=========================
When writing drivers, you cannot in general use routines which are from
the C Library. Some of the functions have been found generally useful
and they are listed below. The behaviour of these functions ... | Documentation/core-api/kernel-api.rst | null | null | null | null | null |
source | linux | =====================================================================
Everything you never wanted to know about kobjects, ksets, and ktypes
=====================================================================
:Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
:Last updated: December 19, 2007
Based on an origin... | Documentation/core-api/kobject.rst | null | null | null | null | null |
source | linux | ===================================================
Adding reference counters (krefs) to kernel objects
===================================================
:Author: Corey Minyard <minyard@acm.org>
:Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
A lot of this was lifted from Greg Kroah-Hartman's 2004 OLS ... | Documentation/core-api/kref.rst | null | null | null | null | null |
source | linux | ==========================================
Reed-Solomon Library Programming Interface
==========================================
:Author: Thomas Gleixner
Introduction
============
The generic Reed-Solomon Library provides encoding, decoding and error
correction functions.
Reed-Solomon codes are used in communicatio... | Documentation/core-api/librs.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
=====================
Linked Lists in Linux
=====================
:Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
.. contents::
Introduction
============
Linked lists are one of the most basic data structures used in many programs.
The Linux kernel implements sev... | Documentation/core-api/list.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
========================
Live Update Orchestrator
========================
:Author: Pasha Tatashin <pasha.tatashin@soleen.com>
.. kernel-doc:: kernel/liveupdate/luo_core.c
:doc: Live Update Orchestrator (LUO)
LUO Sessions
============
.. kernel-doc:: kernel/liveupdate/luo_sessi... | Documentation/core-api/liveupdate.rst | null | null | null | null | null |
source | linux | .. _local_ops:
=================================================
Semantics and Behavior of Local Atomic Operations
=================================================
:Author: Mathieu Desnoyers
This document explains the purpose of the local atomic operations, how
to implement them for any given architecture and show... | Documentation/core-api/local_ops.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
==========
Maple Tree
==========
:Author: Liam R. Howlett
Overview
========
The Maple Tree is a B-Tree data type which is optimized for storing
non-overlapping ranges, including ranges of size 1. The tree was designed to
be simple to use and does not require a user written sea... | Documentation/core-api/maple_tree.rst | null | null | null | null | null |
source | linux | .. _memory_allocation:
=======================
Memory Allocation Guide
=======================
Linux provides a variety of APIs for memory allocation. You can
allocate small chunks using `kmalloc` or `kmem_cache_alloc` families,
large virtually contiguous areas using `vmalloc` and its derivatives,
or you can directly... | Documentation/core-api/memory-allocation.rst | null | null | null | null | null |
source | linux | .. _memory_hotplug:
==============
Memory hotplug
==============
Memory hotplug event notifier
=============================
Hotplugging events are sent to a notification queue.
Memory notifier
----------------
There are six types of notification defined in ``include/linux/memory.h``:
MEM_GOING_ONLINE
Generated... | Documentation/core-api/memory-hotplug.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
============
Min Heap API
============
:Author: Kuan-Wei Chiu <visitorckw@gmail.com>
Introduction
============
The Min Heap API provides a set of functions and macros for managing min-heaps
in the Linux kernel. A min-heap is a binary tree structure where the value of
each node is... | Documentation/core-api/min_heap.rst | null | null | null | null | null |
source | linux | ======================
Memory Management APIs
======================
User Space Memory Access
========================
.. kernel-doc:: arch/x86/include/asm/uaccess.h
:internal:
.. kernel-doc:: arch/x86/lib/usercopy_32.c
:export:
.. kernel-doc:: mm/gup.c
:functions: get_user_pages_fast
.. _mm-api-gfp-flags... | Documentation/core-api/mm-api.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: BSD-3-Clause
.. _kernel_netlink:
===================================
Netlink notes for kernel developers
===================================
General guidance
================
Attribute enums
---------------
Older families often define "null" attributes and commands with value
of ``0`` a... | Documentation/core-api/netlink.rst | null | null | null | null | null |
source | linux | ================================================
Generic bitfield packing and unpacking functions
================================================
Problem statement
-----------------
When working with hardware, one has to choose between several approaches of
interfacing with it.
One can memory-map a pointer to a care... | Documentation/core-api/packing.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
=======================================
The padata parallel execution mechanism
=======================================
:Date: May 2020
Padata is a mechanism by which the kernel can farm jobs out to be done in
parallel on multiple CPUs while optionally retaining their ordering.
I... | Documentation/core-api/padata.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0+
==============
Generic parser
==============
Overview
========
The generic parser is a simple parser for parsing mount options,
filesystem options, driver options, subsystem options, etc.
Parser API
==========
.. kernel-doc:: lib/parser.c
:export: | Documentation/core-api/parser.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
====================================================
pin_user_pages() and related calls
====================================================
.. contents:: :local:
Overview
========
This document describes the following functions::
pin_user_pages()
pin_user_pages_fast()
pin_us... | Documentation/core-api/pin_user_pages.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
===========================
Message logging with printk
===========================
printk() is one of the most widely known functions in the Linux kernel. It's the
standard tool we have for printing messages and usually the most basic way of
tracing and debugging. If you're famili... | Documentation/core-api/printk-basics.rst | null | null | null | null | null |
source | linux | =========================================
How to get printk format specifiers right
=========================================
.. _printk-specifiers:
:Author: Randy Dunlap <rdunlap@infradead.org>
:Author: Andrew Murray <amurray@mpc-data.co.uk>
Integer types
=============
::
If variable is of Type, use printk for... | Documentation/core-api/printk-formats.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
============
Printk Index
============
There are many ways to monitor the state of the system. One important
source of information is the system log. It provides a lot of information,
including more or less important warnings and error messages.
There are monitoring tools that fil... | Documentation/core-api/printk-index.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
======================
Memory Protection Keys
======================
Memory Protection Keys provide a mechanism for enforcing page-based
protections, but without requiring modification of the page tables when an
application changes protection domains.
Pkeys Userspace (PKU) is a fe... | Documentation/core-api/protection-keys.rst | null | null | null | null | null |
source | linux | =================================
Red-black Trees (rbtree) in Linux
=================================
:Date: January 18, 2007
:Author: Rob Landley <rob@landley.net>
What are red-black trees, and what are they for?
------------------------------------------------
Red-black trees are a type of self-balancing binary s... | Documentation/core-api/rbtree.rst | null | null | null | null | null |
source | linux | ===================================
refcount_t API compared to atomic_t
===================================
.. contents:: :local:
Introduction
============
The goal of refcount_t API is to provide a minimal API for implementing
an object's reference counters. While a generic architecture-independent
implementation f... | Documentation/core-api/refcount-vs-atomic.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
===============
DMA and swiotlb
===============
swiotlb is a memory buffer allocator used by the Linux kernel DMA layer. It is
typically used when a device doing DMA can't directly access the target memory
buffer because of hardware limitations or other requirements. In such a case... | Documentation/core-api/swiotlb.rst | null | null | null | null | null |
source | linux | =================
Symbol Namespaces
=================
The following document describes how to use Symbol Namespaces to structure the
export surface of in-kernel symbols exported through the family of
EXPORT_SYMBOL() macros.
Introduction
============
Symbol Namespaces have been introduced as a means to structure the ... | Documentation/core-api/symbol-namespaces.rst | null | null | null | null | null |
source | linux | ===================
this_cpu operations
===================
:Author: Christoph Lameter, August 4th, 2014
:Author: Pranith Kumar, Aug 2nd, 2014
this_cpu operations are a way of optimizing access to per cpu
variables associated with the *currently* executing processor. This is
done through the use of segment registers ... | Documentation/core-api/this_cpu_ops.rst | null | null | null | null | null |
source | linux | ktime accessors
===============
Device drivers can read the current time using ktime_get() and the many
related functions declared in linux/timekeeping.h. As a rule of thumb,
using an accessor with a shorter name is preferred over one with a longer
name if both are equally fit for a particular use case.
Basic ktime_t... | Documentation/core-api/timekeeping.rst | null | null | null | null | null |
source | linux | ===============================
The Linux Kernel Tracepoint API
===============================
:Author: Jason Baron
:Author: William Cohen
Introduction
============
Tracepoints are static probe points that are located in strategic points
throughout the kernel. 'Probes' register/unregister with tracepoints via
a cal... | Documentation/core-api/tracepoint.rst | null | null | null | null | null |
source | linux | =========================
Unaligned Memory Accesses
=========================
:Author: Daniel Drake <dsd@gentoo.org>,
:Author: Johannes Berg <johannes@sipsolutions.net>
:With help from: Alan Cox, Avuton Olrich, Heikki Orsila, Jan Engelhardt,
Kyle McMartin, Kyle Moffett, Randy Dunlap, Robert Hancock, Uli Kunitz,
V... | Documentation/core-api/unaligned-memory-access.rst | null | null | null | null | null |
source | linux | .. SPDX-License-Identifier: GPL-2.0
====================
Union-Find in Linux
====================
:Date: June 21, 2024
:Author: Xavier <xavier_qy@163.com>
What is union-find, and what is it used for?
------------------------------------------------
Union-find is a data structure used to handle the merging and quer... | Documentation/core-api/union_find.rst | null | null | null | null | null |
source | linux | ==============================
General notification mechanism
==============================
The general notification mechanism is built on top of the standard pipe driver
whereby it effectively splices notification messages from the kernel into pipes
opened by userspace. This can be used in conjunction with::
* K... | Documentation/core-api/watch_queue.rst | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.