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: <20200616103137.GQ2531@hirez.programming.kicks-ass.net>
Date:   Tue, 16 Jun 2020 12:31:37 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Dexuan Cui <decui@...rosoft.com>, vkuznets <vkuznets@...hat.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Andy Lutomirski <luto@...nel.org>,
        Andy Lutomirski <luto@...capital.net>,
        Michael Kelley <mikelley@...rosoft.com>,
        Ju-Hyoung Lee <juhlee@...rosoft.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Tom Lendacky <thomas.lendacky@....com>
Subject: Re: hv_hypercall_pg page permissios

On Tue, Jun 16, 2020 at 12:24:12PM +0200, Christoph Hellwig wrote:
> On Tue, Jun 16, 2020 at 12:23:50PM +0200, Christoph Hellwig wrote:

> > > +	hv_hypercall_pg = module_alloc(PAGE_SIZE);
> > >  	if (hv_hypercall_pg == NULL) {
> > >  		wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
> > >  		goto remove_cpuhp_state;
> > >  	}
> > >  
> > > +	set_memory_ro((unsigned long)hv_hypercall_pg, 1);
> > > +	set_memory_x((unsigned long)hv_hypercall_pg, 1);
> > 
> > The changing of the permissions sucks.  I thought about adding
> > a module_alloc_prot with an explicit pgprot_t argument.  On x86
> > alone at least ftrace would also benefit from that.

How would ftrace benefit from a RX permission? We need to actually write
to the page first. This HV thing is special in that it lets the host
write.

> The above is also missing a set_vm_flush_reset_perms.

Ah, indeed. Otherwise we don't clean up properly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ