linux/arch/m68k/kernel
Finn Thain 09b3d870fa m68k: Fix kernel_clone_args.flags in m68k_clone()
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>
2024-08-26 10:24:34 +02:00
..
syscalls mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c m68k: Remove set_fs() 2021-09-24 13:35:07 +02:00
bootinfo_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
dma.c m68k: remove unused includes from dma.c 2023-10-22 16:38:55 +02:00
early_printk.c m68k: mvme16x: Add and use "mvme16x.h" 2023-10-06 10:03:03 +02:00
entry.S m68k: Fix spinlock race in kernel thread creation 2024-05-08 17:43:22 +02:00
head.S m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
ints.c m68k: kernel: Add and use "ints.h" 2023-10-06 10:03:01 +02:00
ints.h m68k: kernel: Add and use "ints.h" 2023-10-06 10:03:01 +02:00
irq.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
machine_kexec.c m68k: kexec: Include <linux/reboot.h> 2023-04-21 09:53:54 +02:00
Makefile m68k, kexec: fix the incorrect ifdeffery and build dependency of CONFIG_KEXEC 2023-12-12 17:20:17 -08:00
module.c m68k/kernel: Modernize printing of kernel messages 2017-02-12 10:36:52 +01:00
pcibios.c m68k/pci: Drop useless pcibios_setup() 2023-08-21 08:45:36 +10:00
process.c m68k: Fix kernel_clone_args.flags in m68k_clone() 2024-08-26 10:24:34 +02:00
process.h m68k: kernel: Add and use "process.h" 2023-10-06 10:03:01 +02:00
ptrace.c m68k: kernel: Add and use "ptrace.h" 2023-10-06 10:03:01 +02:00
ptrace.h m68k: kernel: Add and use "ptrace.h" 2023-10-06 10:03:01 +02:00
relocate_kernel.S m68k: Fix invalid .section syntax 2023-07-24 14:50:02 +02:00
setup_mm.c m68k: mm: Move paging_init() to common <asm/pgtable.h> 2023-10-06 10:03:02 +02:00
setup_no.c m68k: use strscpy() to instead of strncpy() 2022-12-05 09:07:21 +10:00
setup.c m68k: pull mach_beep in setup.c 2017-11-06 08:25:21 +10:00
signal.c m68k: kernel: Add and use "signal.h" 2023-10-06 10:03:01 +02:00
signal.h m68k: kernel: Add and use "signal.h" 2023-10-06 10:03:01 +02:00
sun3-head.S m68k/sun3: Remove is_medusa and m68k_pgtable_cachemode 2018-08-31 09:30:42 +02:00
sys_m68k.c m68k: mm: Add and use "fault.h" 2023-10-06 10:03:02 +02:00
syscalltable.S m68k: syscalls: switch to generic syscalltbl.sh 2021-04-06 09:33:20 +02:00
time.c m68knommu: fix undefined reference to `mach_get_rtc_pll' 2022-05-25 00:03:58 +10:00
traps.c m68k: kernel: Fix indentation by 7 spaces in traps.c 2023-10-16 14:30:39 +02:00
traps.h m68k: kernel: Add and use "traps.h" 2023-10-06 10:03:01 +02:00
uboot.c m68k: coldfire: fix warnings in uboot argument processing 2023-10-23 08:22:22 +10:00
vectors.c m68k: kernel: Add and use "vectors.h" 2023-10-06 10:03:01 +02:00
vectors.h m68k: kernel: Add and use "vectors.h" 2023-10-06 10:03:01 +02:00
vmlinux-nommu.lds objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux-std.lds objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux-sun3.lds objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00