Home
last modified time | relevance | path

Searched refs:shadow (Results 1 – 25 of 162) sorted by relevance

1234567

/linux-6.1.9/kernel/livepatch/
Dshadow.c70 static inline bool klp_shadow_match(struct klp_shadow *shadow, void *obj, in klp_shadow_match() argument
73 return shadow->obj == obj && shadow->id == id; in klp_shadow_match()
85 struct klp_shadow *shadow; in klp_shadow_get() local
89 hash_for_each_possible_rcu(klp_shadow_hash, shadow, node, in klp_shadow_get()
92 if (klp_shadow_match(shadow, obj, id)) { in klp_shadow_get()
94 return shadow->data; in klp_shadow_get()
234 static void klp_shadow_free_struct(struct klp_shadow *shadow, in klp_shadow_free_struct() argument
237 hash_del_rcu(&shadow->node); in klp_shadow_free_struct()
239 dtor(shadow->obj, shadow->data); in klp_shadow_free_struct()
240 kfree_rcu(shadow, rcu_head); in klp_shadow_free_struct()
[all …]
/linux-6.1.9/drivers/scsi/
Dxen-scsifront.c121 struct vscsifrnt_shadow *shadow[VSCSIIF_MAX_REQS]; member
163 info->shadow[id] = NULL; in _scsifront_put_rqid()
182 struct vscsifrnt_shadow *shadow) in scsifront_do_request() argument
186 struct scsi_cmnd *sc = shadow->sc; in scsifront_do_request()
197 info->shadow[id] = shadow; in scsifront_do_request()
198 shadow->rqid = id; in scsifront_do_request()
204 ring_req->act = shadow->act; in scsifront_do_request()
205 ring_req->ref_rqid = shadow->ref_rqid; in scsifront_do_request()
206 ring_req->nr_segments = shadow->nr_segments; in scsifront_do_request()
220 for (i = 0; i < (shadow->nr_segments & ~VSCSIIF_SG_GRANT); i++) in scsifront_do_request()
[all …]
/linux-6.1.9/Documentation/livepatch/
Dshadow-vars.rst6 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
30 meta-data and shadow-data:
37 - data[] - storage for shadow data
[all …]
/linux-6.1.9/mm/kmsan/
Dinit.c97 struct page *shadow, *origin; member
116 struct page *shadow, *origin; in kmsan_memblock_free_pages() local
118 if (!held_back[order].shadow) { in kmsan_memblock_free_pages()
119 held_back[order].shadow = page; in kmsan_memblock_free_pages()
126 shadow = held_back[order].shadow; in kmsan_memblock_free_pages()
128 kmsan_setup_meta(page, shadow, origin, order); in kmsan_memblock_free_pages()
130 held_back[order].shadow = NULL; in kmsan_memblock_free_pages()
168 struct page *page, *shadow, *origin; in do_collection() local
172 shadow = smallstack_pop(&collect); in do_collection()
174 kmsan_setup_meta(page, shadow, origin, collect.order); in do_collection()
[all …]
Dshadow.c85 void *shadow; in kmsan_get_shadow_origin_ptr() local
97 shadow = kmsan_get_metadata(address, KMSAN_META_SHADOW); in kmsan_get_shadow_origin_ptr()
98 if (!shadow) in kmsan_get_shadow_origin_ptr()
101 ret.shadow = shadow; in kmsan_get_shadow_origin_ptr()
108 ret.shadow = dummy_store_page; in kmsan_get_shadow_origin_ptr()
112 ret.shadow = dummy_load_page; in kmsan_get_shadow_origin_ptr()
175 struct page *shadow, *origin; in kmsan_alloc_page() local
182 shadow = shadow_page_for(page); in kmsan_alloc_page()
186 __memset(page_address(shadow), 0, PAGE_SIZE * pages); in kmsan_alloc_page()
195 __memset(page_address(shadow), -1, PAGE_SIZE * pages); in kmsan_alloc_page()
[all …]
Dcore.c88 u32 *align_shadow_src, shadow; in kmsan_internal_memmove_metadata() local
130 shadow = align_shadow_src[i]; in kmsan_internal_memmove_metadata()
138 shadow = (shadow >> skip_bits) << skip_bits; in kmsan_internal_memmove_metadata()
148 shadow = (shadow << skip_bits) >> skip_bits; in kmsan_internal_memmove_metadata()
154 if (origin_src[i] && (origin_src[i] != old_origin) && shadow) { in kmsan_internal_memmove_metadata()
165 if (shadow) in kmsan_internal_memmove_metadata()
195 shadow = align_shadow_src[src_slots - 1]; in kmsan_internal_memmove_metadata()
197 shadow = (shadow << skip_bits) >> skip_bits; in kmsan_internal_memmove_metadata()
198 if (shadow) in kmsan_internal_memmove_metadata()
203 shadow = align_shadow_src[0]; in kmsan_internal_memmove_metadata()
[all …]
Dinstrumentation.c121 static inline void get_param0_metadata(u64 *shadow, in get_param0_metadata() argument
126 *shadow = *(u64 *)(ctx->cstate.param_tls); in get_param0_metadata()
130 static inline void set_retval_metadata(u64 shadow, depot_stack_handle_t origin) in set_retval_metadata() argument
134 *(u64 *)(ctx->cstate.retval_tls) = shadow; in set_retval_metadata()
143 u64 shadow; in __msan_memmove() local
145 get_param0_metadata(&shadow, &origin); in __msan_memmove()
157 set_retval_metadata(shadow, origin); in __msan_memmove()
167 u64 shadow; in __msan_memcpy() local
169 get_param0_metadata(&shadow, &origin); in __msan_memcpy()
183 set_retval_metadata(shadow, origin); in __msan_memcpy()
[all …]
Dhooks.c156 struct page *shadow, *origin; in kmsan_ioremap_page_range() local
166 shadow = alloc_pages(gfp_mask, 1); in kmsan_ioremap_page_range()
170 vmalloc_shadow(start + off + PAGE_SIZE), prot, &shadow, in kmsan_ioremap_page_range()
185 struct page *shadow, *origin; in kmsan_iounmap_page_range() local
197 shadow = kmsan_vmalloc_to_page_or_null((void *)v_shadow); in kmsan_iounmap_page_range()
201 if (shadow) in kmsan_iounmap_page_range()
202 __free_pages(shadow, 1); in kmsan_iounmap_page_range()
/linux-6.1.9/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-6.1.9/drivers/gpio/
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 …]
Dgpio-mm-lantiq.c31 u16 shadow; /* shadow the latches state */ member
47 __raw_writew(chip->shadow, chip->mmchip.regs); in 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
118 if (!of_property_read_u32(pdev->dev.of_node, "lantiq,shadow", &shadow)) in ltq_mm_probe()
119 chip->shadow = shadow; in ltq_mm_probe()
Dgpio-stp-xway.c83 u32 shadow; /* shadow the shift registers state */ member
120 chip->shadow |= BIT(gpio); in xway_stp_set()
122 chip->shadow &= ~BIT(gpio); in xway_stp_set()
123 xway_stp_w32(chip->virt, chip->shadow, XWAY_STP_CPU0); in xway_stp_set()
234 u32 shadow, groups, dsl, phy; in xway_stp_probe() local
257 if (!of_property_read_u32(pdev->dev.of_node, "lantiq,shadow", &shadow)) in xway_stp_probe()
258 chip->shadow = shadow; in xway_stp_probe()
/linux-6.1.9/fs/nilfs2/
Dmdt.c475 struct nilfs_shadow_map *shadow = mdi->mi_shadow; in nilfs_mdt_clear() local
480 if (shadow) { in nilfs_mdt_clear()
481 struct inode *s_inode = shadow->inode; in nilfs_mdt_clear()
483 shadow->inode = NULL; in nilfs_mdt_clear()
517 struct nilfs_shadow_map *shadow) in nilfs_mdt_setup_shadow_map() argument
522 INIT_LIST_HEAD(&shadow->frozen_buffers); in nilfs_mdt_setup_shadow_map()
528 shadow->inode = s_inode; in nilfs_mdt_setup_shadow_map()
529 mi->mi_shadow = shadow; in nilfs_mdt_setup_shadow_map()
541 struct nilfs_shadow_map *shadow = mi->mi_shadow; in nilfs_mdt_save_to_shadow_map() local
542 struct inode *s_inode = shadow->inode; in nilfs_mdt_save_to_shadow_map()
[all …]
/linux-6.1.9/drivers/block/
Dxen-blkfront.c190 struct blk_shadow shadow[]; member
291 rinfo->shadow_free = rinfo->shadow[free].req.u.rw.id; in get_id_from_freelist()
292 rinfo->shadow[free].req.u.rw.id = 0x0fffffee; /* debug */ in get_id_from_freelist()
299 if (rinfo->shadow[id].req.u.rw.id != id) in add_id_to_freelist()
301 if (rinfo->shadow[id].request == NULL) in add_id_to_freelist()
303 rinfo->shadow[id].req.u.rw.id = rinfo->shadow_free; in add_id_to_freelist()
304 rinfo->shadow[id].request = NULL; in add_id_to_freelist()
543 rinfo->shadow[id].request = req; in blkif_ring_get_request()
544 rinfo->shadow[id].status = REQ_PROCESSING; in blkif_ring_get_request()
545 rinfo->shadow[id].associated_id = NO_ASSOCIATED_ID; in blkif_ring_get_request()
[all …]
/linux-6.1.9/Documentation/dev-tools/
Dkmsan.rst95 incorrect shadow/origin values, likely leading to false positives. Functions
125 KMSAN shadow memory
128 KMSAN associates a metadata byte (also called shadow byte) with every byte of
129 kernel memory. A bit in the shadow byte is set iff the corresponding bit of the
131 setting its shadow bytes to ``0xff``) is called poisoning, marking it
132 initialized (setting the shadow bytes to ``0x00``) is called unpoisoning.
139 Compiler instrumentation also tracks the shadow values as they are used along
141 ``mm/kmsan/`` to persist shadow values.
143 The shadow value of a basic or compound type is an array of bytes of the same
145 When a value is read from memory, its shadow memory is also obtained and
[all …]
Dkasan.rst233 granule is encoded in one shadow byte. Those 8 bytes can be accessible,
235 encoding for each shadow byte: 00 means that all 8 bytes of the corresponding
242 In the report above, the arrow points to the shadow byte ``03``, which means
263 Software KASAN modes use shadow memory to record whether each byte of memory is
264 safe to access and use compile-time instrumentation to insert shadow memory
267 Generic KASAN dedicates 1/8th of kernel memory to its shadow memory (16TB
269 translate a memory address to its corresponding shadow address.
271 Here is the function which translates an address to its corresponding shadow
285 memory accesses are valid or not by checking corresponding shadow memory.
288 directly inserts the code to check shadow memory. This option significantly
[all …]
/linux-6.1.9/mm/kasan/
Dsw_tags.c77 u8 *shadow_first, *shadow_last, *shadow; in kasan_check_range() local
115 for (shadow = shadow_first; shadow <= shadow_last; shadow++) { in kasan_check_range()
116 if (*shadow != tag) { in kasan_check_range()
/linux-6.1.9/drivers/ps3/
Dps3-lpm.c128 struct ps3_lpm_shadow_regs shadow; member
394 return lpm_priv->shadow.pm_control; in ps3_read_pm()
398 return lpm_priv->shadow.pm_start_stop; in ps3_read_pm()
409 return lpm_priv->shadow.group_control; in ps3_read_pm()
411 return lpm_priv->shadow.debug_bus_control; in ps3_read_pm()
446 if (val != lpm_priv->shadow.group_control) in ps3_write_pm()
451 lpm_priv->shadow.group_control = val; in ps3_write_pm()
454 if (val != lpm_priv->shadow.debug_bus_control) in ps3_write_pm()
459 lpm_priv->shadow.debug_bus_control = val; in ps3_write_pm()
465 if (val != lpm_priv->shadow.pm_control) in ps3_write_pm()
[all …]
/linux-6.1.9/samples/livepatch/
DMakefile3 obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-mod.o
4 obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-fix1.o
5 obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-fix2.o
/linux-6.1.9/drivers/gpu/drm/amd/amdgpu/
Damdgpu_vm_sdma.c44 if (table->shadow) in amdgpu_vm_sdma_map_table()
45 r = amdgpu_ttm_alloc_gart(&table->shadow->tbo); in amdgpu_vm_sdma_map_table()
258 if (vmbo->shadow) in amdgpu_vm_sdma_update()
259 amdgpu_vm_sdma_set_ptes(p, vmbo->shadow, pe, addr, in amdgpu_vm_sdma_update()
268 (vmbo->shadow ? 2 : 1); in amdgpu_vm_sdma_update()
283 if (vmbo->shadow) in amdgpu_vm_sdma_update()
284 amdgpu_vm_sdma_copy_ptes(p, vmbo->shadow, pe, nptes); in amdgpu_vm_sdma_update()
Damdgpu_vm_pt.c423 if (vmbo->shadow) { in amdgpu_vm_pt_clear()
424 struct amdgpu_bo *shadow = vmbo->shadow; in amdgpu_vm_pt_clear() local
426 r = ttm_bo_validate(&shadow->tbo, &shadow->placement, &ctx); in amdgpu_vm_pt_clear()
541 (*vmbo)->shadow = NULL; in amdgpu_vm_pt_create()
557 r = amdgpu_bo_create(adev, &bp, &(*vmbo)->shadow); in amdgpu_vm_pt_create()
567 (*vmbo)->shadow->parent = amdgpu_bo_ref(bo); in amdgpu_vm_pt_create()
619 amdgpu_bo_unref(&pt->shadow); in amdgpu_vm_pt_alloc()
631 struct amdgpu_bo *shadow; in amdgpu_vm_pt_free() local
635 shadow = amdgpu_bo_shadowed(entry->bo); in amdgpu_vm_pt_free()
636 if (shadow) { in amdgpu_vm_pt_free()
[all …]
/linux-6.1.9/drivers/usb/host/
Dxen-hcd.c84 struct usb_shadow shadow[XENUSB_URB_RING_SIZE]; member
565 info->shadow_free = info->shadow[free].req.id; in xenhcd_get_id_from_freelist()
566 info->shadow[free].req.id = 0x0fff; /* debug */ in xenhcd_get_id_from_freelist()
573 info->shadow[id].req.id = info->shadow_free; in xenhcd_add_id_to_freelist()
574 info->shadow[id].urb = NULL; in xenhcd_add_id_to_freelist()
718 struct usb_shadow *shadow = info->shadow + id; in xenhcd_gnttab_done() local
722 if (!shadow->in_flight) { in xenhcd_gnttab_done()
726 shadow->in_flight = false; in xenhcd_gnttab_done()
728 nr_segs = shadow->req.nr_buffer_segs; in xenhcd_gnttab_done()
730 if (xenusb_pipeisoc(shadow->req.pipe)) in xenhcd_gnttab_done()
[all …]
/linux-6.1.9/arch/powerpc/platforms/ps3/
Dspu.c112 struct spe_shadow __iomem *shadow; member
124 unsigned long problem, unsigned long ls, unsigned long shadow, in _dump_areas() argument
131 pr_debug("%s:%d: shadow: %lxh\n", func, line, shadow); in _dump_areas()
180 iounmap(spu_pdata(spu)->shadow); in spu_unmap()
195 spu_pdata(spu)->shadow = ioremap_prot(spu_pdata(spu)->shadow_addr, in setup_areas()
197 if (!spu_pdata(spu)->shadow) { in setup_areas()
231 (unsigned long)spu_pdata(spu)->shadow); in setup_areas()
368 while (in_be64(&spu_pdata(spu)->shadow->spe_execution_status) in ps3_create_spu()
514 return in_be64(&spu_pdata(spu)->shadow->mfc_dar_RW); in mfc_dar_get()
524 return in_be64(&spu_pdata(spu)->shadow->mfc_dsisr_RW); in mfc_dsisr_get()
/linux-6.1.9/Documentation/virt/kvm/x86/
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).
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.
152 The level in the shadow paging hierarchy that this shadow page belongs to.
166 so multiple shadow pages are needed to shadow one guest page.
167 For first-level shadow pages, role.quadrant can be 0 or 1 and denotes the
[all …]
/linux-6.1.9/mm/
Dworkingset.c198 static void unpack_shadow(void *shadow, int *memcgidp, pg_data_t **pgdat, in unpack_shadow() argument
201 unsigned long entry = xa_to_value(shadow); in unpack_shadow()
247 static void lru_gen_refault(struct folio *folio, void *shadow) in lru_gen_refault() argument
261 unpack_shadow(shadow, &memcg_id, &pgdat, &token, &workingset); in lru_gen_refault()
309 static void lru_gen_refault(struct folio *folio, void *shadow) in lru_gen_refault() argument
385 void workingset_refault(struct folio *folio, void *shadow) in workingset_refault() argument
402 lru_gen_refault(folio, shadow); in workingset_refault()
406 unpack_shadow(shadow, &memcgid, &pgdat, &eviction, &workingset); in workingset_refault()

1234567