Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7672878pxb; Thu, 18 Feb 2021 17:17:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDsmQJ/0uJu53fGRQdMtdLd7cQ6TRmUpCaMuIGBRHSydnWcEVfa1ImF4qaB3L/Yzj8L1VL X-Received: by 2002:a17:907:933:: with SMTP id au19mr6501871ejc.51.1613697472686; Thu, 18 Feb 2021 17:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613697472; cv=none; d=google.com; s=arc-20160816; b=L/CCbp/oKYov1Icx90Fu8JnoYvhGl+Mwxk++gwUDVfjMKAsbzPQ7D+0J3HUWTEUqVr UmRdE8SjQt1/+gyjoeR/long+5emr2zbq6iiRha0q+KeAA/ZoR50EmFWvXnUkfUhlN44 LKT7ACxlgqliGsWniG+vK8WuEUmJyyDwTkhYRKYeF7tW2xaiesmPz5EUZNH13gHdVEBP f6euRS89dDtDPfn0VmE5VtlNiUzPVTIJP1j08VjTVSygmfVAefmTQAB5wqI0iX5qkd8p 2eAwgIUEUsjrpiSFxx4YjGcnZTSp9sxIs4Zm5U0kDwON5+HmmKINXZPUBuHjhhGS0j7Q tNlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:user-agent:references:dkim-signature; bh=Ol+KgWWKRtwuv1OC4+AQN+FF1AU19KJg+Ck4dmIKSDI=; b=0G7GmSBXIAOVrcvj2WQiRs3G0uvHkLIehgw/CD10fbfblVYeTRcuIO6H1VXnBC3VKr 5X9bDGiVSnIQ2DwV70goXpelSWSrAM1T1CHH4IoA3nCE7x/ldouvaLPYNT0/5iZgVsso pjQLtO0SA4jnnx/+/sxijS2cPk1hBiRZfxUqD6dgpLvvnOQflrqggY+Lx+cYO/koH7Ur Gu+pVp2xA7C0DBJbCACJkS5i8dZ8T7UsSgJoSCs0tVyxHJt34aPwzfAcdQEbGQtjc4Wy atrbX4EYdouTX6ZjDcMhaGsxw7REX4xC+1DP8XauV+Wd2OubNpk/yvInZ/IiCEDtDRQX Cuqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=CAziGYVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si5143562edq.523.2021.02.18.17.17.27; Thu, 18 Feb 2021 17:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=CAziGYVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbhBSBOi (ORCPT + 99 others); Thu, 18 Feb 2021 20:14:38 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:15696 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhBSBOh (ORCPT ); Thu, 18 Feb 2021 20:14:37 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 11J13XDI040538; Thu, 18 Feb 2021 20:13:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=references : from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type; s=pp1; bh=Ol+KgWWKRtwuv1OC4+AQN+FF1AU19KJg+Ck4dmIKSDI=; b=CAziGYVZMQVAWN2zL50PRtEUhCVQt13b00RPNlJbvpkc0sg8U62G1edPNACJtZt/pmTd afJJeUDoIjyZkVoBlXgKo9WGKNPe1HIaBaYMoCl6UYFuv3bDK5yPPHwDPHnTFRJcJuIy 82szrLrwYleH2LLiCVGGjHhkjqvhsMD9NvNzGgggMt30dxy1Tk1HbD1MYXgFeLQh6qEf 5IjAJNZnlkiVA4Zcg13B2EhfWCILRwjQqZuktiBNptCUrOj3zSgJO07kVBLH6WRPQ1Fk FUm9JZGTryprxGMztZB6oWCkbYI7Q8D3Z4jN29Wv1GAfYvS4w9XkDZvgEFWaRj3qF1Cr yQ== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 36t2899qee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Feb 2021 20:13:31 -0500 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11J0vnvh015090; Fri, 19 Feb 2021 01:13:30 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma03wdc.us.ibm.com with ESMTP id 36p6d9j2d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 01:13:30 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11J1DTxe16056632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Feb 2021 01:13:29 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C267AC059; Fri, 19 Feb 2021 01:13:29 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6177CAC05B; Fri, 19 Feb 2021 01:13:25 +0000 (GMT) Received: from manicouagan.localdomain (unknown [9.85.141.141]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 19 Feb 2021 01:13:25 +0000 (GMT) References: <20210218223305.2044-1-nramas@linux.microsoft.com> <8b8c0b70-c7ab-33f3-b66c-9ea03388497b@linux.microsoft.com> User-agent: mu4e 1.4.10; emacs 27.1 From: Thiago Jung Bauermann To: Lakshmi Ramasubramanian Cc: Mimi Zohar , robh@kernel.org, takahiro.akashi@linaro.org, gregkh@linuxfoundation.org, will@kernel.org, joe@perches.com, catalin.marinas@arm.com, mpe@ellerman.id.au, sfr@canb.auug.org.au, james.morse@arm.com, sashal@kernel.org, benh@kernel.crashing.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch' In-reply-to: <8b8c0b70-c7ab-33f3-b66c-9ea03388497b@linux.microsoft.com> Date: Thu, 18 Feb 2021 22:13:23 -0300 Message-ID: <87k0r4yi4s.fsf@manicouagan.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-18_14:2021-02-18,2021-02-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 clxscore=1011 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190004 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lakshmi Ramasubramanian writes: > On 2/18/21 4:07 PM, Mimi Zohar wrote: > > Hi Mimi, > >> On Thu, 2021-02-18 at 14:33 -0800, Lakshmi Ramasubramanian wrote: >>> of_kexec_alloc_and_setup_fdt() defined in drivers/of/kexec.c builds >>> a new device tree object that includes architecture specific data >>> for kexec system call. This should be defined only if the architecture >>> being built defines kexec architecture structure "struct kimage_arch". >>> >>> Define a new boolean config OF_KEXEC that is enabled if >>> CONFIG_KEXEC_FILE and CONFIG_OF_FLATTREE are enabled, and >>> the architecture is arm64 or powerpc64. Build drivers/of/kexec.c >>> if CONFIG_OF_KEXEC is enabled. >>> >>> Signed-off-by: Lakshmi Ramasubramanian >>> Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function") >>> Reported-by: kernel test robot >>> --- >>> drivers/of/Kconfig | 6 ++++++ >>> drivers/of/Makefile | 7 +------ >>> 2 files changed, 7 insertions(+), 6 deletions(-) >>> >>> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >>> index 18450437d5d5..f2e8fa54862a 100644 >>> --- a/drivers/of/Kconfig >>> +++ b/drivers/of/Kconfig >>> @@ -100,4 +100,10 @@ config OF_DMA_DEFAULT_COHERENT >>> # arches should select this if DMA is coherent by default for OF devices >>> bool >>> +config OF_KEXEC >>> + bool >>> + depends on KEXEC_FILE >>> + depends on OF_FLATTREE >>> + default y if ARM64 || PPC64 >>> + >>> endif # OF >>> diff --git a/drivers/of/Makefile b/drivers/of/Makefile >>> index c13b982084a3..287579dd1695 100644 >>> --- a/drivers/of/Makefile >>> +++ b/drivers/of/Makefile >>> @@ -13,11 +13,6 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o >>> obj-$(CONFIG_OF_RESOLVE) += resolver.o >>> obj-$(CONFIG_OF_OVERLAY) += overlay.o >>> obj-$(CONFIG_OF_NUMA) += of_numa.o >>> - >>> -ifdef CONFIG_KEXEC_FILE >>> -ifdef CONFIG_OF_FLATTREE >>> -obj-y += kexec.o >>> -endif >>> -endif >>> +obj-$(CONFIG_OF_KEXEC) += kexec.o >>> obj-$(CONFIG_OF_UNITTEST) += unittest-data/ >> Is it possible to reuse CONFIG_HAVE_IMA_KEXEC here? >> > > For ppc64 CONFIG_HAVE_IMA_KEXEC is selected when CONFIG_KEXEC_FILE is enabled. > So I don't see a problem in reusing CONFIG_HAVE_IMA_KEXEC for ppc. > > But for arm64, CONFIG_HAVE_IMA_KEXEC is enabled in the final patch in the patch > set (the one for carrying forward IMA log across kexec for arm64). arm64 calls > of_kexec_alloc_and_setup_fdt() prior to enabling CONFIG_HAVE_IMA_KEXEC and hence > breaks the build for arm64. One problem is that I believe that this patch won't placate the robot, because IIUC it generates config files at random and this change still allows hppa and s390 to enable CONFIG_OF_KEXEC. Perhaps a new CONFIG_HAVE_KIMAGE_ARCH option? Not having that option would still allow building kexec.o, but would be used inside kexec.c to avoid accessing kimage.arch members. -- Thiago Jung Bauermann IBM Linux Technology Center