pull-seccomp-20180712
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJbR0/GAAoJEN8y58Dw//miNK4IAJeRWlrUC6Ky/2F/1ppX3gS0 +nwIBnlzMMI2cJv9yaEF7q5dIQklXD9jblhL6NlXXUdu4BhDZyY6MUn1d0pKuefC g9imYQ88/esuomWYuZhADM6+vW3Cqbi57Z5pQJgCLHM9aF9sH2IQkVfJZgHWqWft BxWDih3xtnx6UG7kqbFCA3gsdkdIceUCh4ANm+KYP/iB/JB0t7WoDviEVTyji83D ci3SzK7eRn0stjCz+X2hR9hoSdsU89DOJDdVAiTct4swrbuR0RFHZdsgC+gHUZJr 9YnYudYE4SOxoczkM1LsUmitKIL2BK7vRBmY2B/2EWndi8/XIRg6TtvhPvKPe7E= =xTNJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20180712' into staging pull-seccomp-20180712 # gpg: Signature made Thu 12 Jul 2018 13:55:34 BST # gpg: using RSA key DF32E7C0F0FFF9A2 # gpg: Good signature from "Eduardo Otubo (Senior Software Engineer) <otubo@redhat.com>" # Primary key fingerprint: D67E 1B50 9374 86B4 0723 DBAB DF32 E7C0 F0FF F9A2 * remotes/otubo/tags/pull-seccomp-20180712: seccomp: allow sched_setscheduler() with SCHED_IDLE policy Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
7fdf16e114
@ -34,6 +34,12 @@
|
||||
struct QemuSeccompSyscall {
|
||||
int32_t num;
|
||||
uint8_t set;
|
||||
uint8_t narg;
|
||||
const struct scmp_arg_cmp *arg_cmp;
|
||||
};
|
||||
|
||||
const struct scmp_arg_cmp sched_setscheduler_arg[] = {
|
||||
SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)
|
||||
};
|
||||
|
||||
static const struct QemuSeccompSyscall blacklist[] = {
|
||||
@ -92,7 +98,8 @@ static const struct QemuSeccompSyscall blacklist[] = {
|
||||
{ SCMP_SYS(setpriority), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setparam), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_getparam), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setscheduler), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setscheduler), QEMU_SECCOMP_SET_RESOURCECTL,
|
||||
ARRAY_SIZE(sched_setscheduler_arg), sched_setscheduler_arg },
|
||||
{ SCMP_SYS(sched_getscheduler), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_getaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
@ -118,7 +125,8 @@ static int seccomp_start(uint32_t seccomp_opts)
|
||||
continue;
|
||||
}
|
||||
|
||||
rc = seccomp_rule_add(ctx, SCMP_ACT_KILL, blacklist[i].num, 0);
|
||||
rc = seccomp_rule_add_array(ctx, SCMP_ACT_KILL, blacklist[i].num,
|
||||
blacklist[i].narg, blacklist[i].arg_cmp);
|
||||
if (rc < 0) {
|
||||
goto seccomp_return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user