|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/2] xen/arm: entry: Place a speculation barrier following an ret instruction
Hi Bertrand, On 18/08/2020 18:06, Bertrand Marquis wrote: I will introduce *_unsafe() helpers that will not contain the speculation barrier. It could then be used in place where we think the barrier is unnecessary.On 18 Aug 2020, at 17:43, Julien Grall <julien@xxxxxxx> wrote: On 18/08/2020 17:35, Bertrand Marquis wrote:Hi Julien,Hi Bertrand,Somehow we stopped on this thread and you did already most of the work so I think we should try to finish what you startedSorry this fell-through the cracks. I have a new version for patch #1, but not yet patch #2.No problem this came back while trying to reduce my todolist stack :-)I am still debating with myself where the speculation barrier should be added after the SMC :).I think that we should unless the SMC is in the context switch path (as all other calls should not have a performance impact). On 4 Jul 2020, at 17:07, Julien Grall <julien@xxxxxxx> wrote: On 17/06/2020 17:23, Julien Grall wrote:Hi, On 16/06/2020 22:24, Stefano Stabellini wrote:On Tue, 16 Jun 2020, Julien Grall wrote:From: Julien Grall <jgrall@xxxxxxxxxx> Some CPUs can speculate past a RET instruction and potentially perform speculative accesses to memory before processing the return. There is no known gadget available after the RET instruction today. However some of the registers (such as in check_pending_guest_serror()) may contain a value provided the guest. This is a bit messy on Arm32 because not all the return are using "mov pc,lr". Anyway, I will explore the two approaches. The patch sounds good, i just need to find a way to analyse if you missed a ret or not which is not easy with such a patch :-) I did struggle to find all the instances. The directory lib/ is actually quite difficult to go through on 32-bit because they are multiple way to implement a return.Finding a way to reduce manual speculation barrier would definitely be helpful. I will try to revise the patch during this week. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |