Comment 6 for bug 1849785

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

include/seccomp.h
#define __PNR_semtimedop -204
#ifndef __NR_semtimedop
#define __NR_semtimedop __PNR_semtimedop
#endif /* __NR_semtime */

So if __NR_semtimedop is 392 then it would not set -204 and we'd get this result.

Turns out that all but SCMP_SYS(semop) have changed on this s390x build.
A build with -E shows that.

Good:
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (-201), 0);
 if (rc != 0)
  goto out;
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (-204), 0);
 if (rc != 0)
  goto out;
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (-202), 0);
 if (rc != 0)
  goto out;

Bad:
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (-201), 0);
 if (rc != 0)
  goto out;
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (
# 61 "36-sim-ipc_syscalls.c" 3 4
                                           392
# 61 "36-sim-ipc_syscalls.c"
                                           ), 0);
 if (rc != 0)
  goto out;
 rc = seccomp_rule_add(ctx, 0x7fff0000U, (
# 65 "36-sim-ipc_syscalls.c" 3 4
                                           393
# 65 "36-sim-ipc_syscalls.c"
                                           ), 0);
 if (rc != 0)
  goto out;