Skip to contentSkip to conversation

Whitelist sysinfo call

PATCH In review [email protected] 3 participants 7 messages Mar 7, 2016 – Apr 12, 2016

lore
Share & tools
lore
#0 lore raw

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
index 2866e3c..e29fca1 100644
@@ -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
#1 lore raw
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.

---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +0 -0
index 2866e3c..e29fca1 100644

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
#2 lore raw

----- 元のメッセージ -----

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 call

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.

---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +0 -0
index 2866e3c..e29fca1 100644

qemu-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
#3 lore raw
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 call

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.

---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +0 -0
index 2866e3c..e29fca1 100644

qemu-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
Acked-by on v1 1/1
#4 lore raw
In reply to [email protected]
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.

Thanks.

Quoted 20 lines
---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
qemu-seccomp.c +1 -0
index 2866e3c..e29fca1 100644
@@ -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
#5 lore raw
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.

Thanks.

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
index 2866e3c..e29fca1 100644
@@ -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
#6 lore raw

----- 元のメッセージ -----

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 call

Quoted 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.

Quoted 8 lines
Quoted 3 lines

Thanks.

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
index 2866e3c..e29fca1 100644
@@ -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