Re: [PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-11-01 Thread liaochang (A)
在 2021/11/2 5:15, Eric W. Biederman 写道: > Björn Töpel writes: > >> On Sat, 30 Oct 2021 at 05:51, Eric W. Biederman >> wrote: >>> >>> Liao Chang writes: >>> The pointer to buffer loading kernel binaries is in kernel space for kexec_fil mode, When copy_from_user copies data from

Re: [PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-11-01 Thread Eric W. Biederman
Björn Töpel writes: > On Sat, 30 Oct 2021 at 05:51, Eric W. Biederman wrote: >> >> Liao Chang writes: >> >> > The pointer to buffer loading kernel binaries is in kernel space for >> > kexec_fil mode, When copy_from_user copies data from pointer to a block >> > of memory, it checkes that the

Re: [PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-10-31 Thread Björn Töpel
On Sat, 30 Oct 2021 at 05:51, Eric W. Biederman wrote: > > Liao Chang writes: > > > The pointer to buffer loading kernel binaries is in kernel space for > > kexec_fil mode, When copy_from_user copies data from pointer to a block > > of memory, it checkes that the pointer is in the user space

Re: [PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-10-29 Thread Eric W. Biederman
Liao Chang writes: > The pointer to buffer loading kernel binaries is in kernel space for > kexec_fil mode, When copy_from_user copies data from pointer to a block > of memory, it checkes that the pointer is in the user space range, on > RISCV-V that is: > > static inline bool

[PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-10-29 Thread Liao Chang
The pointer to buffer loading kernel binaries is in kernel space for kexec_fil mode, When copy_from_user copies data from pointer to a block of memory, it checkes that the pointer is in the user space range, on RISCV-V that is: static inline bool __access_ok(unsigned long addr, unsigned long