2022-06-24 05:10:50

by Palmer Dabbelt

[permalink] [raw]
Subject: [PATCH v2 0/5] Support kexec_file on 32-bit RISC-V

This rolled itself back to the top of my inbox, so I figured I'd send it
again as Rob's review landed. IMO the security/integrity/ima/ change is
sufficiently trivial that it's fine to take it through the RISC-V tree
but I don't have an Review/Ack so I'll wait until this loops back again
to give the security/integrity/ folks a chance to chime in.

If this loops back to the top of my queue (which looks about a month
deep right now) without any comments then I'll put it in riscv/for-next.

Thanks!

Changes since v1
<https://lore.kernel.org/all/[email protected]/>
* Collected reviews for drivers/of/kexec.c.



2022-06-24 05:11:05

by Palmer Dabbelt

[permalink] [raw]
Subject: [PATCH v2 5/5] RISC-V: Allow kexec_file() on 32-bit platforms

With the build issues now sorted out we can enable kexec_file() on
32-bit platforms as well.

Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/riscv/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 898052ff743e..a246f2fe60c2 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -388,7 +388,6 @@ config KEXEC_FILE
select KEXEC_CORE
select KEXEC_ELF
select HAVE_IMA_KEXEC if IMA
- depends on 64BIT
help
This is new version of kexec system call. This system call is
file based and takes file descriptors as system call argument
--
2.34.1

2022-06-24 05:11:11

by Palmer Dabbelt

[permalink] [raw]
Subject: [PATCH v2 4/5] RISC-V: purgatory: Use XLEN-length loads to support rv32

This uses an explicit "ld" to load up target address, which dosn't work
on rv32. Convert it to a REG_L macro, like everywhere else.

Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/riscv/purgatory/entry.S | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/purgatory/entry.S b/arch/riscv/purgatory/entry.S
index 0194f4554130..71c50fef051c 100644
--- a/arch/riscv/purgatory/entry.S
+++ b/arch/riscv/purgatory/entry.S
@@ -8,6 +8,8 @@
*
*/

+#include <asm/asm.h>
+
.macro size, sym:req
.size \sym, . - \sym
.endm
@@ -26,7 +28,7 @@ purgatory_start:
/* Start new image. */
mv a0, s0
mv a1, s1
- ld a2, riscv_kernel_entry
+ REG_L a2, riscv_kernel_entry
jr a2

size purgatory_start
@@ -41,7 +43,7 @@ size purgatory_start

.globl riscv_kernel_entry
riscv_kernel_entry:
- .quad 0
+ REG_ASM 0
size riscv_kernel_entry

.end
--
2.34.1

2022-06-30 13:26:06

by Mimi Zohar

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] Support kexec_file on 32-bit RISC-V

Hi Palmer,

On Thu, 2022-06-23 at 21:48 -0700, Palmer Dabbelt wrote:
> This rolled itself back to the top of my inbox, so I figured I'd send it
> again as Rob's review landed. IMO the security/integrity/ima/ change is
> sufficiently trivial that it's fine to take it through the RISC-V tree
> but I don't have an Review/Ack so I'll wait until this loops back again
> to give the security/integrity/ folks a chance to chime in.
>
> If this loops back to the top of my queue (which looks about a month
> deep right now) without any comments then I'll put it in riscv/for-next.
>
> Thanks!
>
> Changes since v1
> <https://lore.kernel.org/all/[email protected]/>
> * Collected reviews for drivers/of/kexec.c.

Maybe better that you upstream the RISC-V changes. So far there aren't
any merge conflicts with this patchset, but a number of other kexec
patch sets will hopefully be upstreamed in the coming open window. I'd
appreciate if you could create a topic branch for the first two
patches.

thanks,

Mimi