Home
last modified time | relevance | path

Searched full:shadow (Results 1 – 25 of 686) sorted by relevance

12345678910>>...28

/Linux-v5.15/kernel/livepatch/
Dshadow.c3 * shadow.c - Shadow Variables
11 * DOC: Shadow variable API concurrency notes:
13 * The shadow variable API provides a simple relationship between an
15 * caller to provide any mutual exclusion required of the shadow data.
17 * Once a shadow variable is attached to its parent object via the
19 * call to klp_shadow_get() may then return the shadow variable's data
20 * pointer. Callers of klp_shadow_*alloc() should prepare shadow data
23 * The klp_shadow_*alloc() API calls may allocate memory for new shadow
42 * the shadow variables it references.
47 * struct klp_shadow - shadow variable structure
[all …]
/Linux-v5.15/Documentation/livepatch/
Dshadow-vars.rst2 Shadow Variables
5 Shadow variables are a simple way for livepatch modules to associate
6 additional "shadow" data with existing data structures. Shadow data is
8 unmodified. The shadow variable API described in this document is used
9 to allocate/add and remove/free shadow variables to/from their parents.
13 shadow data. The numeric identifier is a simple enumeration that may be
14 used to describe shadow variable version, class or type, etc. More
16 numeric id subsequently filters hashtable queries. Multiple shadow
24 (See the full API usage docbook notes in livepatch/shadow.c.)
26 A hashtable references all shadow variables. These references are
[all …]
/Linux-v5.15/drivers/gpu/drm/
Ddrm_gem_atomic_helper.c20 * for planes with shadow buffers.
47 * A driver using a shadow buffer copies the content of the shadow buffers
49 * a mapping of the shadow buffer into kernel address space. The mappings
53 * The helpers for shadow-buffered planes establish and release mappings,
57 * Shadow-buffered planes can easily be enabled by using the provided macros
60 * shadow-buffer helpers.
76 * In the driver's atomic-update function, shadow-buffer mappings are available
89 * // access shadow buffer via shadow_plane_state->map
98 * callbacks. Access to shadow-buffer mappings is similar to regular
115 * // access shadow buffer via shadow_plane_state->map
[all …]
/Linux-v5.15/kernel/
Dcfi.c44 /* Page index for the beginning of the shadow */
46 /* An array of __cfi_check locations (as indices to the shadow) */
47 shadow_t shadow[1]; member
51 * The shadow covers ~128M from the beginning of the module region. If
61 /* The actual size of the shadow array, minus metadata */
62 #define SHADOW_ARR_SIZE (SHADOW_SIZE - offsetof(struct cfi_shadow, shadow))
68 /* Returns the index in the shadow for the given address */
80 return -1; /* Cannot be addressed with shadow */ in ptr_to_shadow()
85 /* Returns the page address for an index in the shadow */
95 /* Returns the __cfi_check function address for the given shadow location */
[all …]
/Linux-v5.15/drivers/scsi/
Dxen-scsifront.c118 struct vscsifrnt_shadow *shadow[VSCSIIF_MAX_REQS]; member
160 info->shadow[id] = NULL; in _scsifront_put_rqid()
179 struct vscsifrnt_shadow *shadow) in scsifront_do_request() argument
183 struct scsi_cmnd *sc = shadow->sc; in scsifront_do_request()
194 info->shadow[id] = shadow; in scsifront_do_request()
195 shadow->rqid = id; in scsifront_do_request()
201 ring_req->act = shadow->act; in scsifront_do_request()
202 ring_req->ref_rqid = shadow->ref_rqid; in scsifront_do_request()
203 ring_req->nr_segments = shadow->nr_segments; in scsifront_do_request()
217 for (i = 0; i < (shadow->nr_segments & ~VSCSIIF_SG_GRANT); i++) in scsifront_do_request()
[all …]
/Linux-v5.15/arch/arm/mm/
Dkasan_init.c56 panic("%s failed to allocate shadow page for address 0x%lx\n", in kasan_pte_populate()
65 * The early shadow memory is mapping all KASan in kasan_pte_populate()
69 * proper KASan shadow memory. in kasan_pte_populate()
75 * Early shadow mappings are PMD_SIZE aligned, so if the in kasan_pte_populate()
97 * We attempt to allocate a shadow block for the PMDs in kasan_pmd_populate()
105 panic("%s failed to allocate shadow block for address 0x%lx\n", in kasan_pmd_populate()
130 * Allocate and populate the shadow block of p4d folded into in kasan_pgd_populate()
137 panic("%s failed to allocate shadow block for address 0x%lx\n", in kasan_pgd_populate()
177 * We walk the page table and set all of the shadow memory to point in kasan_early_init()
197 pr_info("Mapping kernel virtual memory block: %px-%px at shadow: %px-%px\n", in create_mapping()
[all …]
/Linux-v5.15/drivers/gpio/
Dgpio-mm-lantiq.c31 u16 shadow; /* shadow the latches state */ member
35 * ltq_mm_apply() - write the shadow value to the ebu address.
38 * Write the shadow value to the EBU to set the gpios. We need to set the
47 __raw_writew(chip->shadow, chip->mmchip.regs); in ltq_mm_apply()
58 * Set the shadow value and call ltq_mm_apply.
65 chip->shadow |= (1 << offset); in ltq_mm_set()
67 chip->shadow &= ~(1 << offset); in ltq_mm_set()
104 u32 shadow; in ltq_mm_probe() local
117 /* store the shadow value if one was passed by the devicetree */ in ltq_mm_probe()
118 if (!of_property_read_u32(pdev->dev.of_node, "lantiq,shadow", &shadow)) in ltq_mm_probe()
[all …]
Dgpio-janz-ttl.c60 u8 *shadow; in ttl_get_value() local
64 shadow = &mod->porta_shadow; in ttl_get_value()
66 shadow = &mod->portb_shadow; in ttl_get_value()
69 shadow = &mod->portc_shadow; in ttl_get_value()
74 ret = *shadow & BIT(offset); in ttl_get_value()
83 u8 *shadow; in ttl_set_value() local
87 shadow = &mod->porta_shadow; in ttl_set_value()
90 shadow = &mod->portb_shadow; in ttl_set_value()
94 shadow = &mod->portc_shadow; in ttl_set_value()
100 *shadow |= BIT(offset); in ttl_set_value()
[all …]
/Linux-v5.15/arch/arm/include/asm/
Dkasan_def.h19 * space to use as shadow memory for KASan as follows:
31 * | | |-> The shadow area of kernel virtual address.
34 * | |\ shadow address of MODULES_VADDR
47 * This value begins with the MODULE_VADDR's shadow address. It is the
49 * to cover also that area with shadow memory so we can find memory
53 * This value is the 0x100000000's shadow address: the mapping that would
55 * kernel address sanitizer shadow area. It is also the start of the
59 * This value is used to map an address to the corresponding shadow
65 * byte in the shadow memory covers 8 bytes of kernel memory, so one
66 * bit shadow memory per byte of kernel memory is used.
[all …]
/Linux-v5.15/fs/nilfs2/
Dmdt.c501 * nilfs_mdt_setup_shadow_map - setup shadow map and bind it to metadata file
503 * @shadow: shadow mapping
506 struct nilfs_shadow_map *shadow) in nilfs_mdt_setup_shadow_map() argument
510 INIT_LIST_HEAD(&shadow->frozen_buffers); in nilfs_mdt_setup_shadow_map()
511 address_space_init_once(&shadow->frozen_data); in nilfs_mdt_setup_shadow_map()
512 nilfs_mapping_init(&shadow->frozen_data, inode); in nilfs_mdt_setup_shadow_map()
513 address_space_init_once(&shadow->frozen_btnodes); in nilfs_mdt_setup_shadow_map()
514 nilfs_mapping_init(&shadow->frozen_btnodes, inode); in nilfs_mdt_setup_shadow_map()
515 mi->mi_shadow = shadow; in nilfs_mdt_setup_shadow_map()
520 * nilfs_mdt_save_to_shadow_map - copy bmap and dirty pages to shadow map
[all …]
/Linux-v5.15/samples/livepatch/
Dlivepatch-shadow-fix1.c7 * livepatch-shadow-fix1.c - Shadow variables, livepatch demo
12 * Fixes the memory leak introduced in livepatch-shadow-mod through the
13 * use of a shadow variable. This fix demonstrates the "extending" of
22 * section of livepatch-shadow-mod.c.
32 /* Shadow variable enums */
49 * In this example, it would be safe to assign the pointer also to the shadow
79 * Patch: save the extra memory location into a SV_LEAK shadow in livepatch_fix1_dummy_alloc()
90 pr_err("%s: failed to allocate shadow variable for the leaking pointer: dummy @ %p, leak @ %p\n", in livepatch_fix1_dummy_alloc()
122 * Patch: fetch the saved SV_LEAK shadow variable, detach and in livepatch_fix1_dummy_free()
123 * free it. Note: handle cases where this shadow variable does in livepatch_fix1_dummy_free()
[all …]
Dlivepatch-shadow-mod.c7 * livepatch-shadow-mod.c - Shadow variables, buggy module demo
12 * As a demonstration of livepatch shadow variable API, this module
14 * livepatch-shadow-fix1.ko and livepatch-shadow-fix2.ko correct and
17 * WARNING - even though the livepatch-shadow-fix modules patch the
27 * insmod samples/livepatch/livepatch-shadow-mod.ko
36 * insmod samples/livepatch/livepatch-shadow-fix1.ko
45 * insmod samples/livepatch/livepatch-shadow-fix2.ko
47 * This module extends functionality through shadow variables, as a new
59 * rmmod livepatch-shadow-fix2
60 * rmmod livepatch-shadow-fix1
[all …]
Dlivepatch-shadow-fix2.c7 * livepatch-shadow-fix2.c - Shadow variables, livepatch demo
12 * Adds functionality to livepatch-shadow-mod's in-flight data
13 * structures through a shadow variable. The livepatch patches a
22 * section of livepatch-shadow-mod.c.
32 /* Shadow variable enums */
47 * already have a SV_COUNTER shadow variable, then attach a in livepatch_fix2_dummy_check()
82 * Patch: fetch the SV_COUNTER shadow variable and display in livepatch_fix2_dummy_free()
83 * the final count. Detach the shadow variable. in livepatch_fix2_dummy_free()
125 /* Cleanup any existing SV_COUNTER shadow variables */ in livepatch_shadow_fix2_exit()
/Linux-v5.15/Documentation/virt/kvm/
Dmmu.rst4 The x86 kvm shadow mmu
55 spte shadow pte (referring to pfns)
87 direct mode; otherwise it operates in shadow mode (see below).
118 Shadow pages
121 The principal data structure is the shadow page, 'struct kvm_mmu_page'. A
122 shadow page contains 512 sptes, which can be either leaf or nonleaf sptes. A
123 shadow page may contain a mix of leaf and nonleaf sptes.
126 is not related to a translation directly. It points to other shadow pages.
150 Shadow pages contain the following information:
152 The level in the shadow paging hierarchy that this shadow page belongs to.
[all …]
/Linux-v5.15/include/drm/
Ddrm_gem_atomic_helper.h22 * Helpers for planes with shadow buffers
26 * struct drm_shadow_plane_state - plane state for planes with shadow buffers
28 * For planes that use a shadow buffer, struct drm_shadow_plane_state
29 * provides the regular plane state plus mappings of the shadow buffer
78 * Initializes struct drm_plane_funcs for shadow-buffered planes
80 * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This
93 * Initializes struct drm_plane_helper_funcs for shadow-buffered planes
95 * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This
115 * Initializes struct drm_simple_display_pipe_funcs for shadow-buffered planes
117 * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This
/Linux-v5.15/arch/s390/mm/
Dgmap.c195 /* Free additional data for a shadow gmap */ in gmap_free()
243 /* Remove all shadow gmaps linked to this gmap */ in gmap_remove()
471 * Note: Can also be called for shadow gmaps.
479 /* Note: guest_to_host is empty for a shadow gmap */ in __gmap_translate()
505 * gmap_unlink - disconnect a page table from the gmap shadow tables
529 * __gmap_link - set up shadow page tables to connect a host to a guest address
784 * Note: Can also be called for shadow gmaps.
983 /* Shadow GMAP protection needs split PMDs */ in gmap_protect_pmd()
1124 * shadow.
1170 * @sg: pointer to the shadow guest address space structure
[all …]
Dkasan_init.c279 * [__sha(0), __sha(memsize)] - shadow memory for identity mapping in kasan_early_init()
289 /* init kasan zero shadow */ in kasan_early_init()
319 * +- 0 -------------+ +- shadow start -+ in kasan_early_init()
325 * +- shadow start --+ | zero | in kasan_early_init()
327 * +- shadow end -+ | mapping | in kasan_early_init()
333 * +-----------------+ +- shadow end ---+ in kasan_early_init()
336 * +- 0 -------------+ +- shadow start -+ in kasan_early_init()
342 * +- shadow start --+ | page | in kasan_early_init()
344 * +- shadow end -+ | (untracked) | in kasan_early_init()
350 * +-----------------+ +- shadow end ---+ in kasan_early_init()
[all …]
/Linux-v5.15/Documentation/dev-tools/
Dkasan.rst150 granule is encoded in one shadow byte. Those 8 bytes can be accessible,
152 encoding for each shadow byte: 00 means that all 8 bytes of the corresponding
159 In the report above, the arrow points to the shadow byte ``03``, which means
215 Software KASAN modes use shadow memory to record whether each byte of memory is
216 safe to access and use compile-time instrumentation to insert shadow memory
219 Generic KASAN dedicates 1/8th of kernel memory to its shadow memory (16TB
221 translate a memory address to its corresponding shadow address.
223 Here is the function which translates an address to its corresponding shadow
237 memory accesses are valid or not by checking corresponding shadow memory.
240 directly inserts the code to check shadow memory. This option significantly
[all …]
/Linux-v5.15/include/linux/
Dscx200_gpio.h13 #define __SCx200_GPIO_SHADOW unsigned long *shadow = scx200_gpio_shadow+bank
16 #define __SCx200_GPIO_OUT __asm__ __volatile__("outsl":"=mS" (shadow):"d" (ioaddr), "0" (shadow))
46 set_bit(index, shadow); /* __set_bit()? */ in scx200_gpio_set_high()
57 clear_bit(index, shadow); /* __clear_bit()? */ in scx200_gpio_set_low()
69 set_bit(index, shadow); in scx200_gpio_set()
71 clear_bit(index, shadow); in scx200_gpio_set()
81 change_bit(index, shadow); in scx200_gpio_change()
/Linux-v5.15/mm/kasan/
Dshadow.c3 * This file contains KASAN runtime code that manages shadow memory for
80 * Perform shadow offset calculation based on untagged address, as in kasan_poison()
109 u8 *shadow = (u8 *)kasan_mem_to_shadow(addr + size); in kasan_poison_last_granule() local
110 *shadow = size & KASAN_GRANULE_MASK; in kasan_poison_last_granule()
120 * Perform shadow offset calculation based on untagged address, as in kasan_unpoison()
202 * If shadow is mapped already than it must have been mapped in kasan_mem_notifier()
227 * In the latter case we can use vfree() to free shadow. in kasan_mem_notifier()
231 * Currently it's not possible to free shadow mapped in kasan_mem_notifier()
319 * STORE shadow(a), unpoison_val in kasan_populate_vmalloc()
321 * STORE shadow(a+99), unpoison_val x = LOAD p in kasan_populate_vmalloc()
[all …]
/Linux-v5.15/arch/s390/include/asm/
Dgmap.h37 * @children: list of shadow gmap structures
38 * @pt_list: list of all page tables used in the shadow guest address space
39 * @shadow_lock: spinlock to protect the shadow gmap list
40 * @parent: pointer to the parent gmap for shadow guest address spaces
41 * @orig_asce: ASCE for which the shadow page table has been created
42 * @edat_level: edat level to be used for the shadow translation
43 * @removed: flag to indicate if a shadow guest address space has been removed
44 * @initialized: flag to indicate if a shadow guest address space can be used
61 /* Additional data for shadow guest address spaces */
74 * struct gmap_rmap - reverse mapping for shadow page table entries
[all …]
/Linux-v5.15/arch/powerpc/kvm/
De500.c58 /* This variable keeps last used shadow ID on local core.
59 * The valid range of shadow ID is [1..255] */
63 * Allocate a free shadow id and setup a valid sid mapping in given entry.
67 * it has finished with the returned shadow id (either written into the
96 * Check if given entry contain a valid shadow id mapping.
101 * it has finished with the returned shadow id (either written into the
132 /* Map guest pid to shadow.
133 * We use PID to keep shadow of current guest non-zero PID,
134 * and use PID1 to keep shadow of guest zero PID.
154 /* Update shadow pid when mappings are changed */ in kvmppc_e500_id_table_reset_all()
[all …]
/Linux-v5.15/drivers/block/
Dxen-blkfront.c185 struct blk_shadow shadow[]; member
283 rinfo->shadow_free = rinfo->shadow[free].req.u.rw.id; in get_id_from_freelist()
284 rinfo->shadow[free].req.u.rw.id = 0x0fffffee; /* debug */ in get_id_from_freelist()
291 if (rinfo->shadow[id].req.u.rw.id != id) in add_id_to_freelist()
293 if (rinfo->shadow[id].request == NULL) in add_id_to_freelist()
295 rinfo->shadow[id].req.u.rw.id = rinfo->shadow_free; in add_id_to_freelist()
296 rinfo->shadow[id].request = NULL; in add_id_to_freelist()
534 rinfo->shadow[id].request = req; in blkif_ring_get_request()
535 rinfo->shadow[id].status = REQ_PROCESSING; in blkif_ring_get_request()
536 rinfo->shadow[id].associated_id = NO_ASSOCIATED_ID; in blkif_ring_get_request()
[all …]
/Linux-v5.15/arch/x86/include/asm/
Dkasan.h10 * Compiler uses shadow offset assuming that addresses start
11 * from 0. Kernel addresses don't start from 0, so shadow
12 * for kernel really starts from compiler's shadow offset +
19 * 47 bits for kernel address -> (47 - KASAN_SHADOW_SCALE_SHIFT) bits for shadow
20 * 56 bits for kernel address -> (56 - KASAN_SHADOW_SCALE_SHIFT) bits for shadow
/Linux-v5.15/mm/
Dworkingset.c165 * slot of the evicted page. This is called a shadow entry.
167 * On cache misses for which there are shadow entries, an eligible
199 static void unpack_shadow(void *shadow, int *memcgidp, pg_data_t **pgdat, in unpack_shadow() argument
202 unsigned long entry = xa_to_value(shadow); in unpack_shadow()
252 * Return: a shadow entry to be stored in @page->mapping->i_pages in place
278 * @shadow: shadow entry of the evicted page
284 void workingset_refault(struct page *page, void *shadow) in workingset_refault() argument
299 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, &workingset); in workingset_refault()
329 * special case: usually, shadow entries have a short lifetime in workingset_refault()
332 * nonresident_age to lap a shadow entry in the field, which in workingset_refault()
[all …]

12345678910>>...28