From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8439DC2BB85 for ; Sun, 12 Apr 2020 20:38:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 48A08206C3 for ; Sun, 12 Apr 2020 20:38:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ROv6afYR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48A08206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C1A688E00ED; Sun, 12 Apr 2020 16:38:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BCA8A8E00D0; Sun, 12 Apr 2020 16:38:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE0328E00ED; Sun, 12 Apr 2020 16:38:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id 9131C8E00D0 for ; Sun, 12 Apr 2020 16:38:13 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 48E49824556B for ; Sun, 12 Apr 2020 20:38:13 +0000 (UTC) X-FDA: 76700365266.03.game77_81f358b9bd32b X-HE-Tag: game77_81f358b9bd32b X-Filterd-Recvd-Size: 5359 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Sun, 12 Apr 2020 20:38:12 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id ca21so7332027edb.7 for ; Sun, 12 Apr 2020 13:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wa1SO5Y4XDQuq8silK209UBn0y1wsner9tHYDWtaFiM=; b=ROv6afYR/x28UGaGfNFGr5Yvqz8lUeh3jEuJ0jVR+y/ij3iXffQKNnJubd1SNgXCSv i6DNJ7fgP7KJDcRhcu6v3Nm4zB3bZt0tYadE4ojb15hhFhiyAcIOL1Ls6rFOYOO89Z/h bg0SNjGFL4iamcklP68aL1t3juXyMjLt+42TtwC2LAbLaZjl4uTliLdRWqX9sM54gaVx 1BWIU/RFC/wOltz9sdIW/09VBeb7YbND3IXR5tNGIvitPmChOwGrxN35d4Hxs99ci/tK xRRxXuPfsWu4hINrhhuuotZ1ZawyKbs1U7wuAA3W61+uIS9yc4lIU16cCeRE+84Bty8F 33Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wa1SO5Y4XDQuq8silK209UBn0y1wsner9tHYDWtaFiM=; b=nzxUDC1bpmF8wuQrYrqJ6XTocSYTwJ5cYYAHAGsmh+VNOVBoZRXnSzqNdSHpWB7NnD B8zenkXSHwc3n8j/jkMufh/KZuBOGsXOFgFMX9Io3FVqyUZCzxQaFILMLmytF0IpsUaB ZP14WSyiwnn9TSc6Hf2Mq/peP6TzvelEi/seSkHez+x47h1Mga6pST9hTMsiDdAxcwPW lWtxwn8WGNSgCxClPohn+DSxUGVnQl8mnDppBj6VqAIAI/y11+ZvtReYnp9JTOSsRD1k 1Xw4RmeCFoh9W4MUMhV8xbhJafwueG5lt6yWyhbA0WNQoQrIa8kohKiHt7fOsi7U+loF aPxQ== X-Gm-Message-State: AGi0PuZPeUYhCFwfh7MOPLjIyf6fBS3ga7gVeAT41vccgk6DwnRpU5cL 4A2ZVRp1GZbPjQ1PwzQf8DvLA3T92I3HcCc/Zs4= X-Google-Smtp-Source: APiQypJGMBeffCVdcFVnN9fRT6uxwApkPdfG285+gWq3FbH/rXCHsj/Y8rQW4Y8qptY48Zvi0ojWwjhJLJkhWzYLTKY= X-Received: by 2002:a17:906:2458:: with SMTP id a24mr11998004ejb.239.1586723891740; Sun, 12 Apr 2020 13:38:11 -0700 (PDT) MIME-Version: 1.0 References: <72672e2c-a57a-8df9-0cff-8035cbce7740@redhat.com> <34274b02-60ba-eb78-eacd-6dc1146ed3cd@arm.com> <80e4d1d7-f493-3f66-f700-86f18002d692@redhat.com> <20200410121013.03b609fd572504c03a666f4a@linux-foundation.org> <20200411034414.GH2129@MiWiFi-R3L-srv> <20200411093009.GH25745@shell.armlinux.org.uk> <20200412053507.GA4247@MiWiFi-R3L-srv> <20200412080836.GM25745@shell.armlinux.org.uk> <87wo6klbw0.fsf@x220.int.ebiederm.org> In-Reply-To: <87wo6klbw0.fsf@x220.int.ebiederm.org> From: Bhupesh SHARMA Date: Mon, 13 Apr 2020 02:07:58 +0530 Message-ID: Subject: Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image To: "Eric W. Biederman" Cc: Russell King - ARM Linux admin , Baoquan He , David Hildenbrand , Catalin Marinas , Bhupesh Sharma , Anshuman Khandual , kexec@lists.infradead.org, linux-mm@kvack.org, James Morse , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Apr 13, 2020 at 1:26 AM Eric W. Biederman wrote: > > > The only benefit of kexec_file_load is that it is simple enough from a > kernel perspective that signatures can be checked. > > kexec_load in every other respect is the more capable and functional > interface. It makes no sense to get rid of it. > > It does make sense to reload with a loaded kernel on memory hotplug. > That is simple and easy. If we are going to handle something in the > kernel it should simple an automated unloading of the kernel on memory > hotplug. > > > I think it would be irresponsible to deprecate kexec_load on any > platform. > > I also suspect that kexec_file_load could be taught to copy the dtb > on arm32 if someone wants to deal with signatures. > > We definitely can not even think of deprecating kexec_load until > architecture that supports it also supports kexec_file_load and everyone > is happy with that interface. That is Linus's no regression rule. TBH, I have seen several active users of kexec_load on arm32 environments and we have been trying to help them with kexec issues on arm32 in recent past as well. So, I agree with Eric's view that probably deprecating this in favour of kexec_file_load will break these existing environment. I tried to do some work at the start of this year to add kexec_file_load support for arm32 in my spare cycles, but I gave up as the arm32 hardware had a broken firmware and couldn't boot latest upstream kernel. May be I try to find some spare cycles in the coming days to do it. But I think since kexec_load is an important interface on these arm32 boards for supporting existing kexec-based bootloaders, we should continue supporting the same until kexec_file_load is supported/mature enough for arm32. Thanks, Bhupesh