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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 7BC7FC2BA19 for ; Tue, 14 Apr 2020 09:38:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3CE6B20644 for ; Tue, 14 Apr 2020 09:38:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g0AOe4/k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CE6B20644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E26828E0003; Tue, 14 Apr 2020 05:38:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DAF0B8E0001; Tue, 14 Apr 2020 05:38:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C504C8E0003; Tue, 14 Apr 2020 05:38:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id A63DA8E0001 for ; Tue, 14 Apr 2020 05:38:28 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4D06B180ACF84 for ; Tue, 14 Apr 2020 09:38:28 +0000 (UTC) X-FDA: 76705960296.22.lace31_fb5a1fe50a43 X-HE-Tag: lace31_fb5a1fe50a43 X-Filterd-Recvd-Size: 4271 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Apr 2020 09:38:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586857107; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lvhqC0dRP09rVWyXtfxcbLLHJ6kqkkrA4CUn4bAErBo=; b=g0AOe4/kTx96U1JaRxBDy0BxOY4/8CTsEyiNDvUCJ8GbPR0ceou7e/OHYrCgUnWFQ8TMGb IxGV/k0k5qodxViArmTEkF2OH449dFeMjkpJl8SYtZkATvunP+FSw/5+vn4gThakxE2Ec+ J9R+HnPQzxNJMXtLx5H7rvy6hJiDyvI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-384-No530O1hMaiQKW0OPwylRA-1; Tue, 14 Apr 2020 05:38:23 -0400 X-MC-Unique: No530O1hMaiQKW0OPwylRA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 957D98018A2; Tue, 14 Apr 2020 09:38:21 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-221.pek2.redhat.com [10.72.12.221]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7429210013A1; Tue, 14 Apr 2020 09:38:14 +0000 (UTC) Date: Tue, 14 Apr 2020 17:38:09 +0800 From: Dave Young To: "Eric W. Biederman" Cc: Baoquan He , David Hildenbrand , Catalin Marinas , Bhupesh Sharma , Anshuman Khandual , kexec@lists.infradead.org, Russell King - ARM Linux admin , linux-mm@kvack.org, James Morse , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image Message-ID: <20200414093809.GA43901@dhcp-128-65.nay.redhat.com> References: <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> <20200413023701.GA20265@MiWiFi-R3L-srv> <871rorjzmc.fsf@x220.int.ebiederm.org> <20200414091617.GA43656@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 In-Reply-To: <20200414091617.GA43656@dhcp-128-65.nay.redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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: > We do not remove kexec_load at all, it is indeed helpful in many cases > as all agreed. But if we have a bug reported for both we may fix > kexec_file_load first because it is usually easier, also do not need to > worry about too much about old kernel and new kernel compatibility. >=20 > For example the recent breakage we found in efi path, kexec_file_load > just work after the efi cleanup, but kexec_load depends on the ABI we > added, so we must fix it as below: > https://lore.kernel.org/linux-efi/20200410135644.GB6772@dhcp-128-65.nay.r= edhat.com/=20 Also, we have some specific sysfs files exported for kexec-tools use /sys/firmware/efi/runtime-map/* and a few other table addresses: fw_vendor runtime and config_table under /sys/firmware/efi That is only used by userspace kexec_tools for kexec_load, now the runtime field is useless because of Ard's cleanup in efi code, but we have to keep it there, older kexec-tools will need it. In this case kexec_file_load do not need those hacks at all. So in the future if we have to invent some kernel/userspace abi only for kexec_load we should be careful and maybe reject if no strong reason.=20 Thanks Dave