search for: virt_addr_valid

Displaying 10 results from an estimated 10 matches for "virt_addr_valid".

2020 Jul 28
0
[vhost:vhost 38/45] include/linux/vdpa.h:43:21: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
...: In file included from include/linux/kernel.h:11, from drivers/vhost/vdpa.c:14: include/linux/scatterlist.h: In function 'sg_set_buf': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0)...
2019 Mar 21
3
Nouveau dmem NULL Pointer deref (SVM)
...120896 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -377,11 +377,21 @@ nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy)  int  nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig)  { +    WARN_ON(!virt_addr_valid(nvbo)); + +    if (!virt_addr_valid(nvbo)) +        return 0; +      struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);      struct ttm_buffer_object *bo = &nvbo->bo;      bool force = false, evict = false;      int ret; +    WARN_ON(!virt_addr_valid(bo)); + +    if (!virt_addr_v...
2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...48 RIP [<ffffffffbc4896fc>] sg_init_one+0x8c/0xa0 RSP <ffffb06e41043698> ---[ end trace 9076d2284efbf735 ]--- This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses struct sockaddr from the stack and virtnet_set_mac_address calls sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); I know there have been a lot of CONFIG_VMAP_STACK fixes around but I didn't find this one reported yet. Thanks, Laura
2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...48 RIP [<ffffffffbc4896fc>] sg_init_one+0x8c/0xa0 RSP <ffffb06e41043698> ---[ end trace 9076d2284efbf735 ]--- This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses struct sockaddr from the stack and virtnet_set_mac_address calls sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); I know there have been a lot of CONFIG_VMAP_STACK fixes around but I didn't find this one reported yet. Thanks, Laura
2016 Dec 07
0
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
On Mon, Dec 5, 2016 at 3:53 PM, Laura Abbott <labbott at redhat.com> wrote: > This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses > struct sockaddr from the stack and virtnet_set_mac_address calls > sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); > > I know there have been a lot of CONFIG_VMAP_STACK fixes around but I > didn't find this one reported yet. Fixed by: commit e37e2ff350a321ad9c36b588e76f34fbba305be6 Author: Andy Lutomirski <luto at kernel.org> Date: Mon Dec 5 18:10:58 2016 -0800 virtio-net: Fix...
2024 Apr 26
1
[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()
On Fri, 2024-04-26 at 11:41 -0400, Lyude Paul wrote: > We hit this because when initializing firmware of type > NVKM_FIRMWARE_IMG_DMA we allocate coherent memory and then attempt to > include that coherent memory in a scatterlist. I'm sure this patch is a good one, and I will try to test it soon, but I am very curious to know why including coherent memory in a scatterlist is bad.
2024 Apr 28
1
[PATCH 1/2] drm/nouveau/firmware: Fix SG_DEBUG error with nvkm_firmware_ctor()
...age pointer, so * requesting compound pages doesn't make sense (and can't even be * supported at all by various backends). */ if (WARN_ON_ONCE(flag & __GFP_COMP)) return NULL; Which explains the check in sg_set_buf() that this patch stops us from hitting: BUG_ON(!virt_addr_valid(buf)); Scatterlists need page pointers (we use one later down here:) sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); But we can't get a page pointer from an allocation made by dma_alloc_coherent() - but we can from vmalloc(). I'll fix the patch explanation in the next...
2013 Jul 25
0
How to get the PFN of a vmalloc'ed address in a domU ?
...PAGE_SIZE); } The mapping is successful. I then try to get a reference to these pages : if(is_vmalloc_addr((void *)(x->buffer_addr+recv_offset*PAGE_SIZE))) printk(KERN_INFO "Is vmalloc addr\n"); // As this text is displayed, I verified it''s a vmalloc''ed page if(virt_addr_valid((void *)(x->buffer_addr+recv_offset*PAGE_SIZE))) printk(KERN_INFO "Is virt addr\n"); unsigned long pfn = vmalloc_to_pfn((void *)(x->buffer_addr+recv_offset*PAGE_SIZE)); printk(KERN_INFO "PFN 1 : %lu\n", pfn); // The returned PFN is "0", it''s therefo...
2019 Sep 06
0
[vhost:linux-next 13/15] arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0
...93 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 94 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 95 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 96 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 97 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 98 #ifdef CONFIG_VIRTUAL_MEM_MAP ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds...
2011 Jul 21
51
Linux Stubdom Problem
2011/7/19 Stefano Stabellini <stefano.stabellini@eu.citrix.com>: > CC''ing Tim and xen-devel > > On Mon, 18 Jul 2011, Jiageng Yu wrote: >> 2011/7/16 Stefano Stabellini <stefano.stabellini@eu.citrix.com>: >> > On Fri, 15 Jul 2011, Jiageng Yu wrote: >> >> 2011/7/15 Jiageng Yu <yujiageng734@gmail.com>: >> >> > 2011/7/15