android_kernel_xiaomi_sm8450/arch
Finn Thain cdb20b703e m68k: Fix kernel_clone_args.flags in m68k_clone()
[ Upstream commit 09b3d870faa7bc3e96c0978ab3cf4e96e4b15571 ]

Stan Johnson recently reported a failure from the 'dump' command:

  DUMP: Date of this level 0 dump: Fri Aug  9 23:37:15 2024
  DUMP: Dumping /dev/sda (an unlisted file system) to /dev/null
  DUMP: Label: none
  DUMP: Writing 10 Kilobyte records
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 3595695 blocks.
  DUMP: Context save fork fails in parent 671

The dump program uses the clone syscall with the CLONE_IO flag, that is,
flags == 0x80000000. When that value is promoted from long int to u64 by
m68k_clone(), it undergoes sign-extension. The new value includes
CLONE_INTO_CGROUP so the validation in cgroup_css_set_fork() fails and
the syscall returns -EBADF. Avoid sign-extension by casting to u32.

Reported-by: Stan Johnson <userm57@yahoo.com>
Closes: https://lists.debian.org/debian-68k/2024/08/msg00000.html
Fixes: 6aabc1facd ("m68k: Implement copy_thread_tls()")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/3463f1e5d4e95468dc9f3368f2b78ffa7b72199b.1723335149.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:07:44 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:21:03 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:23:41 +02:00
arm ARM: versatile: fix OF node leak in CPUs prepare 2024-10-17 15:07:43 +02:00
arm64 arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma 2024-10-17 15:07:32 +02:00
c6x c6x: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:21 +01:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:12:54 +02:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:23:19 +01:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:12:54 +02:00
ia64 efi: ia64: move IA64-only declarations to new asm/efi.h header 2024-07-18 13:05:50 +02:00
m68k m68k: Fix kernel_clone_args.flags in m68k_clone() 2024-10-17 15:07:44 +02:00
microblaze microblaze: don't treat zero reserved memory regions as error 2024-10-17 15:07:35 +02:00
mips MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed 2024-09-12 11:06:49 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:45:37 +02:00
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:17:38 +02:00
parisc parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367 2024-09-04 13:17:36 +02:00
powerpc powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL 2024-10-17 15:07:31 +02:00
riscv riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error() 2024-08-19 05:41:09 +02:00
s390 s390/vmlinux.lds.S: Move ro_after_init section behind rodata section 2024-09-12 11:06:49 +02:00
sh Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-16 13:32:07 +02:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-19 05:40:51 +02:00
um um: line: always fill *error_out in setup_one_line() 2024-09-12 11:06:48 +02:00
x86 x86/ibt,ftrace: Search for __fentry__ location 2024-10-17 15:07:37 +02:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:53:31 +02:00
.gitignore
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:23:44 +02:00