Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1242931pxa; Thu, 6 Aug 2020 03:13:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz11Mjfv7skv41xUBJsM3ICGYuRw7xVOYRtO88GiStSzW7MfcpWwO67UKQTE6v6m3xRb52c X-Received: by 2002:a17:906:f1da:: with SMTP id gx26mr3615902ejb.129.1596708788976; Thu, 06 Aug 2020 03:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596708788; cv=none; d=google.com; s=arc-20160816; b=s88kIxc0WNBBsZeCp3go+JLTPTi/1AzlqHDuJ4Gz9+T+gIjhbUgmVSinIQcC37WfBZ Lu0lUWXb0m7SjwF6ihxj/SmAe2PzdYqaynUOLGcKN9yh9Ga/w5hI/dGjreP469sDCtTz LHd7buSfyj3ZWSmfdDhs1XuuzyyBuD3+wBlGMczSUZnvuHrqwnAcYgrNbJHAaCbHZxUB yTEasbW0tX2aVVs+Ku4aKhVW9QmFrJ5jsabhzdN3ujkCcPiGoC7Dh8z3R0ACcUO2pcGs 4P4tx6AFz2i5C4neVtMLB1whU5kWsFr/sJY6yHnNjXzbRbhqzQaLMWeobCoFQkSKqvwo 8WbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+fgk3HZ5m0e/1dhZqvNnSutnDSwmvDDETgodn+wx1+0=; b=yFtMapRyJR0wSrsQtlHvTFRrFq2bSk63+WkAZQH/a7IAXX3w05JVmK8kfCH2fN9yAv mhdewdIzsCQN6C+0WlUBvenGZ5O17Yt7ef4ePVAhjuhpTpwpOoYKvPLhSPHgHPGluCX+ Ihi63nxM4wqlIy9NuU9XdfYuKwZolKQZU96ooskEs/9yPC0O/ks6FWP1UnOSyzp/CxGy VjU3Rsn+ur0Yw3hr9Wgq++9DTL8PbsOjNVEcPXyAFOoDVZIljhcdBIExhlhfqWqoMbsv A8o35xqrfQy2u2/gzsB3RvVLpzpJ9LoF2xSypEHy24iZ31IQfKkNz3SI3OcYrfVlwtAd Hsig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="utR/z0+X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z70si2919806ede.247.2020.08.06.03.12.46; Thu, 06 Aug 2020 03:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="utR/z0+X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbgHFKMX (ORCPT + 99 others); Thu, 6 Aug 2020 06:12:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729309AbgHFKLu (ORCPT ); Thu, 6 Aug 2020 06:11:50 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42148C061574 for ; Thu, 6 Aug 2020 03:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+fgk3HZ5m0e/1dhZqvNnSutnDSwmvDDETgodn+wx1+0=; b=utR/z0+XUj9rn5ej/nOHnNIPo MdP2rRzbcSDB6exsMKK1DBruYHHNmRm8ajcjrvRTin7Pqa7BLcJhgWNhDZl+pvqpUfMcliKqIKgBA 6bUI2csEIuRowh1M4+hp3A75rc+nEWcOoOd8Y6GDahAXzAax6woVjnbgaZyv+weVUrMhUBcRKFzlP AyMtbfgH7vj1jupAsiUyy/7LQpy8lYMG4Gu/elvoSDPNTGnYTn5U3I7PErQH0k0zvk2S8ZCp6Tl9e nU+1i0Ee4VTdD2KACzY/WDv3zjM/yZVopm6osnf4dLW8zP6/i4QJLGElFru00TygDewwjcmmi4eWJ vmz/1HNsQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49024) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3csF-0004Uv-2Y; Thu, 06 Aug 2020 11:11:47 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1k3csD-000659-Kl; Thu, 06 Aug 2020 11:11:45 +0100 Date: Thu, 6 Aug 2020 11:11:45 +0100 From: Russell King - ARM Linux admin To: Norbert Lange Cc: Arnd Bergmann , linux-kernel , Petr Malat , Kees Cook , Adam Borowski , Sedat Dilek , Andrew Morton , Nick Terrell Subject: Re: [PATCH] arm: Add support for ZSTD compressed kernel Message-ID: <20200806101145.GC1551@shell.armlinux.org.uk> References: <20200805230555.84214-1-nolange79@gmail.com> <20200806003042.GB1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 10:45:42AM +0200, Norbert Lange wrote: > Am Do., 6. Aug. 2020 um 02:30 Uhr schrieb Russell King - ARM Linux > admin : > > > > On Thu, Aug 06, 2020 at 01:05:55AM +0200, Norbert Lange wrote: > > > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S > > > index 434a16982e34..1af01bfe6638 100644 > > > --- a/arch/arm/boot/compressed/head.S > > > +++ b/arch/arm/boot/compressed/head.S > > > @@ -614,7 +614,11 @@ not_relocated: mov r0, #0 > > > */ > > > mov r0, r4 > > > mov r1, sp @ malloc space above stack > > > +#if defined(CONFIG_KERNEL_ZSTD) > > > + add r2, sp, #0x30000 @ Context needs ~160K > > > > That's going to mess up kexec: > > > > /* > > * The zImage length does not include its stack (4k) or its > > * malloc space (64k). Include this. > > */ > > len += 0x11000; > > > > I guess we need to add this to the information provided to kexec. > > Ouch, I guess it's rather impossible to load a new ZSTD kernel with a old > kexec version in that case. > > Some ideas to fix that would be: > > - Increase the padding to "192K + 4K is enough for everyone" in kexec > - Add the required/recommended stack+heap size to zImage so kexec can use it. This is definitely preferred. See patches - though this is only the kernel side. The first I've had for some time and isn't related to this issue. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!