From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>,
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'
Date: Thu, 18 Feb 2021 18:53:26 -0800 [thread overview]
Message-ID: <3ca0aa87-ca83-8024-4067-c2382a360db9@linux.microsoft.com> (raw)
In-Reply-To: <87k0r4yi4s.fsf@manicouagan.localdomain>
On 2/18/21 5:13 PM, Thiago Jung Bauermann wrote:
>
> Lakshmi Ramasubramanian <nramas@linux.microsoft.com> 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 <nramas@linux.microsoft.com>
>>>> Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function")
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>> ---
>>>> 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.
I enabled CONFIG_OF_KEXEC for s390. With my patch applied,
CONFIG_OF_KEXEC is removed. So I think the robot enabling this config
would not be a problem.
>
> 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.
>
I think this is a good idea - a new CONFIG_HAVE_KIMAGE_ARCH, which will
be selected by arm64 and ppc for now. I tried this, and it fixes the
build issue.
Although, the name for the new config can be misleading since PARISC,
for instance, also defines "struct kimage_arch". Perhaps,
CONFIG_HAVE_ELF_KIMAGE_ARCH since of_kexec_alloc_and_setup_fdt() is
accessing ELF specific fields in "struct kimage_arch"?
Rob/Mimi - please let us know which approach you think is better.
thanks,
-lakshmi
WARNING: multiple messages have this Message-ID (diff)
From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: sashal@kernel.org, robh@kernel.org, sfr@canb.auug.org.au,
gregkh@linuxfoundation.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Mimi Zohar <zohar@linux.ibm.com>,
takahiro.akashi@linaro.org, devicetree@vger.kernel.org,
james.morse@arm.com, catalin.marinas@arm.com, joe@perches.com,
linux-integrity@vger.kernel.org, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'
Date: Thu, 18 Feb 2021 18:53:26 -0800 [thread overview]
Message-ID: <3ca0aa87-ca83-8024-4067-c2382a360db9@linux.microsoft.com> (raw)
In-Reply-To: <87k0r4yi4s.fsf@manicouagan.localdomain>
On 2/18/21 5:13 PM, Thiago Jung Bauermann wrote:
>
> Lakshmi Ramasubramanian <nramas@linux.microsoft.com> 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 <nramas@linux.microsoft.com>
>>>> Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function")
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>> ---
>>>> 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.
I enabled CONFIG_OF_KEXEC for s390. With my patch applied,
CONFIG_OF_KEXEC is removed. So I think the robot enabling this config
would not be a problem.
>
> 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.
>
I think this is a good idea - a new CONFIG_HAVE_KIMAGE_ARCH, which will
be selected by arm64 and ppc for now. I tried this, and it fixes the
build issue.
Although, the name for the new config can be misleading since PARISC,
for instance, also defines "struct kimage_arch". Perhaps,
CONFIG_HAVE_ELF_KIMAGE_ARCH since of_kexec_alloc_and_setup_fdt() is
accessing ELF specific fields in "struct kimage_arch"?
Rob/Mimi - please let us know which approach you think is better.
thanks,
-lakshmi
WARNING: multiple messages have this Message-ID (diff)
From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: sashal@kernel.org, robh@kernel.org, benh@kernel.crashing.org,
sfr@canb.auug.org.au, gregkh@linuxfoundation.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Mimi Zohar <zohar@linux.ibm.com>,
takahiro.akashi@linaro.org, devicetree@vger.kernel.org,
james.morse@arm.com, mpe@ellerman.id.au, catalin.marinas@arm.com,
joe@perches.com, linux-integrity@vger.kernel.org,
will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] of: error: 'const struct kimage' has no member named 'arch'
Date: Thu, 18 Feb 2021 18:53:26 -0800 [thread overview]
Message-ID: <3ca0aa87-ca83-8024-4067-c2382a360db9@linux.microsoft.com> (raw)
In-Reply-To: <87k0r4yi4s.fsf@manicouagan.localdomain>
On 2/18/21 5:13 PM, Thiago Jung Bauermann wrote:
>
> Lakshmi Ramasubramanian <nramas@linux.microsoft.com> 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 <nramas@linux.microsoft.com>
>>>> Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup function")
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>> ---
>>>> 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.
I enabled CONFIG_OF_KEXEC for s390. With my patch applied,
CONFIG_OF_KEXEC is removed. So I think the robot enabling this config
would not be a problem.
>
> 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.
>
I think this is a good idea - a new CONFIG_HAVE_KIMAGE_ARCH, which will
be selected by arm64 and ppc for now. I tried this, and it fixes the
build issue.
Although, the name for the new config can be misleading since PARISC,
for instance, also defines "struct kimage_arch". Perhaps,
CONFIG_HAVE_ELF_KIMAGE_ARCH since of_kexec_alloc_and_setup_fdt() is
accessing ELF specific fields in "struct kimage_arch"?
Rob/Mimi - please let us know which approach you think is better.
thanks,
-lakshmi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-19 2:54 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 22:33 [PATCH] of: error: 'const struct kimage' has no member named 'arch' Lakshmi Ramasubramanian
2021-02-18 22:33 ` Lakshmi Ramasubramanian
2021-02-18 22:33 ` Lakshmi Ramasubramanian
2021-02-19 0:07 ` Mimi Zohar
2021-02-19 0:07 ` Mimi Zohar
2021-02-19 0:07 ` Mimi Zohar
2021-02-19 0:57 ` Lakshmi Ramasubramanian
2021-02-19 0:57 ` Lakshmi Ramasubramanian
2021-02-19 0:57 ` Lakshmi Ramasubramanian
2021-02-19 1:13 ` Thiago Jung Bauermann
2021-02-19 1:13 ` Thiago Jung Bauermann
2021-02-19 1:13 ` Thiago Jung Bauermann
2021-02-19 2:53 ` Lakshmi Ramasubramanian [this message]
2021-02-19 2:53 ` Lakshmi Ramasubramanian
2021-02-19 2:53 ` Lakshmi Ramasubramanian
2021-02-19 14:08 ` Thiago Jung Bauermann
2021-02-19 14:08 ` Thiago Jung Bauermann
2021-02-19 14:08 ` Thiago Jung Bauermann
2021-02-19 14:41 ` Mimi Zohar
2021-02-19 14:41 ` Mimi Zohar
2021-02-19 14:41 ` Mimi Zohar
2021-02-19 14:16 ` Rob Herring
2021-02-19 14:16 ` Rob Herring
2021-02-19 14:16 ` Rob Herring
2021-02-19 16:56 ` Lakshmi Ramasubramanian
2021-02-19 16:56 ` Lakshmi Ramasubramanian
2021-02-19 16:56 ` Lakshmi Ramasubramanian
2021-02-19 17:43 ` Rob Herring
2021-02-19 17:43 ` Rob Herring
2021-02-19 17:43 ` Rob Herring
2021-02-19 18:03 ` Mimi Zohar
2021-02-19 18:03 ` Mimi Zohar
2021-02-19 18:03 ` Mimi Zohar
2021-02-19 18:09 ` Thiago Jung Bauermann
2021-02-19 18:09 ` Thiago Jung Bauermann
2021-02-19 18:09 ` Thiago Jung Bauermann
2021-02-19 18:43 ` Lakshmi Ramasubramanian
2021-02-19 18:43 ` Lakshmi Ramasubramanian
2021-02-19 18:43 ` Lakshmi Ramasubramanian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ca0aa87-ca83-8024-4067-c2382a360db9@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=bauerman@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=robh@kernel.org \
--cc=sashal@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=takahiro.akashi@linaro.org \
--cc=will@kernel.org \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.