acrn-kernel/arch/arm
Kees Cook 085fe43238 ARM: ptrace: Restore syscall skipping for tracers
[ Upstream commit 4697b5848b ]

Since commit 4e57a4ddf6 ("ARM: 9107/1: syscall: always store
thread_info->abi_syscall"), the seccomp selftests "syscall_errno"
and "syscall_faked" have been broken. Both seccomp and PTRACE depend
on using the special value of "-1" for skipping syscalls. This value
wasn't working because it was getting masked by __NR_SYSCALL_MASK in
both PTRACE_SET_SYSCALL and get_syscall_nr().

Explicitly test for -1 in PTRACE_SET_SYSCALL and get_syscall_nr(),
leaving it exposed when present, allowing tracers to skip syscalls
again.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Lecopzer Chen <lecopzer.chen@mediatek.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: 4e57a4ddf6 ("ARM: 9107/1: syscall: always store thread_info->abi_syscall")
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230810195422.2304827-2-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:28 +02:00
..
boot ARM: dts: imx: Set default tuning step for imx7d usdhc 2023-09-13 09:42:20 +02:00
common
configs ARM: bcm2835_defconfig: Enable the framebuffer 2023-03-10 09:32:38 +01:00
crypto
include ARM: ptrace: Restore syscall skipping for tracers 2023-09-13 09:42:28 +02:00
kernel ARM: ptrace: Restore syscall skipping for tracers 2023-09-13 09:42:28 +02:00
lib locking/atomic: arm: fix sync ops 2023-07-19 16:21:02 +02:00
mach-actions
mach-airoha
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: fix imbalanced reference counter for ethernet devices 2023-06-14 11:15:29 +02:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-digicolor
mach-dove
mach-ep93xx ARM: ep93xx: fix missing-prototype warnings 2023-07-19 16:21:23 +02:00
mach-exynos
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-hpe
mach-imx ARM: imx: Call ida_simple_remove() for ida_simple_get 2023-03-10 09:32:38 +01:00
mach-iop32x
mach-ixp4xx
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mstar
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() 2023-03-10 09:32:38 +01:00
mach-omap2 ARM: omap2: fix missing tick_broadcast() prototype 2023-07-19 16:21:23 +02:00
mach-orion5x ARM: orion5x: fix d2net gpio initialization 2023-07-19 16:22:14 +02:00
mach-oxnas
mach-pxa ARM: pxa: remove use of symbol_get() 2023-09-06 21:26:59 +01:00
mach-qcom
mach-rda
mach-realtek
mach-rockchip
mach-rpc
mach-s3c ARM: s3c: fix s3c64xx_set_timer_source prototype 2023-03-10 09:32:38 +01:00
mach-s5pv210
mach-sa1100 ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings 2023-05-24 17:32:31 +01:00
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32
mach-sunplus
mach-sunxi
mach-tegra
mach-uniphier
mach-ux500
mach-versatile
mach-vt8500
mach-zynq ARM: zynq: Fix refcount leak in zynq_early_slcr_init 2023-03-10 09:32:33 +01:00
mm arm/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
net
nwfpe
plat-orion
probes ARM: 9303/1: kprobes: avoid missing-declaration warnings 2023-07-19 16:21:01 +02:00
tools
vdso
vfp
xen
Kbuild
Kconfig ARM: cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug
Makefile