On Sun, 10 May 2020 17:59:27 +0800
Lai Jiangshan <jiangshan...@gmail.com> wrote:

> I think adding a small number of instructions to preempt_schedule_irq()
> is sufficient to create the needed protected region between the start
> of a function and the trampoline body.
> 
> preempt_schedule_irq() {
> +  if (unlikely(is_trampoline_page(page_of(interrupted_ip)))) {
> +      return; // don't do preempt schedule
> +
> +  }
>   preempt_schedule_irq() original body
> }

First, this would never be accepted due to the overhead it would cause,
next, the interrupt instruction pointer could be the call to the
trampoline itself. It would be hard to guarantee that we are not on the way
to the trampoline in question.

-- Steve

Reply via email to