All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: fix arm kexec failure for __NR_kexec_file_load
@ 2019-09-20 10:14 quanyang.wang
  2019-09-20 10:32 ` ✗ patchtest: failure for " Patchwork
  2019-09-20 12:05 ` [PATCH] " Ross Burton
  0 siblings, 2 replies; 3+ messages in thread
From: quanyang.wang @ 2019-09-20 10:14 UTC (permalink / raw)
  To: openembedded-core

From: Wang Quanyang <quanyang.wang@windriver.com>

Once use kexec in arm arch, it will throw out the error info as below:

Could not find a free area of memory of 0xc78e744 bytes... 

This is because that kexec use kexec_file_load to load image by default
but arm doesn't support it. So add this patch to avoid use kexec_file_load
in arm platforms.

Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
---
 ...ndefine-__NR_kexec_file_load-for-arm.patch | 37 +++++++++++++++++++
 .../kexec/kexec-tools_2.0.19.bb               |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch

diff --git a/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
new file mode 100644
index 0000000000..1b11363191
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
@@ -0,0 +1,37 @@
+From b54816eff272324320c490d62dc36b27d2838732 Mon Sep 17 00:00:00 2001
+From: Quanyang Wang <quanyang.wang@windriver.com>
+Date: Mon, 16 Sep 2019 10:49:05 +0800
+Subject: [PATCH] kexec/arm: undefine __NR_kexec_file_load for arm
+
+In the kernel upstream commit 4ab65ba7a5cb
+("ARM: add kexec_file_load system call number"),
+__NR_kexec_file_load for arm has been defined to be 401.
+This results that even if kexec_file_load isn't implemented
+for arm but the function is_kexec_file_load_implemented()
+will still return true. So undef __NR_kexec_file_load for
+arm architecture.
+
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+---
+ kexec/kexec-syscall.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index dac1c1f..92d51d3 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -56,6 +56,10 @@
+ #endif
+ #endif /*ifndef __NR_kexec_load*/
+ 
++#ifdef __arm__
++#undef __NR_kexec_file_load
++#endif
++
+ #ifndef __NR_kexec_file_load
+ 
+ #ifdef __x86_64__
+-- 
+2.17.1
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
index 3439899070..c3f74359f1 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
@@ -18,6 +18,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
     file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
     file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \
     file://0005-Disable-PIE-during-link.patch \
+    file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
 "
 
 SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
-- 
2.22.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for kexec-tools: fix arm kexec failure for __NR_kexec_file_load
  2019-09-20 10:14 [PATCH] kexec-tools: fix arm kexec failure for __NR_kexec_file_load quanyang.wang
@ 2019-09-20 10:32 ` Patchwork
  2019-09-20 12:05 ` [PATCH] " Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-09-20 10:32 UTC (permalink / raw)
  To: quanyang.wang; +Cc: openembedded-core

== Series Details ==

Series: kexec-tools: fix arm kexec failure for __NR_kexec_file_load
Revision: 1
URL   : https://patchwork.openembedded.org/series/20078/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kexec-tools: fix arm kexec failure for __NR_kexec_file_load
  2019-09-20 10:14 [PATCH] kexec-tools: fix arm kexec failure for __NR_kexec_file_load quanyang.wang
  2019-09-20 10:32 ` ✗ patchtest: failure for " Patchwork
@ 2019-09-20 12:05 ` Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2019-09-20 12:05 UTC (permalink / raw)
  To: openembedded-core

Remember to add the Upstream-Status:

https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/kexec/kexec-syscall.h?id=b54816eff272324320c490d62dc36b27d2838732

Ross

On 20/09/2019 11:14, quanyang.wang@windriver.com wrote:
> From: Wang Quanyang <quanyang.wang@windriver.com>
> 
> Once use kexec in arm arch, it will throw out the error info as below:
> 
> Could not find a free area of memory of 0xc78e744 bytes...
> 
> This is because that kexec use kexec_file_load to load image by default
> but arm doesn't support it. So add this patch to avoid use kexec_file_load
> in arm platforms.
> 
> Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
> ---
>   ...ndefine-__NR_kexec_file_load-for-arm.patch | 37 +++++++++++++++++++
>   .../kexec/kexec-tools_2.0.19.bb               |  1 +
>   2 files changed, 38 insertions(+)
>   create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
> 
> diff --git a/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
> new file mode 100644
> index 0000000000..1b11363191
> --- /dev/null
> +++ b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
> @@ -0,0 +1,37 @@
> +From b54816eff272324320c490d62dc36b27d2838732 Mon Sep 17 00:00:00 2001
> +From: Quanyang Wang <quanyang.wang@windriver.com>
> +Date: Mon, 16 Sep 2019 10:49:05 +0800
> +Subject: [PATCH] kexec/arm: undefine __NR_kexec_file_load for arm
> +
> +In the kernel upstream commit 4ab65ba7a5cb
> +("ARM: add kexec_file_load system call number"),
> +__NR_kexec_file_load for arm has been defined to be 401.
> +This results that even if kexec_file_load isn't implemented
> +for arm but the function is_kexec_file_load_implemented()
> +will still return true. So undef __NR_kexec_file_load for
> +arm architecture.
> +
> +Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
> +Signed-off-by: Simon Horman <horms@verge.net.au>
> +---
> + kexec/kexec-syscall.h | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
> +index dac1c1f..92d51d3 100644
> +--- a/kexec/kexec-syscall.h
> ++++ b/kexec/kexec-syscall.h
> +@@ -56,6 +56,10 @@
> + #endif
> + #endif /*ifndef __NR_kexec_load*/
> +
> ++#ifdef __arm__
> ++#undef __NR_kexec_file_load
> ++#endif
> ++
> + #ifndef __NR_kexec_file_load
> +
> + #ifdef __x86_64__
> +--
> +2.17.1
> +
> diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> index 3439899070..c3f74359f1 100644
> --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
> @@ -18,6 +18,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
>       file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
>       file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \
>       file://0005-Disable-PIE-during-link.patch \
> +    file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
>   "
>   
>   SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-20 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 10:14 [PATCH] kexec-tools: fix arm kexec failure for __NR_kexec_file_load quanyang.wang
2019-09-20 10:32 ` ✗ patchtest: failure for " Patchwork
2019-09-20 12:05 ` [PATCH] " Ross Burton

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.