Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3545431ybb; Mon, 6 Apr 2020 10:45:54 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7+eaO+uJP3ZKMYuZnhAQAkRJEKCes/8SLdXHDGukQMoL9D/VLvWRVGCwPNja5pfheqJmN X-Received: by 2002:aca:b383:: with SMTP id c125mr375036oif.160.1586195154727; Mon, 06 Apr 2020 10:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586195154; cv=none; d=google.com; s=arc-20160816; b=vQaZXCmqdnPDm4u4WZdKs+IgoTG4vpXEzTC8mztNIHIJxPnJXoAUO7W+AUZ+N8bkDJ 711LettaaNZDFZm1uWD/d5kqXeTYEwiE6HgOWLpDvjNSM4R3Wi0yfU8CU8fh7dsYgcxA MnGwVCD94zlOJ9GagAE9tuEsgtANFmKnHw0pkW9YgzyeKCmo5ZhOGHeXjyfAtbQiJyq5 gqkUlFaUH5gkbDy8lHSPS2eFqvwMUANDh4D4LRTRHQkzjwfD9nJIjgG7KaQLG1Ud3QSV j0cbuoJgzAKzzaNbxG7KxpQ6M+UGu06brXnXgsGixSOxqEAMXYFAR4TyJDxROgk6x2UV 9mxA== 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=SvlsLYjk7+N+Zi3Q2er0ZEj5L9OiCRt8VPcz7ScDZKE=; b=W1gHVWzNU1auO4rml+XXsWtvKFjSd18X5UkssfRrwWMFyeVSS7UdyuqIv2fcogp5ZK A5SYTag1a57CWdxjQIdE3OfPWlWDXfVsFQSL3YU4vh3UKulhGzg0GR6yn59uzQtNAoPM FksuasTk9H0iqrwwFTMbnOGxUocpIuxXu8LwCERwdj6M1q8BAa5o6vMAq3m0N6q2JWAd ablcw/mlowBDHD0yw7ftBaaGoUBAUZWog023yV+xlRoKS4AfUvKfJJbR8dXUSD0CghLg jrjUqYjhsslZnw87pVfnBhGIgxzMpJMg0KD8SRaOm3uVqVvO2ZWohdW8kpMWfma4f6YL rtRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mfypNZvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p187si113499oop.28.2020.04.06.10.45.41; Mon, 06 Apr 2020 10:45:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mfypNZvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729868AbgDFRVI (ORCPT + 99 others); Mon, 6 Apr 2020 13:21:08 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49906 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728736AbgDFRVI (ORCPT ); Mon, 6 Apr 2020 13:21:08 -0400 Received: from zn.tnic (p200300EC2F04F600C1A00E803BF5BF5B.dip0.t-ipconnect.de [IPv6:2003:ec:2f04:f600:c1a0:e80:3bf5:bf5b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EECE81EC0CDB; Mon, 6 Apr 2020 19:21:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1586193667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=SvlsLYjk7+N+Zi3Q2er0ZEj5L9OiCRt8VPcz7ScDZKE=; b=mfypNZvvlyY+r+up9ukE9DGjblAgXh2d30KFKbtusE5t1QOSN8uHnxvS6f0NExmxrAj7cY fdeOi/I5GNxEg2h/n4TBzcJe6muphSe662lGoK7/wC8xUyqebdUuwvzbX+Rrr5M+l+aDVs 2RkQ8rhtcnNd25eNI8HzVWqZeQV98ts= Date: Mon, 6 Apr 2020 19:21:02 +0200 From: Borislav Petkov To: Ard Biesheuvel , Arvind Sankar Cc: Sergey Shatunov , hpa@zytor.com, Linux Kernel Mailing List , mingo@redhat.com, Thomas Gleixner , x86@kernel.org, linux-efi , initramfs@vger.kernel.org, Donovan Tremura , Harald Hoyer Subject: Re: [PATCH 1/2] x86/boot/compressed/64: Remove .bss/.pgtable from bzImage Message-ID: <20200406172102.GF2520@zn.tnic> References: <20200405154245.11972-1-me@prok.pw> <20200405231845.GA3095309@rani.riverdale.lan> <20200406035110.GA3241052@rani.riverdale.lan> <20200406084738.GA2520@zn.tnic> <20200406112042.GC2520@zn.tnic> <20200406132215.GA113388@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 Mon, Apr 06, 2020 at 03:29:18PM +0200, Ard Biesheuvel wrote: > > What do you think of the other problem -- that's actually worse to fix, > > as it won't just be when kaslr is disabled, the startup_64 code will do > > relocation to the end of init_size and clobber the initrd before getting > > to the kaslr code, so it will break as soon as the firmware loads the > > "unified kernel image" at a 2Mb-aligned address. The only thing I can > > think of is to just unconditionally call efi_relocate_kernel if we were > > entered via handover_entry? > > > > Yes, that seems to be the most robust approach. The commit in question is this one: d5cdf4cfeac9 ("efi/x86: Don't relocate the kernel unless necessary") I presume? I'm guessing it can simply be reverted as it doesn't fix a bug but it is just an optimization... provided I'm not missing something, of course. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette