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>] [day] [month] [year] [list]
Message-ID: <Ys6WCwU0VlTe2zIf@hirez.programming.kicks-ass.net>
Date:   Wed, 13 Jul 2022 11:53:15 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Song Liu <song@...nel.org>
Cc:     bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-modules@...r.kernel.org,
        mcgrof@...nel.org, rostedt@...dmis.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, mhiramat@...nel.org,
        naveen.n.rao@...ux.ibm.com, davem@...emloft.net,
        anil.s.keshavamurthy@...el.com, keescook@...omium.org,
        hch@...radead.org, dave@...olabs.net, daniel@...earbox.net,
        kernel-team@...com, x86@...nel.org, dave.hansen@...ux.intel.com,
        rick.p.edgecombe@...el.com, akpm@...ux-foundation.org
Subject: Re: [PATCH bpf-next 1/3] mm/vmalloc: introduce vmalloc_exec which
 allocates RO+X memory

On Wed, Jul 13, 2022 at 12:18:44AM -0700, Song Liu wrote:
> +/**
> + * vmalloc_exec - allocate RO+X memory in kernel text space
> + * @size:	allocation size
> + *
> + * Allocate @size of RO+X memory in kernel text space. This memory can be
> + * used to serve dynamic kernel text, such as BPF programs.
> + *
> + * The memory allocated is filled illegal instructions.
> + *
> + * Return: pointer to the allocated memory or %NULL on error
> + */
> +void *vmalloc_exec(size_t size)
> +{
> +	return vmalloc_exec_pack_alloc(size);
> +}
> +EXPORT_SYMBOL_GPL(vmalloc_exec);

NAK! modules do *NOT* get to allocate text.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ