Whitelist sysinfo call
PATCH 1/1 Whitelist sysinfo call
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)
qemu-seccomp.c +1 -0
@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 }, }; int seccomp_start(void)
Signature · 1 line
2.5.0
Quoted 17 lines · On Mon, Mar 07, 2016 at 10=34=46AM +0100, [email protected] wrote:
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +0
-0
qemu-seccomp.c static const struct QemuSeccompSyscall seccomp_whitelist[] = { · line 253
Quoted 4 lines
qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 },
Are you sure you want to add this syscall to the bottom of the list? Did you estimate the frequency it is called by running strace?
Thanks for the patch.
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH
----- 元のメッセージ -----
Quoted 33 lines
差出人: "Eduardo Otubo" <[email protected]> 宛先: [email protected]
Cc: [email protected], [email protected] 送信済み: 2016年3月11日, 金曜日 午前 9:51:50
件名: Re: [Qemu-devel] [PATCH] Whitelist sysinfo callQuoted 17 lines · On Mon, Mar 07, 2016 at 10=34=46AM +0100, [email protected] wrote:
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +0
-0qemu-seccomp.c static const struct QemuSeccompSyscall · line 254
Quoted 5 lines
qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 },Are you sure you want to add this syscall to the bottom of the list? Did you estimate the frequency it is called by running strace?
Quoted 2 lines
Thanks for the patch.
Hi,
Yes, it wasn't used before nss update and now is used only for rbd based images where it is called just few times upon start so drawback should be minimal. With this we do not change cost of other calls.
Thanks for review and question,
Mirek
Quoted 4 lines
--
Eduardo Otubo
ProfitBricks GmbH
Signature · 2 lines
Miroslav Rezanina Software Engineer - Virtualization Team
Quoted 38 lines · Miroslav Rezanina
----- 元のメッセージ -----
Quoted 33 lines
差出人: "Eduardo Otubo" <[email protected]> 宛先: [email protected]
Cc: [email protected], [email protected] 送信済み: 2016年3月11日, 金曜日 午前 9:51:50
件名: Re: [Qemu-devel] [PATCH] Whitelist sysinfo callQuoted 17 lines · On Mon, Mar 07, 2016 at 10=34=46AM +0100, [email protected] wrote:
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +0
-0qemu-seccomp.c static const struct QemuSeccompSyscall · line 254
Quoted 5 lines
qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 },Are you sure you want to add this syscall to the bottom of the list? Did you estimate the frequency it is called by running strace?
Quoted 2 lines
Thanks for the patch.
Quoted 8 lines
Hi,
Yes, it wasn't used before nss update and now is used only for rbd based images where it is called just few times upon start so drawback should be minimal. With this we do not change cost of other calls.
Thanks for review and question,
Mirek
Ok. So, ACK on this patch. I'll roll out a pull request by the end of the day.
Thanks for the contribution.
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH
Quoted 8 lines · Quoting [email protected] ([email protected]):
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>
Thanks.
Quoted 20 lines
--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 }, }; int seccomp_start(void)Signature · 1 line
2.5.0
Quoted 6 lines · Serge Hallyn
Quoted 5 lines · Quoting [email protected] ([email protected]):
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
Quoted 7 lines
Quoted 3 lines
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>Thanks.
Acked-by Serge E. Hallyn <[email protected]>
Also: I'll change the subject of this email a little bit for a cleaner and more explicit commit.
Thanks.
Quoted 22 lines
Quoted 21 lines
--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { #ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 }, }; int seccomp_start(void)Signature · 1 line
2.5.0
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH
----- 元のメッセージ -----
Quoted 17 lines
差出人: "Eduardo Otubo" <[email protected]> 宛先: "Serge Hallyn" <[email protected]>
Cc: [email protected], [email protected], [email protected] 送信済み: 2016年4月12日, 火曜日 午後 1:53:47
件名: Re: Re: [Qemu-devel] [PATCH] Whitelist sysinfo callQuoted 10 lines · Serge Hallyn
Quoted 8 lines · Quoting [email protected] ([email protected]):
From: Miroslav Rezanina <[email protected]>
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode.
To allow using rbd images in sandbox mode we have to whitelist it.
Signed-off-by Miroslav Rezanina <[email protected]>
Quoted 8 lines
Quoted 3 lines
Thanks.
Acked-by Serge E. Hallyn <[email protected]>Also: I'll change the subject of this email a little bit for a cleaner and more explicit commit.
Thanks.
Ok, thanks.
Mirek
Quoted 29 lines
Quoted 18 lines
Quoted 18 lines
--- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+)qemu-seccomp.c +1
-0@@ -250,6 +250,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {#ifdef HAVE_CACHEFLUSH { SCMP_SYS(cacheflush), 240 }, #endif + { SCMP_SYS(sysinfo), 240 }, };Quoted 6 lines
Quoted 5 lines
int
seccomp_start(void)
--
2.5.0--
Eduardo Otubo
ProfitBricks GmbH
Signature · 2 lines
Miroslav Rezanina Software Engineer - Virtualization Team