[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0ed2739b-6961-c476-be2d-020e855796dc@redhat.com>
Date: Wed, 8 Apr 2020 10:03:12 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jan Kiszka <jan.kiszka@...mens.com>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org,
hch@...radead.org, sean.j.christopherson@...el.com,
mingo@...hat.com, bp@...en8.de, hpa@...or.com, x86@...nel.org,
kenny@...ix.com, jeyu@...nel.org, rasmus.villemoes@...vas.dk,
fenghua.yu@...el.com, xiaoyao.li@...el.com, nadav.amit@...il.com,
thellstrom@...are.com, tony.luck@...el.com,
gregkh@...uxfoundation.org, jannh@...gle.com,
keescook@...omium.org, David.Laight@...lab.com,
dcovelli@...are.com, mhiramat@...nel.org,
Wolfgang Mauerer <wolfgang.mauerer@...-regensburg.de>
Subject: Re: [PATCH 4/4] x86,module: Detect CRn and DRn manipulation
On 08/04/20 07:58, Jan Kiszka wrote:
>>>
>>> + if (insn_is_mov_CRn(&insn) || insn_is_mov_DRn(&insn)) {
>>> + pr_err("Module writes to CRn or DRn, please use the
>>> proper accessors: %s\n", mod->name);
>>> + return -ENOEXEC;
>>> + }
>>
>> Hmm, wont this break jailhouse?
>
> Yes, possibly. We load the hypervisor binary via request_firmware into
> executable memory and then jump into it. So most of the "suspicious"
> code is there - except two cr4_init_shadow() calls to propagate the
> non-transparent update of VMXE into that shadow. We could hide that CR4
> flag, but that could mislead root Linux to try to use VMX while in jail.
Why not contribute the Jailhouse loader into Linux?
Paolo
Powered by blists - more mailing lists