Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3288944pxj; Tue, 1 Jun 2021 01:37:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5cShsHB+YuOF43eYfhRhsGCGfaFd8bVDLOcFwxB9dViUdJghwu5GYKgZcdIQZV9fbYmEY X-Received: by 2002:a17:906:c00f:: with SMTP id e15mr29717344ejz.458.1622536673915; Tue, 01 Jun 2021 01:37:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622536673; cv=none; d=google.com; s=arc-20160816; b=OjssUJZVtu0Q0hamoANsrh6HoVPbsLSJcMjlTV3Yw//ILxp88U9NuBa7rYXARANQhV 7fp5HZCR1GcQrz31Ocdx75Rio3MDZiMFHsKwxNyRtoAUw7rr0QCzN0wZ7WGtm5Rp8WL5 KllBm1hUZX1qu0qM+rPMel+XBRKTUi6Zigmjj/zycDteJkBotHBIi311UMC29ICLPi45 YNIQP8d1l35eAExUQqqQdECUVCkC4tDG5Et5un1pfEiPLnLyuF5z3eh/TiwgMXjW1au4 Skbwm0f77j4CEp9poMQ5POpR0ZXOVo9VJRg+PihXnayCyGSqagrpxxgv4gyEqpRpcZwA VNOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=NFalY5TPs9P7J7wz8wv1MAh9e7qZPG0E7rcmDHRwFkc=; b=B3rIw8NcteNco8CaW59arTywLMs/kZn2l3ZxB5CldUWYaCM0zssDRYHDN5ob8Nz+2s 3kdO/94FmRuaAj3xZMep6/D1KzmQQrh5//zolkUn3HRtaimRyJ4EnbZM74RmFI9C8iWJ Gmza3h7e5pasMW+C6oRAt/IX2hSNXB/omfr9EOe5Gpr7dz/h+KozJp+POCMHoly/mbJb mTMROmsQpMI+kPn3cRrupFJOsgPFplxpRFgdVwZPgbUI3M30clDZ2eTZuDDPfJUWtTlA GZCYG0BHh87hCgUR2Aa6NiBG07O4zoM4SzEtUg2pyotMIQm1U9uUimU9p97F+ibAovDZ UC3g== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si7356290ejs.333.2021.06.01.01.37.30; Tue, 01 Jun 2021 01:37:53 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233195AbhFAIiO (ORCPT + 99 others); Tue, 1 Jun 2021 04:38:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:38744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbhFAIiM (ORCPT ); Tue, 1 Jun 2021 04:38:12 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 B425761263; Tue, 1 Jun 2021 08:36:31 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lnzsz-004lms-I8; Tue, 01 Jun 2021 09:36:29 +0100 Date: Tue, 01 Jun 2021 09:36:27 +0100 Message-ID: <87y2bu0yno.wl-maz@kernel.org> From: Marc Zyngier To: Ard Biesheuvel Cc: kexec@lists.infradead.org, Linux ARM , Linux Kernel Mailing List , Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , Bhupesh SHARMA , AKASHI Takahiro , Dave Young , Andrew Morton , Moritz Fischer , Android Kernel Team , "# 3.4.x" Subject: Re: [PATCH v2 1/5] arm64: kexec_file: Forbid non-crash kernels In-Reply-To: References: <20210531095720.77469-1-maz@kernel.org> <20210531095720.77469-2-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: ardb@kernel.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, ebiederm@xmission.com, bhupesh.sharma@linaro.org, takahiro.akashi@linaro.org, dyoung@redhat.com, akpm@linux-foundation.org, mdf@kernel.org, kernel-team@android.com, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 May 2021 20:37:49 +0100, Ard Biesheuvel wrote: > > On Mon, 31 May 2021 at 11:57, Marc Zyngier wrote: > > > > It has been reported that kexec_file doesn't really work on arm64. > > It completely ignores any of the existing reservations, which results > > in the secondary kernel being loaded where the GICv3 LPI tables live, > > or even corrupting the ACPI tables. > > > > Since only crash kernels are imune to this as they use a reserved > > memory region, disable the non-crash kernel use case. Further > > patches will try and restore the functionality. > > > > Reported-by: Moritz Fischer > > Signed-off-by: Marc Zyngier > > Cc: stable@vger.kernel.org # 5.10 > > Acked-by: Ard Biesheuvel > > ... but do we really only need this in 5.10 and not earlier? We *do* need something in earlier kernel (as mentioned in the cover letter), but not this patch (arch_kexec_locate_mem_hole doesn't exist there, so there is nothing to override). I guess that completely disabling CONFIG_KEXEC_FILE on arm64 is the way to go for 5.4 and earlier, as I don't think there is any crash kernel support there. Thanks, M. -- Without deviation from the norm, progress is not possible.