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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 21 Nov 2020 20:10:16 -0800
From:   Andy Lutomirski <>
To:     Rick Edgecombe <>
Cc:     Andrew Morton <>,
        Jessica Yu <>, bpf <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Andrew Lutomirski <>,
        Dave Hansen <>,
        Peter Zijlstra <>, X86 ML <>,
        Mike Rapoport <>, Linux-MM <>,
        LKML <>,
        Dan Williams <>,
        Elena Reshetova <>,
        Weiny Ira <>
Subject: Re: [PATCH RFC 01/10] vmalloc: Add basic perm alloc implementation

On Fri, Nov 20, 2020 at 12:30 PM Rick Edgecombe
<> wrote:
> In order to allow for future arch specific optimizations for vmalloc
> permissions, first add an implementation of a new interface that will
> work cross arch by using the existing set_memory_() functions.
> When allocating some memory that will be RO, for example it should be used
> like:
> /* Reserve va */
> struct perm_allocation *alloc = perm_alloc(vstart, vend, page_cnt, PERM_R);

I'm sure I could reverse-engineer this from the code, but:

Where do vstart and vend come from?  Does perm_alloc() allocate memory
or just virtual addresses?  Is the caller expected to call vmalloc()?
How does one free this thing?

> unsigned long ro = (unsigned long)perm_alloc_address(alloc);
> /* Write to writable address */
> strcpy((char *)perm_writable_addr(alloc, ro), "Some data to be RO");
> /* Signal that writing is done and mapping should be live */
> perm_writable_finish(alloc);
> /* Print from RO address */
> printk("Read only data is: %s\n", (char *)ro);

Powered by blists - more mailing lists