/linux-6.15/drivers/gpu/drm/i915/ |
D | i915_vma_resource.h | 1 /* SPDX-License-Identifier: MIT */ 9 #include <linux/dma-fence.h> 21 * The sg mask of the pages sg_table. i.e the mask of 27 * The gtt page sizes we are allowed to use given the 29 * express the smallest unit we can use for the whole 31 * to use opportunistically. 37 * struct i915_vma_bindinfo - Information needed for async bind 42 * @pages: The pages sg-table. 43 * @page_sizes: Page sizes of the pages. 44 * @pages_rsgt: Refcounted sg-table when delayed object destruction [all …]
|
D | i915_vma.c | 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 26 #include <linux/dma-fence-array.h> 55 if (kref_read(&vma->vm->ref)) in assert_vma_held_evict() 56 assert_object_held_shared(vma->obj); in assert_vma_held_evict() 79 if (!vma->node.stack) { in vma_print_allocator() 80 drm_dbg(vma->obj->base.dev, in vma_print_allocator() 82 vma->node.start, vma->node.size, reason); in vma_print_allocator() 86 stack_depot_snprint(vma->node.stack, buf, sizeof(buf), 0); in vma_print_allocator() 87 drm_dbg(vma->obj->base.dev, in vma_print_allocator() [all …]
|
D | i915_gem_gtt.c | 1 // SPDX-License-Identifier: MIT 7 #include <linux/slab.h> /* fault-inject.h is not standalone! */ 9 #include <linux/fault-inject.h> 28 struct sg_table *pages) in i915_gem_gtt_prepare_pages() argument 31 if (dma_map_sg_attrs(obj->base.dev->dev, in i915_gem_gtt_prepare_pages() 32 pages->sgl, pages->nents, in i915_gem_gtt_prepare_pages() 43 * try again - if there are no more pages to remove from in i915_gem_gtt_prepare_pages() 46 GEM_BUG_ON(obj->mm.pages == pages); in i915_gem_gtt_prepare_pages() 47 } while (i915_gem_shrink(NULL, to_i915(obj->base.dev), in i915_gem_gtt_prepare_pages() 48 obj->base.size >> PAGE_SHIFT, NULL, in i915_gem_gtt_prepare_pages() [all …]
|
D | i915_vma_types.h | 1 /* SPDX-License-Identifier: MIT */ 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 43 * singular instances with a view representing all of the object's backing pages 47 * pages is not equal to the backing store, or where the layout of the pages 52 * (2x2 pages): 64 * In this example both the size and layout of pages in the alternative view is 82 * Code wanting to add or use a new GGTT view needs to: 88 * New views are required to build a scatter-gather table from within the 143 struct sg_table *pages; member [all …]
|
/linux-6.15/Documentation/mm/ |
D | vmalloced-kernel-stacks.rst | 1 .. SPDX-License-Identifier: GPL-2.0 12 -------- 19 ------------ 23 it difficult to isolate and root-cause. 25 Virtually mapped kernel stacks with guard pages cause kernel stack 30 support for virtually mapped stacks with guard pages. This feature 40 -------------------- 45 - vmalloc space must be large enough to hold many kernel stacks. This 46 may rule out many 32-bit architectures. 47 - Stacks in vmalloc space need to work reliably. For example, if [all …]
|
/linux-6.15/tools/testing/selftests/mm/ |
D | guard-regions.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 #include <asm-generic/mman.h> /* Force the import of the tools version. */ 39 * anything with it in order to trigger a read page fault. We therefore must use 82 switch (variant->backing) { in is_anon_backed() 99 switch (variant->backing) { in mmap_() 102 fd = -1; in mmap_() 107 fd = self->fd; in mmap_() 271 self->page_size = (unsigned long)sysconf(_SC_PAGESIZE); in FIXTURE_SETUP() 274 switch (variant->backing) { in FIXTURE_SETUP() 278 self->fd = open_file("", self->path); in FIXTURE_SETUP() [all …]
|
/linux-6.15/Documentation/dev-tools/ |
D | kfence.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Kernel Electric-Fence (KFENCE) 7 Kernel Electric-Fence (KFENCE) is a low-overhead sampling-based memory safety 8 error detector. KFENCE detects heap out-of-bounds access, use-after-free, and 9 invalid-free errors. 15 non-production test workloads. One way to quickly achieve a large enough total 19 ----- 26 ``kfence.sample_interval`` to non-zero value), configure the kernel with:: 46 causes CPU wake-ups when the system is completely idle. This may be undesirable 47 on power-constrained systems. The boot parameter ``kfence.deferrable=1`` [all …]
|
/linux-6.15/io_uring/ |
D | memmap.c | 1 // SPDX-License-Identifier: GPL-2.0 17 static void *io_mem_alloc_compound(struct page **pages, int nr_pages, in io_mem_alloc_compound() argument 25 return ERR_PTR(-ENOMEM); in io_mem_alloc_compound() 31 return ERR_PTR(-ENOMEM); in io_mem_alloc_compound() 34 pages[i] = page + i; in io_mem_alloc_compound() 42 struct page **pages; in io_pin_pages() local 46 return ERR_PTR(-EOVERFLOW); in io_pin_pages() 47 if (check_add_overflow(end, PAGE_SIZE - 1, &end)) in io_pin_pages() 48 return ERR_PTR(-EOVERFLOW); in io_pin_pages() 52 nr_pages = end - start; in io_pin_pages() [all …]
|
/linux-6.15/arch/x86/kernel/ |
D | irq_64.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * This file contains the lowest level x86_64-specific interrupt 8 * x86_64-specific irq controller code. (e.g. i8259.c and 34 * VMAP the backing store with guard pages 39 struct page *pages[IRQ_STACK_SIZE / PAGE_SIZE]; in map_irq_stack() local 46 pages[i] = pfn_to_page(pa >> PAGE_SHIFT); in map_irq_stack() 49 va = vmap(pages, IRQ_STACK_SIZE / PAGE_SIZE, VM_MAP, PAGE_KERNEL); in map_irq_stack() 51 return -ENOMEM; in map_irq_stack() 54 per_cpu(hardirq_stack_ptr, cpu) = va + IRQ_STACK_SIZE - 8; in map_irq_stack() 59 * If VMAP stacks are disabled due to KASAN, just use the per cpu [all …]
|
D | dumpstack_64.c | 1 // SPDX-License-Identifier: GPL-2.0 46 * On 64-bit, we have a generic entry stack that we in stack_type_name() 47 * use for all the kernel entry points, including in stack_type_name() 54 return exception_stack_names[type - STACK_TYPE_EXCEPTION]; in stack_type_name() 60 * struct estack_pages - Page descriptor for exception stacks 73 PFN_DOWN(CEA_ESTACK_OFFS(st) + CEA_ESTACK_SIZE(st) - 1)] = { \ 80 * PAGE_SIZE, all pages covering a particular stack will have the same 81 * info. The guard pages including the not mapped DB2 stack are zeroed 117 k = (stk - begin) >> PAGE_SHIFT; in in_exception_stack() 120 /* Guard page? */ in in_exception_stack() [all …]
|
/linux-6.15/mm/ |
D | madvise.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/page-isolation.h> 28 #include <linux/backing-dev.h> 41 * Maximum number of attempts we make to install guard pages before we give up 42 * and return -ERESTARTNOINTR to have userspace try again. 52 * Any behaviour which results in changes to the vma->vm_flags needs to 84 /* Add 1 for NUL terminator at the end of the anon_name->name */ in anon_vma_name_alloc() 88 kref_init(&anon_name->kref); in anon_vma_name_alloc() 89 memcpy(anon_name->name, name, count); in anon_vma_name_alloc() 104 mmap_assert_locked(vma->vm_mm); in anon_vma_name() [all …]
|
D | highmem.c | 1 // SPDX-License-Identifier: GPL-2.0 9 * Redesigned the x86 32-bit VM architecture to deal with 10 * 64-bit physical space. With current x86 CPUs this 47 * since a TLB flush - it is usable. 49 * since the last TLB flush - so we can't use it. 50 * n means that there are (n-1) current users of it. 57 * addresses where physical memory pages are mapped by kmap. 116 unsigned long pages = 0; in __nr_free_highpages() local 121 pages += zone_page_state(zone, NR_FREE_PAGES); in __nr_free_highpages() 124 return pages; in __nr_free_highpages() [all …]
|
/linux-6.15/include/linux/ |
D | vmalloc.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 24 #define VM_MAP 0x00000004 /* vmap()ed pages */ 28 #define VM_NO_GUARD 0x00000040 /* ***DANGEROUS*** don't add guard page */ 31 #define VM_MAP_PUT_PAGES 0x00000200 /* put pages and free array in vfree */ 32 #define VM_ALLOW_HUGE_VMAP 0x00000400 /* Allow for huge pages on archs with HAVE_ARCH_HUGE_VMA… 40 #define VM_SPARSE 0x00001000 /* sparse vm_area. not all pages are present. */ 46 * Can be overridden by arch-specific value. 49 #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ 57 struct page **pages; member 132 * Highlevel APIs for driver use [all …]
|
D | page-flags.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Macros for manipulating and testing page->flags 18 * Various page->flags bits: 20 * PG_reserved is set for special pages. The "struct page" of such a page 22 * Pages marked as PG_reserved include: 23 * - Pages part of the kernel image (including vDSO) and similar (e.g. BIOS, 25 * - Pages reserved or allocated early during boot (before the page allocator 30 * - Pages falling into physical memory gaps - not IORESOURCE_SYSRAM. Trying 31 * to read/write these pages might end badly. Don't touch! 32 * - The zero page(s) [all …]
|
/linux-6.15/Documentation/arch/x86/ |
D | sgx.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Software Guard eXtensions (SGX) 10 Software Guard eXtensions (SGX) hardware enables for user space applications 13 * Privileged (ring-0) ENCLS functions orchestrate the construction of the 15 * Unprivileged (ring-3) ENCLU functions allow an application to enter and 37 SGX utilizes an *Enclave Page Cache (EPC)* to store pages that are associated 38 with an enclave. It is contained in a BIOS-reserved region of physical memory. 39 Unlike pages used for regular memory, pages can only be accessed from outside of 49 ------------------ 56 Regular EPC pages contain the code and data of an enclave. [all …]
|
/linux-6.15/lib/ |
D | Kconfig.kfence | 1 # SPDX-License-Identifier: GPL-2.0-only 7 bool "KFENCE: low-overhead sampling-based memory safety error detector" 12 KFENCE is a low-overhead sampling-based detector of heap out-of-bounds 13 access, use-after-free, and invalid-free errors. KFENCE is designed 17 See <file:Documentation/dev-tools/kfence.rst> for more details. 22 afford to use KASAN, continue using KASAN, for example in test 23 environments. If your kernel targets production use, and cannot 37 setting "kfence.sample_interval" to a non-zero value enables KFENCE. 45 pages are required; with one containing the object and two adjacent 46 ones used as guard pages. [all …]
|
/linux-6.15/Documentation/devicetree/bindings/reserved-memory/ |
D | qcom,rmtfs-mem.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/reserved-memory/qcom,rmtfs-mem.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 15 - Bjorn Andersson <bjorn.andersson@linaro.org> 18 - $ref: reserved-memory.yaml 22 const: qcom,rmtfs-mem 24 qcom,client-id: 27 identifier of the client to use this region for buffers 29 qcom,use-guard-pages: [all …]
|
/linux-6.15/kernel/bpf/ |
D | arena.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * For example on x86-64 the values could be: 19 * For user space all pointers within the arena are normal 8-byte addresses. 22 * (u32)7f7d26200000 -> 26200000 28 * mov eax, eax // eax has lower 32-bit of user pointer 34 * User space can fault-in any address which will insert the page 38 * The later fault-in from user space will populate that page into user vma. 41 /* number of bytes addressable by LDX/STX insn with 16-bit 'off' field */ 57 return arena ? (u64) (long) arena->kern_vm->addr + GUARD_SZ / 2 : 0; in bpf_arena_get_kern_vm_start() 62 return arena ? arena->user_vm_start : 0; in bpf_arena_get_user_vm_start() [all …]
|
/linux-6.15/drivers/gpu/drm/i915/gt/ |
D | intel_ggtt.c | 1 // SPDX-License-Identifier: MIT 13 #include <drm/intel/intel-gtt.h> 46 * GTT and any objects within the GTT, i.e. we use the color adjustment in i915_ggtt_color_adjust() 47 * to insert a guard page to prevent prefetches crossing over the in i915_ggtt_color_adjust() 51 if (node->color != color) in i915_ggtt_color_adjust() 52 *end -= I915_GTT_PAGE_SIZE; in i915_ggtt_color_adjust() 57 struct drm_i915_private *i915 = ggtt->vm.i915; in ggtt_init_hw() 59 i915_address_space_init(&ggtt->vm, VM_CLASS_GGTT); in ggtt_init_hw() 61 ggtt->vm.is_ggtt = true; in ggtt_init_hw() 63 /* Only VLV supports read-only GGTT mappings */ in ggtt_init_hw() [all …]
|
/linux-6.15/arch/x86/include/asm/ |
D | tlb.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 #include <asm-generic/tlb.h> 18 if (!tlb->fullmm && !tlb->need_flush_all) { in tlb_flush() 19 start = tlb->start; in tlb_flush() 20 end = tlb->end; in tlb_flush() 23 flush_tlb_mm_range(tlb->mm, start, end, stride_shift, tlb->freed_tables); in tlb_flush() 39 * - FLAG_VA | FLAG_INCLUDE_GLOBAL: invalidate all TLB entries at the address 40 * - FLAG_PCID: invalidate all TLB entries matching the PCID 64 * The instruction takes the number of extra pages to invalidate, beyond the 65 * first page, while __invlpgb gets the more human readable number of pages to [all …]
|
/linux-6.15/arch/hexagon/include/asm/ |
D | mem-layout.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. 50 FIX_KMAP_END, /* check for per-cpuism */ 64 /* Gap between physical ram and vmalloc space for guard purposes. */ 77 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 80 * "permanent kernel mappings", defined as long-lasting mappings of 81 * high-memory page frames into the kernel address space. 85 #define LAST_PKMAP_MASK (LAST_PKMAP - 1) 86 #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT) 94 * Need to check the alignment/shift usage; some archs use [all …]
|
/linux-6.15/arch/powerpc/ |
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 5 def_bool PPC64 && $(cc-option, -mabi=elfv2) 8 def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed) 11 # Clang has a bug (https://github.com/llvm/llvm-project/issues/62372) 12 # where pcrel code is not generated if -msoft-float, -mno-altivec, or 13 # -mno-vsx options are also given. Without these options, fp/vec 16 def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel) 35 # On Book3S 64, the default virtual address space for 64-bit processes 38 # between bottom-up and top-down allocations for applications that 41 default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K) [all …]
|
/linux-6.15/drivers/gpu/drm/i915/gem/ |
D | i915_gem_domain.c | 2 * SPDX-License-Identifier: MIT 4 * Copyright © 2014-2016 Intel Corporation 23 struct drm_i915_private *i915 = to_i915(obj->base.dev); in gpu_write_needs_clflush() 33 * whether the object is un-cached or write-through. in gpu_write_needs_clflush() 41 struct drm_i915_private *i915 = to_i915(obj->base.dev); in i915_gem_cpu_write_needs_clflush() 43 if (obj->cache_dirty) in i915_gem_cpu_write_needs_clflush() 49 if (!(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE)) in i915_gem_cpu_write_needs_clflush() 52 /* Currently in use by HW (display engine)? Keep flushed. */ in i915_gem_cpu_write_needs_clflush() 63 if (!(obj->write_domain & flush_domains)) in flush_write_domain() 66 switch (obj->write_domain) { in flush_write_domain() [all …]
|
/linux-6.15/kernel/ |
D | kprobes.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * 2002-Oct Created by Vamsi Krishna S <vamsi_krishna@in.ibm.com> Kernel 10 * 2004-Aug Updated by Prasanna S Panchamukhi <prasanna@in.ibm.com> with 12 * 2004-July Suparna Bhattacharya <suparna@in.ibm.com> added jumper probes 14 * 2004-Sep Prasanna S Panchamukhi <prasanna@in.ibm.com> Changed Kprobes 16 * 2005-May Hien Nguyen <hien@us.ibm.com>, Jim Keniston 18 * <prasanna@in.ibm.com> added function-return probes. 58 * - Normal hlist traversal and RCU add/del under 'kprobe_mutex' is held. 60 * - RCU hlist traversal under disabling preempt (breakpoint handlers) 78 * Blacklist -- list of 'struct kprobe_blacklist_entry' to store info where [all …]
|
/linux-6.15/arch/powerpc/include/asm/nohash/32/ |
D | pte-8xx.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 * We also use the two level tables, but we can put the real bits in them 14 * accessed, and overload the changed bit for write protect. We use 19 * register when the TLB entry is loaded. We will use bit 27 for guard, since 25 * load the PMD into MD_TWC. The 8M pages are only used for kernel 84 #include <asm/pgtable-masks.h> 138 pte_update(vma->vm_mm, address, ptep, clr, set, huge); in __ptep_set_access_flags() 160 * On the 8xx, the page tables are a bit special. For 16k pages, we have 161 * 4 identical entries. For 512k pages, we have 128 entries as if it was 162 * 4k pages, but they are flagged as 512k pages for the hardware. [all …]
|