lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlEZ1+amMITl7TaR@infradead.org>
Date:   Fri, 8 Apr 2022 22:29:59 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Song Liu <song@...nel.org>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org, linux-mm@...ck.org,
        ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
        kernel-team@...com, akpm@...ux-foundation.org,
        rick.p.edgecombe@...el.com, hch@...radead.org,
        imbrenda@...ux.ibm.com
Subject: Re: [PATCH bpf 2/2] bpf: use vmalloc with VM_ALLOW_HUGE_VMAP for
 bpf_prog_pack

On Fri, Apr 08, 2022 at 03:34:43PM -0700, Song Liu wrote:
> +static void *bpf_prog_pack_vmalloc(unsigned long size)
> +{
> +#if defined(MODULES_VADDR)
> +	unsigned long start = MODULES_VADDR;
> +	unsigned long end = MODULES_END;
> +#else
> +	unsigned long start = VMALLOC_START;
> +	unsigned long end = VMALLOC_END;
> +#endif
> +
> +	return __vmalloc_node_range(size, PAGE_SIZE, start, end, GFP_KERNEL, PAGE_KERNEL,
> +				    VM_DEFER_KMEMLEAK | VM_ALLOW_HUGE_VMAP,
> +				    NUMA_NO_NODE, __builtin_return_address(0));
> +}

Instead of having this magic in bpf I think a module_alloc_large would
seems like the better interface here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ