1 /*
2 * Copyright (c) 2018-2021 The strace developers.
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 static long
9 ptrace_pokeuser(int pid, unsigned long off, kernel_ulong_t val)
10 {
11 /*
12 * As PTRACE_POKEUSER is crippled on x32 by design from the very first
13 * linux kernel commit v3.4-rc1~33^2~2 when it was introduced,
14 * workaround this by using the raw x86_64 syscall instead.
15 */
16 return syscall(101, PTRACE_POKEUSER, pid, off, val);
17 }