2 * Check decoding of mbind syscall.
4 * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
11 #include <asm/unistd.h>
21 const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL;
22 const unsigned long mode = 3;
23 const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL;
24 const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL;
25 const unsigned long flags = -1UL;
27 long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags);
28 printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n",
29 len, "MPOL_INTERLEAVE", nodemask, maxnode,
30 "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL",
31 (unsigned) flags & ~7, rc, errno2name());
33 puts("+++ exited with 0 +++");
39 SKIP_MAIN_UNDEFINED("__NR_mbind")