Displaying 3 results from an estimated 3 matches for "check_kernel".
2020 Feb 11
0
[PATCH 38/62] x86/sev-es: Handle instruction fetches from user-space
...x86/kernel/sev-es.c
+++ b/arch/x86/kernel/sev-es.c
@@ -61,13 +61,29 @@ static enum es_result es_fetch_insn_byte(struct es_em_ctxt *ctxt,
unsigned int offset,
char *buffer)
{
- char *rip = (char *)ctxt->regs->ip;
-
- /* More checks are needed when we boot to user-space */
- if (!check_kernel(ctxt->regs))
- return ES_UNSUPPORTED;
-
- buffer[offset] = rip[offset];
+ if (user_mode(ctxt->regs)) {
+ unsigned long addr = ctxt->regs->ip + offset;
+ char __user *rip = (char __user *)addr;
+
+ if (unlikely(addr >= TASK_SIZE_MAX))
+ return ES_UNSUPPORTED;
+
+ if (copy_from_...
2020 Feb 11
83
[RFC PATCH 00/62] Linux as SEV-ES Guest Support
Hi,
here is the first public post of the patch-set to enable Linux to run
under SEV-ES enabled hypervisors. The code is mostly feature-complete,
but there are still a couple of bugs to fix. Nevertheless, given the
size of the patch-set, I think it is about time to ask for initial
feedback of the changes that come with it. To better understand the code
here is a quick explanation of SEV-ES first.
2020 Feb 11
83
[RFC PATCH 00/62] Linux as SEV-ES Guest Support
Hi,
here is the first public post of the patch-set to enable Linux to run
under SEV-ES enabled hypervisors. The code is mostly feature-complete,
but there are still a couple of bugs to fix. Nevertheless, given the
size of the patch-set, I think it is about time to ask for initial
feedback of the changes that come with it. To better understand the code
here is a quick explanation of SEV-ES first.