Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 29, 2017 at 10:05 PM, Andy Lutomirski <luto@xxxxxxxxxx> wrote:
> Hmm.  There's another option that might be considerably nicer, though:
> put the IRQ stack at a known (at link time) position *in percpu
> space*.  (Presumably it already is -- I haven't checked.)  Then we do:
>
> .macro ENTER_IRQ_STACK old_rsp
>     DEBUG_ENTRY_ASSERT_IRQS_OFF
>     movq    %rsp, \old_rsp
>     incl    PER_CPU_VAR(irq_count)
>
>     /*
>      * Right now, if we just incremented irq_count to zero, we've
>      * claimed the IRQ stack but we haven't switched to it yet.
>      * Anything that can interrupt us here without using IST
>      * must be *extremely* careful to limit its stack usage.
>      */
>     jnz .Lpush_old_rsp_\@
>     movq    \old_rsp, PER_CPU_VAR(top_word_in_irq_stack)
>     movq    PER_CPU_VAR(irq_stack_ptr), %rsp
>     .Lpush_old_rsp_\@:
>     pushq    \old_rsp
> .endm
>

How about the two commits here (well, soon to be there once gitweb catches up):

https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/entry_irq_stack&id=0f56a55bb133cd53ccb78ca51378086296618322

If you like them, want to add them to your series?
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux