Kmap: Add stray access protection for device pages Memremap: Add zone device access protection X86/pks/test: Add testing for global option So I _think_ they too could be converted toįs/nilfs2/ifile.h|24| void *kaddr = kmap(ibh->b_page) įs/reiserfs/inode.c|2397| kmap(bh_result->b_page) The following appear to follow the same pattern as ext2 which was convertedĪfter some code audit. Net/ceph/pagelist.c: pl->mapped_tail = kmap(page) Lib/scatterlist.c: miter->addr = kmap(miter->page) + miter->_offset It would be nice if more of them could be converted to kmap_thread()ĭrivers/firewire/net.c: ptr = kmap(dev->broadcast_rcv_buffer.pages) ĭrivers/gpu/drm/i915/gem/i915_gem_pages.c: return kmap(sg_page(sgt->sgl)) ĭrivers/gpu/drm/ttm/ttm_bo_util.c: map->virtual = kmap(map->page) ĭrivers/infiniband/hw/qib/qib_user_sdma.c: mpage = kmap(page) ĭrivers/misc/vmw_vmci/vmci_host.c: context->notify = kmap(context->notify_page) + (uva & (PAGE_SIZE - 1)) ĭrivers/misc/xilinx_sdfec.c: addr = kmap(pages) ĭrivers/mmc/host/usdhi6rol0.c: host->pg.mapped = kmap(host->pg.page) ĭrivers/nvme/target/tcp.c: iov->iov_base = kmap(sg_page(sg)) + sg->offset + sg_offset ĭrivers/scsi/libiscsi_tcp.c: segment->sg_mapped = kmap(sg_page(sg)) ĭrivers/target/iscsi/iscsi_target.c: iov.iov_base = kmap(sg_page(sg)) + sg->offset + page_off ĭrivers/target/target_core_transport.c: return kmap(sg_page(sg)) + sg->offset įs/btrfs/check-integrity.c: block_ctx->datav = kmap(block_ctx->pagev) įs/ceph/dir.c: cache_ctl->dentries = kmap(cache_ctl->page) įs/ceph/inode.c: ctl->dentries = kmap(ctl->page) įs/erofs/zpvec.h: kmap_atomic(ctor->curr) : kmap(ctor->curr) The following list of callers continue calling kmap() (utilizing the global When it is used 90% of the time it is a thread local call. Lazily override the thread specific PKRS key value only when needed because weĪnticipate PKS to not be needed will not be needed most of the time. To handle the global PKRS state in the most efficient manner possible. Option 3 seems like a good minimal change but there is aĭanger that new code may miss the semantic change of kmap() and not get theīehavior intended for future users. Option 2 would require all of the call sites of Option 1 is simply not feasible kmap_atomic() is not the same semantic as There were a number of options considered.ġ) Attempt to change all the thread local kmap() calls to kmap_atomic()Ģ) Introduce a flags parameter to kmap() to indicate if the mapping should beģ) Change ~20-30 call sites to 'kmap_global()' to indicate that they require aĤ) Change ~209 call sites to 'kmap_thread()' to indicate that the mapping is toīe used within that thread of execution only Page fault with little to no information about why. Effectively, this would cause an unresolved While we don't anticipate global mappings to pmem there is a danger inĬhanging the semantics of kmap(). 'global' while others require a detailed audit to be sure. Some of them seem to expect the mapping to be However, there were another ~20-30 kmap users which do This pattern works very well for the pmem use case and the In fact this is the pattern used in ~90% of theĬallers of kmap(). Specifically, kmap() is most often used within a single thread in a 'map/do However, functionally there is only 1 major change from the last RFC. The core patches submitted contained in the git tree here: Since the last RFC this patch set has grown quite a bit. Nice way to restrict access to persistent memory kernel mappings, while Latent data corruption which will will persist after a reboot. A write to the wrong area of memory could result in Should a stray write in the kernel occur persistent memory is affected more Linux-cachefs, samba-technical, intel-wired-lan Linux-cifs, linux-btrfs, linux-afs, linux-rdma, amd-gfx,ĭri-devel, intel-gfx, drbd-dev, linux-block, xen-devel, Linux-f2fs-devel, linux-nilfs, cluster-devel, ecryptfs, Io-uring, linux-erofs, linux-um, linux-ntfs-dev, reiserfs-devel, Target-devel, linux-nfs, ceph-devel, linux-ext4, linux-aio, Linux-bcache, linux-mtd, devel, linux-efi, linux-mmc, linux-scsi, Linux-kselftest, linuxppc-dev, kvm, netdev, bpf, kexec, Linux-kernel, linux-nvdimm, linux-fsdevel, linux-mm, To: Andrew Morton, Thomas Gleixner, Ingo Molnar, Borislav Petkov,Ĭc: Ira Weiny, x86, Dave Hansen, Dan Williams, Fenghua Yu, linux-doc, ` (58 more replies) 0 siblings, 59 replies 93+ messages in thread 19:49 ` x86/pks: Add a global pkrs option ira.weiny PMEM: Introduce stray write protection for PMEM Linux-SCSI Archive on help / color / mirror / Atom feed * PMEM: Introduce stray write protection for PMEM 19:49 ira.weiny
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |