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=-2.3 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,USER_AGENT_SANE_1 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 EFF24C7618B for ; Tue, 23 Jul 2019 13:32:20 +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 C2F4322543 for ; Tue, 23 Jul 2019 13:32:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pSzriLO1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2F4322543 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4DL6r/G12fySkrgs0vC6nILIWdBDg4slKskuvl/AP/c=; b=pSzriLO1Ip6ocSj6pbaKHZ8Y0 7a88CCIG/+eMr/54QYppyqDFhZJQP5AER5wPQdyKAN6PGeUDVtk1a+bBwZ0SPb0tvOHoSLBZ9Y0Xw dhsGScxxdyUeu71QpUQVif5Rtd9TcNuytmbkkeYjIth19Lb5315ptOgidrAD3OwckzkZQRLROJtlC 0YGhdTkWvBwrZwJCD5/ZjSGS5cEMwNUt065ap5f/96AZW4E7b8iHvDK+kp82Y/jjJ5eiLWJM0wnRg DJsDVwpbGLEd4HEZcQ6ymTDXYOOvYEVUfJ6DJE+YtGPEfHZLlj9S0VuALKorH4jsA4Fcn3Jck3jJc 1PUjGO6+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hputt-00017b-Ih; Tue, 23 Jul 2019 13:32:17 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hputo-00015c-0U; Tue, 23 Jul 2019 13:32:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 96EF228; Tue, 23 Jul 2019 06:32:11 -0700 (PDT) Received: from [10.1.197.57] (e110467-lin.cambridge.arm.com [10.1.197.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 927A93F71F; Tue, 23 Jul 2019 06:32:10 -0700 (PDT) Subject: Re: kexec on rk3399 To: Vicente Bergas References: <91c53121-9041-e8a2-97a2-5b5626e24c6e@arm.com> <8f71e7de-7eaf-58c7-6471-c8eb01e656ce@arm.com> From: Robin Murphy Message-ID: Date: Tue, 23 Jul 2019 14:32:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190723_063212_139317_97052DE9 X-CRM114-Status: GOOD ( 16.07 ) 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: Matthias Brugger , Heiko Stuebner , Marc Zyngier , Catalin Marinas , Will Deacon , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/07/2019 19:53, Vicente Bergas wrote: > On Monday, July 22, 2019 7:35:01 PM CEST, Robin Murphy wrote: >> On 22/07/2019 18:05, Vicente Bergas wrote: >>> On Monday, July 22, 2019 4:54:41 PM CEST, Marc Zyngier wrote: ... >> >> The obvious culprit would be DMA devices left running by the first >> kernel scribbling over the second kernel's memory before it's had the >> chance to reset them. Since boot-time memory allocation patterns tend >> to be relatively repeatable for a given platform and kernel >> configuration, "random" may well look a lot less random than you might >> expect, and it wouldn't be unheard of for e.g. the second kernel to >> mostly allocate its dentry cache from the same area the first kernel >> was mostly putting a network Rx descriptor ring. >> >> Robin. > > Here is another attempted test: on the first kernel disable: > # CONFIG_ZONE_DMA32 is not set > # CONFIG_DMADEVICES is not set > # CONFIG_PL330_DMA is not set > that is, all i could disable matching CONFIG_*DMA*=y, which is not much. > Still enabled are: > CONFIG_HAVE_DMA_CONTIGUOUS=y > CONFIG_DMA_SHARED_BUFFER=y > CONFIG_SCSI_DMA=y > CONFIG_IOMMU_DMA=y > CONFIG_HAS_DMA=y > CONFIG_NEED_SG_DMA_LENGTH=y > CONFIG_NEED_DMA_MAP_STATE=y > CONFIG_ARCH_DMA_ADDR_T_64BIT=y > CONFIG_DMA_DECLARE_COHERENT=y > CONFIG_ARCH_HAS_SETUP_DMA_OPS=y > CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y > CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y > CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y > CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y > CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y > CONFIG_ARCH_HAS_DMA_MMAP_PGPROT=y > CONFIG_DMA_REMAP=y > CONFIG_DMA_DIRECT_REMAP=y > > Then the second kernel still fails with d_lookup errors. Yeah, none of those configs are particularly relevant - I'm thinking more about the drivers for ethernet, wifi, USB, PCI devices, and any other peripherals which may be set up to make DMA accesses based on external stimuli and don't get shut down cleanly by a kexec. Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel