Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp323336ybz; Fri, 24 Apr 2020 17:00:25 -0700 (PDT) X-Google-Smtp-Source: APiQypLGD0X6QVp9zCJOTKMSILSnPztCWYU80sw1b+WhQ25P9KRBR2ngLUN+m3a79M0tPGp6MBag X-Received: by 2002:a05:6402:1d1c:: with SMTP id dg28mr9644420edb.315.1587772825193; Fri, 24 Apr 2020 17:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587772825; cv=none; d=google.com; s=arc-20160816; b=FeqlIj/vivV57xziEiHujDqvQ6Jd+w8Y7QqhJDiSgqmpolt5DQlno4/FidIHWz+k7e XwkdFtKuuWcqkBvHEwXcMrjeu3yXnog+89pca/4lIRCe5/3hRaLo1Ok1MjwwaLjYxDw3 NAqBUYaL+QITuDozDpTgbDk2EBXPhCl0Wn5z+Hy+0rqWM0ltPgZ3ilGSAhPErMVAVZil e5CL53+a0sOTZRRh5mHm6t+E0P5pOktBbKmqi6FKJDOJpmV+WFqEQkVrzevef568mVPm r7pSCitz8kgJnh3T6MdfghrvgUrdROhtip39NiIcH49Qr0sYO3cf+AsqQa13EzaUJpNX I2Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=3uTzV9uRxJe16s1JHace1D8OWwXkviSp/OnfNMXzYCQ=; b=EUNhkYlYPharGpxCzeFLwruPR6kAtYx6jD3NmrwfXaN0LKzzBm//DmSntGNwderWQx u7Aqf4GrdAowZH4oh6zbpiWJsTqScDoIfFx5tBh9kOBssdo8/O53nayq/cKPXBoMQHjx uON9RWo8Mhqia9HJpEs30BKKOo0QGV+HrJ62PiB+N2UvCWOE27NwfPoRJg5YyovoAJyj UpN8V7V2vFaiKCw20n1TIMn1/GkfcO40TExV39MSV4OW/hXqha5jaKq2reLoxEtuMuxx fgB/zUl3sgNh/JzqbV7iPze87u3umEsTnPI0TJyDAnpwLItM1+p376y9Zx8W2oRVLKth krkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si3917075edv.573.2020.04.24.17.00.02; Fri, 24 Apr 2020 17:00:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbgDXX6g (ORCPT + 99 others); Fri, 24 Apr 2020 19:58:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:54796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgDXX6g (ORCPT ); Fri, 24 Apr 2020 19:58:36 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A98F20748; Fri, 24 Apr 2020 23:58:35 +0000 (UTC) Date: Fri, 24 Apr 2020 19:58:33 -0400 From: Steven Rostedt To: Masami Hiramatsu Cc: Borislav Petkov , Kees Cook , LKML , Ingo Molnar , Andrew Morton Subject: Re: [BUGFIX PATCH 1/1] bootconfig: Fix to remove bootconfig data from initrd while boot Message-ID: <20200424195833.1487a1a0@oasis.local.home> In-Reply-To: <158774605193.7423.573803007569761807.stgit@devnote2> References: <158774604073.7423.11492815214537711118.stgit@devnote2> <158774605193.7423.573803007569761807.stgit@devnote2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 25 Apr 2020 01:34:12 +0900 Masami Hiramatsu wrote: > If there is a bootconfig data in the tail of initrd/initramfs, > initrd image sanity check caused an error while decompression > stage as follows. > > [ 0.883882] Unpacking initramfs... > [ 2.696429] Initramfs unpacking failed: invalid magic at start of compressed archive > > This error will be ignored if CONFIG_BLK_DEV_RAM=n, > but CONFIG_BLK_DEV_RAM=y the kernel failed to mount rootfs > and causes a panic. > > To fix this issue, shrink down the initrd_end for removing > tailing bootconfig data while boot the kernel. > > Fixes: 7684b8582c24 ("bootconfig: Load boot config from the tail of initrd") > Signed-off-by: Masami Hiramatsu > Cc: stable@vger.kernel.org > --- > init/main.c | 62 +++++++++++++++++++++++++++++++++++++++++++---------------- > 1 file changed, 45 insertions(+), 17 deletions(-) > > A build with $ make allnoconfig Produces this: MODPOST vmlinux.o MODINFO modules.builtin.modinfo GEN modules.builtin LD vmlinux ld: init/main.o: in function `start_kernel': main.c:(.init.text+0x37f): undefined reference to `initrd_end' ld: main.c:(.init.text+0x3a7): undefined reference to `initrd_start' ld: main.c:(.init.text+0x3ae): undefined reference to `initrd_end' make[1]: *** [/work/git/linux-trace.git/Makefile:1106: vmlinux] Error 1 -- Steve