Home
last modified time | relevance | path

Searched +full:memory +full:- +full:mapping (Results 1 – 25 of 1041) sorted by relevance

12345678910>>...42

/linux/Documentation/admin-guide/mm/
H A Dnommu-mmap.rst2 No-MMU memory mapping support
5 The kernel has limited support for memory mapping under no-MMU conditions, such
6 as are used in uClinux environments. From the userspace point of view, memory
7 mapping is made use of in conjunction with the mmap() system call, the shmat()
9 mapping is actually performed by the binfmt drivers, which call back into the
12 Memory mapping behaviour also involves the way fork(), vfork(), clone() and
16 The behaviour is similar between the MMU and no-MMU cases, but not identical;
19 (#) Anonymous mapping, MAP_PRIVATE
21 In the MMU case: VM regions backed by arbitrary pages; copy-on-write
24 In the no-MMU case: VM regions backed by arbitrary contiguous runs of
[all …]
/linux/tools/testing/selftests/arm64/mte/
H A Dcheck_child_memory.c1 // SPDX-License-Identifier: GPL-2.0
25 1, 537, 989, 1269, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE,
26 /* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0
38 if (child == -1) { in check_child_tag_inheritance()
58 mte_initialize_current_context(mode, (uintptr_t)ptr, -UNDERFLOW); in check_child_tag_inheritance()
59 memset(ptr - UNDERFLOW, '2', UNDERFLOW); in check_child_tag_inheritance()
84 static int check_child_memory_mapping(int mem_type, int mode, int mapping) in check_child_memory_mapping() argument
93 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_child_memory_mapping()
106 static int check_child_file_mapping(int mem_type, int mode, int mapping) in check_child_file_mapping() argument
115 if (fd == -1) in check_child_file_mapping()
[all …]
H A Dcheck_hugetlb_options.c1 // SPDX-License-Identifier: GPL-2.0
103 if (child == -1) { in check_child_tag_inheritance()
146 static int check_hugetlb_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_hugetlb_memory_mapping() argument
155 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_hugetlb_memory_mapping()
160 /* Only mte enabled memory will allow tag insertion */ in check_hugetlb_memory_mapping()
163 ksft_print_msg("FAIL: Insert tags on anonymous mmap memory\n"); in check_hugetlb_memory_mapping()
176 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument
185 map_ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_clear_prot_mte_flag()
205 static int check_child_hugetlb_memory_mapping(int mem_type, int mode, int mapping) in check_child_hugetlb_memory_mapping() argument
214 ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_child_hugetlb_memory_mapping()
[all …]
H A Dcheck_mmap_options.c1 // SPDX-License-Identifier: GPL-2.0
47 int mapping; member
59 1, 537, 989, 1269, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE,
60 /* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0
80 mte_initialize_current_context(mode, (uintptr_t)ptr, -UNDERFLOW); in check_mte_memory()
81 memset(ptr - UNDERFLOW, '2', UNDERFLOW); in check_mte_memory()
97 mte_initialize_current_context(mode, (uintptr_t)ptr, -UNDERFLOW); in check_mte_memory()
98 memcpy(buf, ptr - UNDERFLOW, MT_GRANULE_SIZE); in check_mte_memory()
113 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, in check_anonymous_memory_mapping() argument
126 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping()
[all …]
/linux/Documentation/mm/
H A Dhighmem.rst2 High Memory Handling
9 What Is High Memory?
12 High memory (highmem) is used when the size of physical memory approaches or
13 exceeds the maximum size of virtual memory. At that point it becomes
14 impossible for the kernel to keep all of the available physical memory mapped
16 the pieces of physical memory that it wants to access.
18 The part of (physical) memory not covered by a permanent mapping is what we
24 kernel entry/exit. This means the available virtual memory space (4GiB on
30 +--------+ 0xffffffff
32 +--------+ 0xc0000000
[all …]
H A Dhugetlbfs_reserv.rst8 Huge pages as described at Documentation/admin-guide/mm/hugetlbpage.rst are
15 huge pages to cover the mapping, the mmap() would fail. This was first
17 were enough free huge pages to cover the mapping. Like most things in the
20 available for page faults in that mapping. The description below attempts to
34 This is a global (per-hstate) count of reserved huge pages. Reserved
37 as (``free_huge_pages - resv_huge_pages``).
50 There is one reserve map for each huge page mapping in the system.
52 the mapping. A region is described as::
61 indices into the mapping. Depending on the type of mapping, a
69 associated with the mapping.
[all …]
H A Dksm.rst5 KSM is a memory-saving de-duplication feature, enabled by CONFIG_KSM=y,
9 The userspace interface of KSM is described in Documentation/admin-guide/mm/ksm.rst
15 --------
17 .. kernel-doc:: mm/ksm.c
20 Reverse mapping
21 ---------------
22 KSM maintains reverse mapping information for KSM pages in the stable
27 list of struct ksm_rmap_item and the ``page->mapping`` of the
32 more "dups". Each "dup" keeps reverse mapping information for a KSM
33 page with ``page->mapping`` pointing to that "dup".
[all …]
/linux/Documentation/arch/riscv/
H A Dboot.rst1 .. SPDX-License-Identifier: GPL-2.0
4 RISC-V Kernel Boot Requirements and Constraints
10 This document describes what the RISC-V kernel expects from bootloaders and
14 mapping is set up.
16 Pre-kernel Requirements and Constraints
19 The RISC-V kernel expects the following of bootloaders and platform firmware:
22 --------------
24 The RISC-V kernel expects:
27 * ``$a1`` to contain the address of the devicetree in memory.
30 ---------
[all …]
/linux/Documentation/userspace-api/
H A Dmseal.rst1 .. SPDX-License-Identifier: GPL-2.0
9 Modern CPUs support memory permissions such as RW and NX bits. The memory
10 permission feature improves security stance on memory corruption bugs, i.e.
11 the attacker can’t just write to arbitrary memory and point the code to it,
12 the memory has to be marked with X bit, or else an exception will happen.
14 Memory sealing additionally protects the mapping itself against
15 modifications. This is useful to mitigate memory corruption issues where a
16 corrupted pointer is passed to a memory management system. For example,
17 such an attacker primitive can break control-flow integrity guarantees
18 since read-only memory that is supposed to be trusted can become writable
[all …]
/linux/include/linux/
H A Diosys-map.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Pointer abstraction for IO/system memory
16 * When accessing a memory region, depending on its location, users may have to
17 * access it with I/O operations or memory load/store operations. For example,
18 * copying to system memory could be done with memcpy(), copying to I/O memory
21 * .. code-block:: c
23 * void *vaddr = ...; // pointer to system memory
26 * void *vaddr_iomem = ...; // pointer to I/O memory
29 * The user of such pointer may not have information about the mapping of that
31 * buffer, regardless if it's located in system or IO memory. The type
[all …]
/linux/Documentation/arch/x86/x86_64/
H A Dmm.rst1 .. SPDX-License-Identifier: GPL-2.0
4 Memory Management
7 Complete virtual memory map with 4-level page tables
12 - Negative addresses such as "-23 TB" are absolute addresses in bytes, counted down
13 from the top of the 64-bit address space. It's easier to understand the layout
14 when seen both in absolute addresses and in distance-from-top notation.
16 For example 0xffffe90000000000 == -23 TB, it's 23 TB lower than the top of the
17 64-bit address space (ffffffffffffffff).
22 - "16M TB" might look weird at first sight, but it's an easier way to visualize size
24 It also shows it nicely how incredibly large 64-bit address space is.
[all …]
/linux/Documentation/arch/arm/
H A Dmemory.rst2 Kernel Memory Layout on ARM Linux
9 This document describes the virtual memory layout which the Linux
13 The ARM CPU is capable of addressing a maximum of 4GB virtual memory
26 setup a minicache mapping.
39 in proc-xscale.S to flush the whole data
42 fffe8000 fffeffff DTCM mapping area for platforms with
45 fffe0000 fffe7fff ITCM mapping area for platforms with
48 ffc80000 ffefffff Fixmap mapping region. Addresses provided
53 ff800000 ffbfffff Permanent, fixed read-only mapping of the
56 fee00000 feffffff Mapping of PCI I/O space. This is a static
[all …]
/linux/drivers/mtd/maps/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
2 menu "Mapping drivers for chip access"
7 bool "Support non-linear mappings of flash chips"
13 tristate "Flash device in physical memory map"
16 This provides a 'mapping' driver which allows the NOR Flash and
18 physically into the CPU's memory. You will need to configure
21 with config options or at run-time.
31 Setup a simple mapping via the Kconfig options. Normally the
38 hex "Physical start address of flash mapping"
42 This is the physical memory location at which the flash chips
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_exec.c1 // SPDX-License-Identifier: MIT
26 * userspace-managable portion of the VA space. It provides operations to map
27 * and unmap memory. Mappings may be flagged as sparse. Sparse mappings are not
29 * alongside a sparse mapping.
31 * Userspace may request memory backed mappings either within or outside of the
33 * mapping. Subsequently requested memory backed mappings within a sparse
34 * mapping will take precedence over the corresponding range of the sparse
35 * mapping. If such memory backed mappings are unmapped the kernel will make
36 * sure that the corresponding sparse mapping will take their place again.
37 * Requests to unmap a sparse mapping that still contains memory backed mappings
[all …]
/linux/drivers/dax/
H A Ddax-private.h1 /* SPDX-License-Identifier: GPL-2.0-only */
20 * struct dax_region - mapping infrastructure for dax devices
21 * @id: kernel-wide unique region for a memory range
22 * @target_node: effective numa node if this memory range is onlined
25 * @align: allocation and mapping alignment for child dax devices
44 * struct dax_mapping - device to display mapping range attributes
47 * @id: ida of this mapping
56 * struct dev_dax_range - tuple represenging a range of memory used by dev_dax
58 * @range: resource-span
59 * @mapping: reference to the dax_mapping for this range
[all …]
/linux/include/xen/interface/
H A Dmemory.h1 /* SPDX-License-Identifier: MIT */
3 * memory.h
5 * Memory reservation and information.
16 * Increase or decrease the specified domain's memory reservation. Returns a
17 * -ve errcode on failure, or the # extents successfully allocated or freed.
31 * IN: GPFN bases of extents to populate with memory
43 * I/O devices often have a 32-bit limitation even in 64-bit systems). If
59 * An atomic exchange of memory pages. If return code is zero then
60 * @out.extent_list provides GMFNs of the newly-allocated memory.
68 * [IN] Details of memory extents to be exchanged (GMFN bases).
[all …]
/linux/mm/
H A Dnommu.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * have any form of memory management unit (thus no virtual memory).
8 * See Documentation/admin-guide/mm/nommu-mmap.rst
10 * Copyright (c) 2004-2008 David Howells <dhowells@redhat.com>
11 * Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com>
12 * Copyright (c) 2000-2001 D Jeff Dionne <jeff@uClinux.org>
14 * Copyright (c) 2007-2010 Paul Mundt <lethal@linux-sh.org>
29 #include <linux/backing-dev.h>
60 * Return the total memory allocated for this pointer, not
89 * PAGE_SIZE for 0-order folios. in kobjsize()
[all …]
/linux/Documentation/trace/
H A Dring-buffer-map.rst1 .. SPDX-License-Identifier: GPL-2.0
4 Tracefs ring-buffer memory mapping
11 Tracefs ring-buffer memory map provides an efficient method to stream data
12 as no memory copy is necessary. The application mapping the ring-buffer becomes
13 then a consumer for that ring-buffer, in a similar fashion to trace_pipe.
15 Memory mapping setup
17 The mapping works with a mmap() of the trace_pipe_raw interface.
19 The first system page of the mapping contains ring-buffer statistics and
20 description. It is referred to as the meta-page. One of the most important
21 fields of the meta-page is the reader. It contains the sub-buffer ID which can
[all …]
/linux/arch/arm64/include/asm/
H A Dkvm_pgtable.h1 // SPDX-License-Identifier: GPL-2.0-only
14 #define KVM_PGTABLE_FIRST_LEVEL -1
18 * The largest supported block sizes for KVM (no 52-bit PA support):
19 * - 4K (level 1): 1GB
20 * - 16K (level 2): 32MB
21 * - 64K (level 2): 512MB
60 #define KVM_PHYS_INVALID (-1ULL)
104 * Used to indicate a pte for which a 'break-before-make' sequence is in
189 * struct kvm_pgtable_mm_ops - Memory management callbacks.
190 * @zalloc_page: Allocate a single zeroed memory page.
[all …]
/linux/drivers/spi/
H A Dspi-mem.c1 // SPDX-License-Identifier: GPL-2.0+
12 #include <linux/spi/spi-mem.h>
20 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a
21 * memory operation
23 * @op: the memory operation containing the buffer to map
24 * @sgt: a pointer to a non-initialized sg_table that will be filled by this
28 * This helper prepares everything for you and provides a ready-to-use
31 * Note that the caller must ensure the memory region pointed by
32 * op->data.buf.{in,out} is DMA-able before calling this function.
42 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data()
[all …]
/linux/tools/testing/selftests/mincore/
H A Dmincore_selftest.c1 // SPDX-License-Identifier: GPL-2.0+
46 EXPECT_EQ(-1, retval); in TEST()
51 MAP_SHARED | MAP_ANONYMOUS, -1, 0); in TEST()
56 /* <addr> argument is not page-aligned */ in TEST()
59 EXPECT_EQ(-1, retval); in TEST()
64 retval = mincore(addr, -1, vec); in TEST()
65 EXPECT_EQ(-1, retval); in TEST()
71 EXPECT_EQ(-1, retval); in TEST()
78 * Test mincore() behavior on a private anonymous page mapping.
79 * Check that the page is not loaded into memory right after the mapping
[all …]
/linux/kernel/dma/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
16 # mapping fast path should select this option and set the dma_ops_bypass
43 # DMA_ATTR_WRITE_COMBINE. Normally the "uncached" mapping should be what
98 starts with one memory pool at boot and it will allocate additional
99 pools as needed. To reduce run-time kernel memory requirements, you
119 DMA memory protection on systems with limited hardware protection
123 <Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt>
128 # Should be selected if we can mmap non-coherent mappings to userspace.
161 bool "DMA Contiguous Memory Allocator"
164 This enables the Contiguous Memory Allocator which allows drivers
[all …]
/linux/Documentation/driver-api/
H A Duio-howto.rst5 :Author: Hans-Jürgen Koch Linux developer, Linutronix
6 :Date: 2006-12-11
12 ------------
18 -------
22 access to the memory space of the device. The logic of controlling the
39 - The device has memory that can be mapped. The device can be
40 controlled completely by writing to this memory.
42 - The device usually generates interrupts.
44 - The device does not fit into one of the standard kernel subsystems.
47 ---------------
[all …]
/linux/rust/kernel/mm/
H A Dvirt.rs1 // SPDX-License-Identifier: GPL-2.0
5 //! Virtual memory.
8 //! VMA corresponds to a region of memory that the userspace process can access, and the VMA lets
9 //! you control what happens when userspace reads or writes to that region of memory.
29 /// It represents an area of virtual memory.
42 /// Access a virtual memory area given a raw pointer.
49 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw()
56 pub fn as_ptr(&self) -> *mut bindings::vm_area_struct { in as_ptr()
62 pub fn mm(&self) -> &MmWithUser { in mm()
64 // read lock or stronger. This implies that the underlying mm has a non-zero value of in mm()
[all …]
/linux/Documentation/filesystems/iomap/
H A Ddesign.rst1 .. SPDX-License-Identifier: GPL-2.0
62 units (generally memory pages or blocks) and looks up space mappings on
70 of mapping function calls into the filesystem across a larger amount of
78 1. Obtain a space mapping via ``->iomap_begin``
80 2. For each sub-unit of work...
82 1. Revalidate the mapping and go back to (1) above, if necessary.
89 4. Release the mapping via ``->iomap_end``, if necessary
105 -----------
127 device pre-shutdown hook from returning before other threads have
130 * **filesystem mapping lock**: This synchronization primitive is
[all …]

12345678910>>...42