From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964978AbdKPQZc (ORCPT ); Thu, 16 Nov 2017 11:25:32 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:44564 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935061AbdKPQZW (ORCPT ); Thu, 16 Nov 2017 11:25:22 -0500 X-Google-Smtp-Source: AGs4zMatNqL3BDe2vE4EP3RVv6hAYeNFmYfYgPrhDmv0rQ7WWxamH7RldASZ+9mb2sOQ6pG4t9iaWQ== Date: Thu, 16 Nov 2017 08:25:18 -0800 From: Sami Tolvanen To: Will Deacon Cc: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke Subject: Re: [PATCH v2 06/18] arm64: kvm: use -fno-jump-tables with clang Message-ID: <20171116162518.GB94341@samitolvanen.mtv.corp.google.com> References: <20171115213428.22559-1-samitolvanen@google.com> <20171115213428.22559-7-samitolvanen@google.com> <20171116114616.GC9361@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171116114616.GC9361@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 16, 2017 at 11:46:17AM +0000, Will Deacon wrote: > Can you elaborate a bit more on exactly what you saw failing here, > please? Mark noticed that clang built kernels fail to boot when the kernel starts at EL2: http://lkml.iu.edu/hypermail/linux/kernel/1711.0/02817.html Turns out starting with LLVM r308050, the compiler decides to use a jump table in __init_stage2_translation, and generates code that branches into an EL1 virtual address. > Whilst it's obviously broken to jump to EL1 from EL2 w/o VHE, the > commit message is a bit cryptic. I agree, I'll add a more descriptive commit message for v3. Sami