From patchwork Tue Nov 6 11:37:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 10670151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3888A15A6 for ; Tue, 6 Nov 2018 11:37:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24ACB2A26B for ; Tue, 6 Nov 2018 11:37:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 141592A267; Tue, 6 Nov 2018 11:37:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3A782A267 for ; Tue, 6 Nov 2018 11:37:56 +0000 (UTC) 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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ffsr0e8ELDj9P8crRJ5F5oHKuPffjI8pGCdjY80ZQXE=; b=hBbX1+qsdiy7nN QNpJbvxxYNASjY1V8Z+ELab0A8eJzBBzHmzfiDqa3GsOXoGRKAXxWw7BXPkvLj/9HARIoZlFfnz7a LMjTw8YO/XSGjTny9Q1XQOfVTSP5R8NbuJMAqXtVl1UYYjIpf2hIS2Egy1SEGgJtlAnLqyxnAWWsz Rqe1DtTzkNWSfe+oFgxKalY5gT7izvpRM8/fuhdI1RVyCrYo0CiXx0wjFlIf4x84TO3M1f9cYARaq Cx48pDaESTpq32cxcaFu33lree9VvpG+HGVWR0zIwpB6+pafIsvx0IpN5uXCp8q5v8z8s+nBdCd3D idGJI/uc5pNE6GkbA/cA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJzgA-0007ei-Rx; Tue, 06 Nov 2018 11:37:54 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJzg8-0007bf-0E for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2018 11:37:53 +0000 Received: by mail-wr1-x443.google.com with SMTP id u9-v6so2746599wrr.0 for ; Tue, 06 Nov 2018 03:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rMpiQe5n2zXwdJYom5or3Q3ewTzVgcMoh25h27Drxgs=; b=h6+kLkT7/1Ye7P/7EBgzczd1QbvMbQvjs8XNAqcEgS+TV/vBWYW0diRSff87zy48k+ zhg6T93XYXEVhLEMXShTNZOMRsODE2dpVq6j5s+Qt9VSL8/TTzVNYcQt8yJYML679kIt fXLD++j2i8HurU3w/Wmt2HfEbd2ux7Xdc/cCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rMpiQe5n2zXwdJYom5or3Q3ewTzVgcMoh25h27Drxgs=; b=FPgpcirHIfVWyzcldqol0JL8bT6+9d+sAFvahCEU0rIUP+yhLCFSJupZBC571KBiVd LBf7j9ifPUuJQs6oDYix99YpAcvEVofwahKWKIkZgvFOHPcu+TMnCqAcLFZD1tUh8f8V M+7PrGqm7fafAA2tm5eAL1RmFssh88UuEhnIwNDqBykyx28vXlhHKJllJ3d8B4QOgZx0 ibhE8viOMfcvUaEa7wk6UVPCqay4BpVDlOCap69V4/eMN2QkTBIlUQs5ebyNoY4vpQwW lwf1PKQtxnFTFNmPtC7huoAvKEvu0zPijS+OLXW6phVEb5e0EyRQOE3pn9+cbuWQGhud v0DA== X-Gm-Message-State: AGRZ1gI8hEnGcD0UawZMf1Jj7YTj4JAFtyX4tu5lfH/PZw/KuuK5h3KS WjuizhYdjkENqlZqyejNIUbyFfFKSPI= X-Google-Smtp-Source: AJdET5cN/0ctwgz139jrTBFCcC/dhU3/4m/c/da+k1Eb1ci1UjoTjN0FftBbFqvP3orWnIl+eKYSHw== X-Received: by 2002:a5d:408c:: with SMTP id o12-v6mr13797187wrp.90.1541504259980; Tue, 06 Nov 2018 03:37:39 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:3117:2b29:5ef7:a9e5]) by smtp.gmail.com with ESMTPSA id t187-v6sm1431529wmt.45.2018.11.06.03.37.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 03:37:38 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/4] arm/efi: fix memblock reallocation crash due to persistent reservations Date: Tue, 6 Nov 2018 12:37:28 +0100 Message-Id: <20181106113732.16351-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_033752_052359_DE6D0D21 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-efi@vger.kernel.org, Ard Biesheuvel , marc.zyngier@arm.com, bhsharma@redhat.com, will.deacon@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series addresses the kexec/kdump crash on arm64 system with many CPUs that was reported by Bhupesh. Patches #1 and #2 fix the actual crash. Patches #3 and #4 optimize the EFI persistent memreserve infrastructure so that fewer memblock reservations are required. Ard Biesheuvel (4): arm64: memblock: don't permit memblock resizing until linear mapping is up efi/arm: defer persistent reservations until after paging_init() efi: permit multiple entries in persistent memreserve data structure efi: reduce the amount of memblock reservations for persistent allocations arch/arm/kernel/setup.c | 1 + arch/arm64/kernel/setup.c | 1 + arch/arm64/mm/init.c | 2 - arch/arm64/mm/mmu.c | 2 + drivers/firmware/efi/efi.c | 59 ++++++++++++++------ drivers/firmware/efi/libstub/arm-stub.c | 2 +- include/linux/efi.h | 23 +++++++- 7 files changed, 68 insertions(+), 22 deletions(-) Tested-by: Marc Zyngier Acked-by: Will Deacon