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,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 9AE98C54E8E for ; Tue, 12 May 2020 12:03:22 +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 70CCF20753 for ; Tue, 12 May 2020 12:03:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SByZs+kf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70CCF20753 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xmission.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:Subject:MIME-Version:Message-ID: In-Reply-To:Date:References:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=94s5yptZDLwSHb8kSi6BOe+TQhuGmotlHqv3KFXLxnA=; b=SByZs+kfsRKxQ1 edxuyRnZp9DwJSqXAZ6HzDPWzoihxXYtqwloliwVzxLhBokHVhzmZtJRY898uRLblvWzzRMLJxJE/ o9SPrJGJZqr1Y7Q9Hws942J47bINiMu9KTNi0ANFGitzKEZ49sc5d2w9B6sWqwcJjjYhBNLPUc7Mb g1NM8L0EdRF5XSW2DmDSUjXb8fvPErBXadBNY8JZ4TY9wP7sBX3zFjXGuVVliyMn/xz1TlTD772wz 8ThbuBGPotiRV+FRXeFhvBYLYnCIfHQjOJ2VSwabbXhWqMpJgOO+AM8YgzF8MI9Nju8oUmE3kttl/ YiVg5MqMD1eZVN5Hh9sg==; 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 1jYTd4-0001EF-2k; Tue, 12 May 2020 12:03:22 +0000 Received: from out02.mta.xmission.com ([166.70.13.232]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYTd1-0001DZ-52; Tue, 12 May 2020 12:03:20 +0000 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYTcs-0000tl-L0; Tue, 12 May 2020 06:03:10 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jYTcr-0007id-TX; Tue, 12 May 2020 06:03:10 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: David Hildenbrand References: <20200501165701.24587-1-james.morse@arm.com> <40b07632-b044-d1cd-96a2-81eec3da93e7@redhat.com> <8736892l92.fsf@x220.int.ebiederm.org> <87h7wmtna1.fsf@x220.int.ebiederm.org> <4d5f69b6-fdfd-a461-0ac9-6d05636508f1@redhat.com> Date: Tue, 12 May 2020 06:59:38 -0500 In-Reply-To: <4d5f69b6-fdfd-a461-0ac9-6d05636508f1@redhat.com> (David Hildenbrand's message of "Tue, 12 May 2020 09:45:16 +0200") Message-ID: <87sgg5s6s5.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-XM-SPF: eid=1jYTcr-0007id-TX; ; ; mid=<87sgg5s6s5.fsf@x220.int.ebiederm.org>; ; ; hst=in02.mta.xmission.com; ; ; ip=68.227.160.95; ; ; frm=ebiederm@xmission.com; ; ; spf=neutral X-XM-AID: U2FsdGVkX1/rnctvPahPVR1lDa2sHTDjDmoQMCyCAbM= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH] kexec: Discard loaded image on memory hotplug X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_050319_192332_393FA3D2 X-CRM114-Status: UNSURE ( 7.00 ) X-CRM114-Notice: Please train this message. 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 , kexec@lists.infradead.org, linux-mm@kvack.org, James Morse , Dave Young , 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 David Hildenbrand writes: >> >> Maybe we have enough information to fixup the loaded kexec image >> in the kexec_file_load case, we certainly don't in the ordinary >> kexec_load case. > > Yes, that's also what I mentioned in my reply to Baoquan. > >> >> For now I want to stick to the simplest thing we can do which is either >> blocking the memory hotplug operation (if that is possible) or >> dropping the loaded kexec image. > > Yes, the latter is the best for now. It's simple. > > I am suggesting to add explicit callbacks to > add_memory()/remove_memory(), and calling the invalidation from there - > because I see various issues with the memory notifier approach (racy, > false positives, never called if memory is not onlined). Ok so we are in agreement. Correct patch. Wrong trigger condition. Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel