Re: [PATCH] tpm: Fix kexec crash due to access to ops NULL pointer (powerpc)

2021-12-28 Thread Jarkko Sakkinen
On Tue, Dec 21, 2021 at 09:01:06AM -0500, Stefan Berger wrote: > > On 12/21/21 03:47, Jarkko Sakkinen wrote: > > On Sat, Dec 11, 2021 at 08:28:04PM -0500, Stefan Berger wrote: > > > Fix the following crash on kexec by checking chip->ops for a NULL pointer > > > in tpm_chip_start() and returning

Re: [PATCH v2] powerpc/32s: Fix kasan_init_region() for KASAN

2021-12-28 Thread Michael Ellerman
Christophe Leroy writes: > It has been reported some configuration where the kernel doesn't > boot with KASAN enabled. > > This is due to wrong BAT allocation for the KASAN area: > > ---[ Data Block Address Translation ]--- > 0: 0xc000-0xcfff 0x 256M Kernel rw

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.16-5 tag

2021-12-28 Thread pr-tracker-bot
The pull request you sent on Tue, 28 Dec 2021 22:23:50 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.16-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f651faaaba5f41ffac195e64f58483721e60eafc Thank you! --

Re: [PATCH V3 5/8] sched: s390: Remove unused TASK_SIZE_OF

2021-12-28 Thread Heiko Carstens
On Tue, Dec 28, 2021 at 02:47:26PM +0800, guo...@kernel.org wrote: > From: Guo Ren > > This macro isn't used in Linux sched, now. Delete in > include/linux/sched.h and arch's include/asm. > > Signed-off-by: Guo Ren > Signed-off-by: Guo Ren > Reviewed-by: Arnd Bergmann > --- >

[powerpc:next-test 46/179] arch/powerpc/mm/nohash/fsl_book3e.c:61:3: sparse: sparse: symbol 'tlbcam_addrs' was not declared. Should it be static?

2021-12-28 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: beeac538c366cd2828092adecd1edab28326c55b commit: ff47a95d1a67477e9bc2049a840d93b68508e079 [46/179] powerpc/mm: Move tlbcam_sz() and make it static config: powerpc64-randconfig-s031-20211228 (https

Re: [PATCH v2 3/3] x86: Support huge vmalloc mappings

2021-12-28 Thread Dave Hansen
On 12/28/21 2:26 AM, Kefeng Wang wrote: >>> There are some disadvantages about this feature[2], one of the main >>> concerns is the possible memory fragmentation/waste in some scenarios, >>> also archs must ensure that any arch specific vmalloc allocations that >>> require PAGE_SIZE mappings(eg,

[powerpc:next-test 44/179] arch/powerpc/platforms/85xx/smp.c:218:28: sparse: sparse: incorrect type in assignment (different address spaces)

2021-12-28 Thread kernel test robot
() static config: powerpc64-randconfig-s031-20211228 (https://download.01.org/0day-ci/archive/20211228/202112282327.yottekgx-...@intel.com/config) compiler: powerpc64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin

[PATCH V2 17/17] riscv: compat: Add COMPAT Kbuild skeletal support

2021-12-28 Thread guoren
From: Guo Ren Adds initial skeletal COMPAT Kbuild (Runing 32bit U-mode on 64bit S-mode) support. - Setup kconfig & dummy functions for compiling. - Implement compat_start_thread by the way. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/riscv/Kconfig | 19

[PATCH V2 14/17] riscv: compat: signal: Add rt_frame implementation

2021-12-28 Thread guoren
From: Guo Ren Implement compat_setup_rt_frame for sigcontext save & restore. The main process is the same with signal, but the rv32 pt_regs' size is different from rv64's, so we needs convert them. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann ---

[PATCH V2 13/17] riscv: compat: vdso: Add setup additional pages implementation

2021-12-28 Thread guoren
From: Guo Ren Reconstruct __setup_additional_pages() by appending vdso info pointer argument to meet compat_vdso_info requirement. And change vm_special_mapping *dm, *cm initialization into static. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann ---

[PATCH V2 12/17] riscv: compat: vdso: Add rv32 VDSO base code implementation

2021-12-28 Thread guoren
From: Guo Ren There is no vgettimeofday supported in rv32 that makes simple to generate rv32 vdso code which only needs riscv64 compiler. Other architectures need change compiler or -m (machine parameter) to support vdso32 compiling. If rv32 support vgettimeofday (which cause C compile) in

[PATCH V2 11/17] riscv: compat: Add elf.h implementation

2021-12-28 Thread guoren
From: Guo Ren Implement necessary type and macro for compat elf. See the code comment for detail. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/riscv/include/asm/elf.h | 49 +++- 1 file changed, 48 insertions(+), 1 deletion(-) diff

[PATCH V2 09/17] riscv: compat: syscall: Add compat_sys_call_table implementation

2021-12-28 Thread guoren
From: Guo Ren Implement compat_syscall_table.c with compat_sys_call_table & fixup system call such as truncate64,pread64,fallocate which need two regs to indicate 64bit-arg (copied from arm64). Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann ---

[PATCH V2 08/17] riscv: compat: Re-implement TASK_SIZE for COMPAT_32BIT

2021-12-28 Thread guoren
From: Guo Ren Make TASK_SIZE from const to dynamic detect TIF_32BIT flag function. Refer to arm64 to implement DEFAULT_MAP_WINDOW_64 for efi-stub. Limit 32-bit compatible process in 0-2GB virtual address range (which is enough for real scenarios), because it could avoid address sign extend

[PATCH V2 07/17] riscv: compat: Add basic compat date type implementation

2021-12-28 Thread guoren
From: Guo Ren Implement asm/compat.h for struct compat_xxx, RLIM_INFINITY, OFF_T_MAX, is_compat_task, compat_user_regset, regset convert. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/riscv/include/asm/compat.h | 132 +++

[PATCH V2 06/17] riscv: Fixup difference with defconfig

2021-12-28 Thread guoren
From: Guo Ren Let's follow the origin patch's spirit: The only difference between rv32_defconfig and defconfig is that rv32_defconfig has CONFIG_ARCH_RV32I=y. This is helpful to compare rv64-compat-rv32 v.s. rv32-linux. Fixes: 1b937e8faa87ccfb ("RISC-V: Add separate defconfig for 32bit

[PATCH V2 05/17] syscalls: compat: Fix the missing part for __SYSCALL_COMPAT

2021-12-28 Thread guoren
From: Guo Ren Make "uapi asm unistd.h" could be used for architectures' COMPAT mode. The __SYSCALL_COMPAT is first used in riscv. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- include/uapi/asm-generic/unistd.h | 4 ++-- tools/include/uapi/asm-generic/unistd.h | 4

[PATCH V2 04/17] asm-generic: compat: Cleanup duplicate definitions

2021-12-28 Thread guoren
From: Guo Ren There are 7 64bit architectures that support Linux COMPAT mode to run 32bit applications. A lot of definitions are duplicate: - COMPAT_USER_HZ - COMPAT_RLIM_INFINITY - COMPAT_OFF_T_MAX - __compat_uid_t, __compat_uid_t - compat_dev_t - compat_ipc_pid_t - struct compat_flock

[PATCH V2 03/17] asm-generic: fcntl: compat: Remove duplicate definitions

2021-12-28 Thread guoren
From: Guo Ren Remove duplicate F_GETLK64,F_SETLK64,F_SETLKW64 definitions in arch/*/include/asm/compat.h. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/arm64/include/asm/compat.h | 4 arch/powerpc/include/asm/compat.h | 4

[PATCH V2 02/17] fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT

2021-12-28 Thread guoren
From: Guo Ren RISC-V doesn't neeed compat_stat, so using __ARCH_WANT_COMPAT_STAT to exclude unnecessary SYSCALL functions. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/arm64/include/asm/unistd.h | 1 + arch/mips/include/asm/unistd.h| 2 ++

[PATCH V2 01/17] kconfig: Add SYSVIPC_COMPAT for all architectures

2021-12-28 Thread guoren
From: Guo Ren The existing per-arch definitions are pretty much historic cruft. Move SYSVIPC_COMPAT into init/Kconfig. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Christoph Hellwig --- arch/arm64/Kconfig | 4 arch/mips/Kconfig| 5 -

[PATCH V2 00/17] riscv: compat: Add COMPAT mode support for rv64

2021-12-28 Thread guoren
From: Guo Ren Currently, most 64-bit architectures (x86, parisc, powerpc, arm64, s390, mips, sparc) have supported COMPAT mode. But they all have history issues and can't use standard linux unistd.h. RISC-V would be first standard __SYSCALL_COMPAT user of include/uapi/asm-generic /unistd.h. The

[GIT PULL] Please pull powerpc/linux.git powerpc-5.16-5 tag

2021-12-28 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull one more powerpc fix for 5.16: The following changes since commit 8734b41b3efe0fc6082c1937b0e88556c396dc96: powerpc/module_64: Fix livepatching for RO modules (2021-12-14 23:13:03 +1100) are available in the git

[powerpc:merge] BUILD SUCCESS bdcf18e133f656b2c97390a594fc95e37849e682

2021-12-28 Thread kernel test robot
allmodconfig i386 randconfig-c001-20211228 mips cavium_octeon_defconfig h8300 edosk2674_defconfig powerpcfsp2_defconfig riscvnommu_virt_defconfig powerpc mpc834x_mds_defconfig arc

[PATCH 3/6] KVM: Remove opaque from kvm_arch_check_processor_compat

2021-12-28 Thread Chao Gao
No arch implementation uses this opaque now. Signed-off-by: Chao Gao --- arch/arm64/kvm/arm.c | 2 +- arch/mips/kvm/mips.c | 2 +- arch/powerpc/kvm/powerpc.c | 2 +- arch/riscv/kvm/main.c | 2 +- arch/s390/kvm/kvm-s390.c | 2 +- arch/x86/kvm/x86.c | 2 +-

[PATCH 0/6] Improve KVM's interaction with CPU hotplug

2021-12-28 Thread Chao Gao
KVM registers its CPU hotplug callback to CPU starting section. And in the callback, KVM enables hardware virtualization on hotplugged CPUs if any VM is running on existing CPUs. There are two problems in the process: 1. KVM doesn't do compatibility checks before enabling hardware virtualization