From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3549AC433DF for ; Thu, 4 Jun 2020 15:42:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01AB42065C for ; Thu, 4 Jun 2020 15:42:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PG7icQoL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="hCehaAqs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01AB42065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8KKFF84crcA348RLm0AQIZZMXMNDTHYjHZKdGHtYod4=; b=PG7icQoLSVLWRr I/N1ilBbgckxrbct/3/4BqhqeaTZ/IDZVRgmxTBBlInmRpdHJbS3sNrVwERdxu4PFIgkjusOpYGKn 7o4yTjrHh2Q2A6G+CVUTrOPOp3hb6oezsDRVfSqAYeSiLXFK0PdHD7iTf0lPWd6SN8F4u3+9XWp/v juXdLHJrpCy9fn++lpDuJtNlGnxLpygxwqAyEfWl7fRGXZOaKI5vcARagPQez0ez1PAIzPmJsLq00 oIFkOEeNE3upXgeEg2S2P0Ru7x29gD2cywbxZNmTpW5m9OGqJr81krQGkP3qDjz4QfbclEZuS3SrE bvzngNFGCiCjsrH7fjSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgs0G-0006Fo-Fy; Thu, 04 Jun 2020 15:42:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgs0E-0006FP-6f for linux-arm-kernel@lists.infradead.org; Thu, 04 Jun 2020 15:41:59 +0000 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 84C16207F5 for ; Thu, 4 Jun 2020 15:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591285317; bh=pK4FDu7W2yf0eqKYhRyMiWJuadUAIebGFaZQ87At2RM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hCehaAqsrAjEf0X3A8xzqVWbbszeuxgDXusBpS8P5ZsAsDH2w3qkyKIQdJdzeco0r 5SK987TG8piqM2l/qEKhmqDg8xmYeiDloeq73L+UigjOFXLR6CGKMh4UEVfJAyIMMn ieNO1Xy135orWEAeSGkQaFZXQxXvRwj6aForWFQA= Received: by mail-oi1-f180.google.com with SMTP id d67so5466454oig.6 for ; Thu, 04 Jun 2020 08:41:57 -0700 (PDT) X-Gm-Message-State: AOAM530Jv3tQ2maHxzp6z5afJl88hqHZ9CfmQVZ6J92DAcqLytZSFtH6 mfKfad2tnJHNYrc9VPPCzlMEUsYTu5Mlsahsaa4= X-Google-Smtp-Source: ABdhPJxpeqw4EYX9MmG08zICZV3coWi/iKvKaf0ZN4tKtm8Rdj7gSWaZsyepiLLydDD3vqMpajFSDvP0wt8Lgm/jZew= X-Received: by 2002:aca:b707:: with SMTP id h7mr3694316oif.174.1591285316871; Thu, 04 Jun 2020 08:41:56 -0700 (PDT) MIME-Version: 1.0 References: <20200415082922.32709-1-ardb@kernel.org> <158808120907.217905.4632288691847383619.b4-ty@kernel.org> <20200604154141.4983aeaa@why> <20200604150122.GA3650@willie-the-truck> In-Reply-To: From: Ard Biesheuvel Date: Thu, 4 Jun 2020 17:41:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely To: Marc Zyngier X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200604_084158_261383_5CE94C62 X-CRM114-Status: GOOD ( 21.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , suzuki.poulose@arm.com, Catalin Marinas , James Morse , Will Deacon , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 4 Jun 2020 at 17:25, Marc Zyngier wrote: > > On 2020-06-04 16:01, Will Deacon wrote: > > On Thu, Jun 04, 2020 at 03:41:41PM +0100, Marc Zyngier wrote: > >> Hi all, > >> > >> On Tue, 28 Apr 2020 15:49:35 +0100 > >> Will Deacon wrote: > >> > >> > On Wed, 15 Apr 2020 10:29:22 +0200, Ard Biesheuvel wrote: > >> > > TEXT_OFFSET on arm64 is a historical artifact from the early days of > >> > > the arm64 port where the boot protocol was basically 'copy this image > >> > > to the base of memory + 512k', giving us 512 KB of guaranteed BSS space > >> > > to put the swapper page tables. When the arm64 port was merged for > >> > > v3.10, the Image header already carried the actual value of TEXT_OFFSET, > >> > > to allow the bootloader to discover it dynamically rather than hardcode > >> > > it to 512 KB. > >> > > > >> > > [...] > >> > > >> > Applied to arm64 (for-next/misc), thanks! > >> > > >> > [1/1] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely > >> > https://git.kernel.org/arm64/c/cfa7ede20f13 > >> > >> This breaks a guest kernel booted with kvmtool (tested on my d05). > >> Reverting it on top of 6929f71e46bd makes it work again. I haven't yet > >> investigated what is happening here though. > > > > Weird, that's a combination I test, just not on d05. Are you using > > defconfig? Can you share your full kvmtool invication please? > > Ah, good point. Not defconfig, but one that allows me to run the same > kernel on my whole zoo[1]. As for the kvmtool invocation, it is pretty > basic: > > lkvm run -m 512 -c 4 -p earlycon -k arch/arm64/boot/Image > OK, so my suspicions is that your config does not enable CONFIG_RANDOMIZE_BASE, and that kvmtool ignores the text offset value in the header altogether. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel