[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] x86_64: install emergency handler for double fault
From: |
Almudena Garcia |
Subject: |
Re: [PATCH 2/3] x86_64: install emergency handler for double fault |
Date: |
Mon, 19 Jun 2023 17:53:45 +0000 |
Hi:
The cpus are started sequentially: don't start the next until the current has
finished its configuration.
But your idea is good
Thanks
El lunes 19 de junio de 2023, Luca Dariz escribió:
> Il 17/06/23 23:12, Samuel Thibault ha scritto:
> > Luca Dariz, le jeu. 15 juin 2023 23:49:30 +0200, a ecrit:
> >> diff --git a/i386/i386/ktss.c b/i386/i386/ktss.c
> >> index 1d880167..52f3722c 100644
> >> --- a/i386/i386/ktss.c
> >> +++ b/i386/i386/ktss.c
> >> @@ -61,6 +61,7 @@ ktss_fill(struct task_tss *myktss, struct
> >> real_descriptor *mygdt)
> >> /* Initialize the master TSS. */
> >> #ifdef __x86_64__
> >> myktss->tss.rsp0 = (unsigned long)(exception_stack+1024);
> >> + myktss->tss.ist1 = (unsigned long)(exception_stack+1024);
> >
> > Shouldn't we use a different stack, to avoid overwriting information
> > from the first fault?
>
> you're right, otherwise it will be less useful in case a double fault
> happens before scheduling starts (which then overwrites rsp0 with the
> pcb stack on every context switch).
>
> Thinking about the smp case, are the cpu started in parallel or
> sequentially? There might also be a need to set a cpu-specific first
> rsp0, if there is the possibility to have early interrupts concurrently.
>
>
> Luca
>
>
>
--
Enviado desde mi dispositivo Sailfish
[PATCH 3/3] x86_64: add a critical section on entry and exit from syscall/sysret, Luca Dariz, 2023/06/15
Re: [PATCH 1/3] x86_64: use solid intstack already during bootstrap, Samuel Thibault, 2023/06/17