Re: [RFC PATCH 4/5] arm64: mm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2021-12-03 Thread Catalin Marinas
On Fri, Dec 03, 2021 at 01:11:56PM +0800, Jisheng Zhang wrote: > Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" > by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to simplify the > code and increase compile coverage. > > Signed-off-by: Jisheng Zhang As long as it still c

Re: [RFC PATCH 5/5] arm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2021-12-03 Thread Emil Renner Berthing
Hi Jisheng, On Fri, 3 Dec 2021 at 06:22, Jisheng Zhang wrote: > Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" > by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to simplify the The patch looks fine, but I think you mean IS_ENABLED(CONFIG_KEXEC_CORE) here, not CONFIG_BLK

Re: [RFC PATCH 5/5] arm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2021-12-03 Thread Russell King (Oracle)
On Fri, Dec 03, 2021 at 01:11:57PM +0800, Jisheng Zhang wrote: > Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" > by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to simplify the > code and increase compile coverage. > > Signed-off-by: Jisheng Zhang Reviewed-by: Russell

Re: Compile error ppc64le: Cannot find symbol for section 11: .text.unlikely.

2021-12-03 Thread Veronika Kabatova
On Wed, Dec 1, 2021 at 3:20 AM Coiby Xu wrote: > > On Wed, Nov 24, 2021 at 09:47:43PM +0800, Baoquan He wrote: > >On 11/24/21 at 01:47pm, Veronika Kabatova wrote: > >> Hi, > >> > >> for a while we've been seen the following error when compiling > >> the mainline kernel with gcc 11.2 and binutils 2

[RFC PATCH 13/14] s390/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeg

[RFC PATCH 14/14] fs/proc/vmcore: Remove the unused old interface copy_oldmem_page

2021-12-03 Thread Amit Daniel Kachhap
As all archs have upgraded to use the new interface copy_oldmem_page_buf() so remove the unused copy_oldmem_page. Also remove the weak definitions. Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: kexec Cc: linux-fsdevel Signed-off-by: Amit Daniel Kachhap --- fs/proc/vmcore.c | 1

[RFC PATCH 12/14] ia64/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: linux-ia64 Signed-off-by: Amit Daniel Kachhap --- arch/

[RFC PATCH 08/14] mips/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: Thomas Bogendoerfer Cc: linux-mips Signed-off-by: Amit D

[RFC PATCH 10/14] riscv/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linu

[RFC PATCH 11/14] powerpc/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: Michael Ellerman CC: Benjamin Herrenschmidt Cc: Paul Mac

[RFC PATCH 09/14] sh/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Use the interface copy_oldmem_page_buf() to avoid this issue. Cc: Yoshinori Sato Cc: Rich Felker CC: linux-sh Signed-off-

[RFC PATCH 07/14] arm/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Implement the interface copy_oldmem_page_buf() to avoid this issue. Cc: Russell King Cc: linux-arm-kernel Signed-off-by: A

[RFC PATCH 05/14] x86/crash_dump_32: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Implement the interface copy_oldmem_page_buf() to avoid this issue. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petko

[RFC PATCH 06/14] arm64/crash_dump: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Implement the interface copy_oldmem_page_buf() to avoid this issue. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kern

[RFC PATCH 00/14] fs/proc/vmcore: Remove unnecessary user pointer conversions

2021-12-03 Thread Amit Daniel Kachhap
Hi, This series aims to restructure the external interfaces as well internal code used in fs/proc/vmcore.c by removing the interchangeable use of user and kernel pointers. This unnecessary conversion may obstruct the tools such as sparse in generating meaningful results. This also simplifies the t

[RFC PATCH 01/14] fs/proc/vmcore: Update read_from_oldmem() for user pointer

2021-12-03 Thread Amit Daniel Kachhap
The exported interface read_from_oldmem() passes user pointer without __user annotation and does unnecessary user/kernel pointer conversions during the pointer propagation. Hence it is modified to have a new parameter for user pointer. Also a helper macro read_from_oldmem_to_kernel is added for c

[RFC PATCH 02/14] fs/proc/vmcore: Update copy_oldmem_page_encrypted() for user buffer

2021-12-03 Thread Amit Daniel Kachhap
The exported interface copy_oldmem_page_encrypted() passes user pointer without __user annotation and does unnecessary user/kernel pointer conversions during the pointer propagation. Hence it is modified to have a new parameter for user pointer. The other similar interface copy_oldmem_page() will

[RFC PATCH 03/14] fs/proc/vmcore: Update copy_oldmem_page() for user buffer

2021-12-03 Thread Amit Daniel Kachhap
The exported interface copy_oldmem_page passes user pointer without __user annotation and does unnecessary user/kernel pointer conversions during the pointer propagation. Hence it is modified to have a new parameter for user pointer. However instead of updating it directly a new interface copy_old

[RFC PATCH 04/14] x86/crash_dump_64: Use the new interface copy_oldmem_page_buf

2021-12-03 Thread Amit Daniel Kachhap
The current interface copy_oldmem_page() passes user pointer without __user annotation and hence does unnecessary user/kernel pointer conversions during its implementation. Implement the interface copy_oldmem_page_buf() to avoid this issue. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petko