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 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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 62F70C2BB86 for ; Tue, 14 Apr 2020 09:38:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F16E920644 for ; Tue, 14 Apr 2020 09:38:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nSS3Mvhe"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="E+GXXy1u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F16E920644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XUKmY/S0bbrgd8Rd1BjUevrUi/aIa0D3pWsmzGgBosA=; b=nSS3Mvhey90nL3 sUJSUjnunXDzXg0PPlU5X8iuVsyJH17noF+WgXK2mVxIER0T6rDZrW5/aOrQI1I/M7X/CgchMVLOg /uz6Ss4qv0OUGRCQ7dU24rVL3MSzGCe+sSWb2ynem9fYSfO5xGSuZSGloBcQoGFMEw1le4CyJ7DiA R4HEPV3Y2JqsPGtMx1hvyDLd+C0qGb60oAlClwU+xV8nY9VyTeSk/V+FKLcwgbjf4ouNPZXDeuU7D K6JV3YLmLFjb5ftQKJHdFRcUsUq5YzPazGOYxbqqKJgX4fSfNHVIlf4l5JD3r/C0rC6vnjmev62Fp qFid9SIIEi+ZOGwAx8AQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOI1U-0002dA-TJ; Tue, 14 Apr 2020 09:38:28 +0000 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOI1S-0002bl-7b for linux-arm-kernel@lists.infradead.org; Tue, 14 Apr 2020 09:38:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586857105; 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=E+GXXy1uGjK1SxBFGOK/VSg77kTKPaylSVSr32as7nR20UFtTacVq2IDVqF6oJXRocwUjo c40jETdTL5HZU/1FGpGTR71bij62mHZ1vhgE7STOhABh2pmjcfJB1cBBt+sW07aaQ1k6oq FhDjD6hkpBRQVD/5GDDhDczbNevipD8= 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" 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-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200414_023826_346146_CF8B1E8D X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Baoquan He , Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , David Hildenbrand , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > 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. > > 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.redhat.com/ 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. Thanks Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from us-smtp-1.mimecast.com ([205.139.110.61] helo=us-smtp-delivery-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOI1S-0002bk-DQ for kexec@lists.infradead.org; Tue, 14 Apr 2020 09:38:27 +0000 Date: Tue, 14 Apr 2020 17:38:09 +0800 From: Dave Young 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> Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: "Eric W. Biederman" Cc: Baoquan He , Anshuman Khandual , Catalin Marinas , Bhupesh Sharma , David Hildenbrand , 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 > 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. > > 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.redhat.com/ 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. Thanks Dave _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec