Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-23 Thread Andrey Konovalov
On Wed, May 23, 2018 at 7:47 PM, Nick Desaulniers wrote: > On Wed, May 23, 2018 at 4:54 AM Andrey Konovalov > wrote: >> On Tue, May 22, 2018 at 8:28 PM, Nick Desaulniers >> wrote: >> > On Fri, May 18, 2018 at 11:13 AM Marc Zyngier > wrote: >> >> > - you have checked that with a released version

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-23 Thread Nick Desaulniers
On Wed, May 23, 2018 at 4:54 AM Andrey Konovalov wrote: > On Tue, May 22, 2018 at 8:28 PM, Nick Desaulniers > wrote: > > On Fri, May 18, 2018 at 11:13 AM Marc Zyngier wrote: > >> > - you have checked that with a released version of the compiler, you > > > > On Tue, May 22, 2018 at 10:58 AM Andre

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-23 Thread Andrey Konovalov
On Tue, May 22, 2018 at 8:28 PM, Nick Desaulniers wrote: > On Fri, May 18, 2018 at 11:13 AM Marc Zyngier wrote: >> > - you have checked that with a released version of the compiler, you > > On Tue, May 22, 2018 at 10:58 AM Andrey Konovalov > wrote: >> Tested-by: Andrey Konovalov > > Hi Andrey,

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-22 Thread Nick Desaulniers
On Fri, May 18, 2018 at 11:13 AM Marc Zyngier wrote: > > - you have checked that with a released version of the compiler, you On Tue, May 22, 2018 at 10:58 AM Andrey Konovalov wrote: > Tested-by: Andrey Konovalov Hi Andrey, Thank you very much for this report. Can you confirm as well the vers

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-22 Thread Andrey Konovalov
On Sat, May 19, 2018 at 12:44 PM, Marc Zyngier wrote: > That would definitely be the right thing to do. Make sure you (or > Andrey tests with the latest released mainline kernel (4.16 for now) > or (even better) the tip of Linus' tree. Hi! I can confirm that after applying this patch onto 4.17-r

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-19 Thread Marc Zyngier
On Fri, 18 May 2018 19:31:50 +0100, Nick Desaulniers wrote: > > On Fri, May 18, 2018 at 11:13 AM Marc Zyngier wrote: > > What I'd really like is to apply that patch knowing that: > > > - you have checked that with a released version of the compiler, you > > don't observe any absolute address in

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Nick Desaulniers
On Fri, May 18, 2018 at 11:13 AM Marc Zyngier wrote: > What I'd really like is to apply that patch knowing that: > - you have checked that with a released version of the compiler, you > don't observe any absolute address in any of the objects that are going > to be executed at EL2 on a mainline k

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Marc Zyngier
On 18/05/18 18:56, Nick Desaulniers wrote: > + Andrey > > On Fri, May 18, 2018 at 10:45 AM Marc Zyngier wrote: >> On 18/05/18 18:40, Nick Desaulniers wrote: >>> On Fri, May 18, 2018 at 10:30 AM Marc Zyngier > wrote: I'm going to ask the question I've asked before when this patch cropped >>>

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Nick Desaulniers
+ Andrey On Fri, May 18, 2018 at 10:45 AM Marc Zyngier wrote: > On 18/05/18 18:40, Nick Desaulniers wrote: > > On Fri, May 18, 2018 at 10:30 AM Marc Zyngier wrote: > >> I'm going to ask the question I've asked before when this patch cropped > >> up (must be the 4th time now): The previous threa

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Marc Zyngier
On 18/05/18 18:40, Nick Desaulniers wrote: > On Fri, May 18, 2018 at 10:30 AM Marc Zyngier wrote: >> I'm going to ask the question I've asked before when this patch cropped >> up (must be the 4th time now): > >> Is it guaranteed that this is the only case where LLVM/clang is going to >> generate

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Nick Desaulniers
+ Andrey (who reported testing this patch in https://github.com/ClangBuiltLinux/linux/issues/11) On Fri, May 18, 2018 at 10:40 AM Nick Desaulniers wrote: > On Fri, May 18, 2018 at 10:30 AM Marc Zyngier wrote: > > I'm going to ask the question I've asked before when this patch cropped > > up (mus

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Nick Desaulniers
On Fri, May 18, 2018 at 10:30 AM Marc Zyngier wrote: > I'm going to ask the question I've asked before when this patch cropped > up (must be the 4th time now): > Is it guaranteed that this is the only case where LLVM/clang is going to > generate absolute addresses instead of using relative addres

Re: [PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Marc Zyngier
On 18/05/18 18:02, Sami Tolvanen wrote: > Starting with LLVM r308050, clang generates a jump table with EL1 > virtual addresses in __init_stage2_translation, which results in a > kernel panic when booting at EL2: > > Kernel panic - not syncing: HYP panic: > PS:83c9 PC:089e6fd8 ESR:

[PATCH] arm64: kvm: use -fno-jump-tables with clang

2018-05-18 Thread Sami Tolvanen
Starting with LLVM r308050, clang generates a jump table with EL1 virtual addresses in __init_stage2_translation, which results in a kernel panic when booting at EL2: Kernel panic - not syncing: HYP panic: PS:83c9 PC:089e6fd8 ESR:8604 FAR:089e6fd8 HPFAR:098250