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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0ea3b34-2131-3fd5-3842-ae3f98edf8d8@redhat.com>
Date:   Fri, 4 Oct 2019 09:34:19 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Rick Edgecombe <rick.p.edgecombe@...el.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, x86@...nel.org, linux-mm@...ck.org,
        luto@...nel.org, peterz@...radead.org, dave.hansen@...el.com,
        sean.j.christopherson@...el.com, keescook@...omium.org
Cc:     kristen@...ux.intel.com, deneen.t.dock@...el.com
Subject: Re: [RFC PATCH 12/13] mmap: Add XO support for KVM XO

On 03/10/19 23:23, Rick Edgecombe wrote:
> +
> +	protection_map[4] = PAGE_EXECONLY;
> +	protection_map[12] = PAGE_EXECONLY;

Can you add #defines for the bits in protection_map?  Also perhaps you
can replace the p_xo/p_xr/s_xo/s_xr checks with just with "if
(pgtable_kvmxo_enabled()".

Paolo

> +	/* Prefer non-pkey XO capability if available, to save a pkey */
> +
> +	if (flags & MAP_PRIVATE && (p_xo != p_xr))
> +		return 0;
> +
> +	if (flags & MAP_SHARED && (s_xo != s_xr))
> +		return 0;
>
> +	pkey = execute_only_pkey(current->mm);
> +	if (pkey < 0)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ