Skip to contentSkip to conversation

virtiofsd: Add _llseek to the seccomp whitelist

PATCH In review Greg Kurz 2 participants 4 messages Jan 21, 2021

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH 1/1 virtiofsd: Add _llseek to the seccomp whitelist

This is how glibc implements lseek(2) on POWER.

---
 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..1ecf5bf318b3 100644
@@ -65,6 +65,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(linkat),
     SCMP_SYS(listxattr),
     SCMP_SYS(lseek),
+    SCMP_SYS(_llseek), /* For POWER */
     SCMP_SYS(madvise),
     SCMP_SYS(mkdirat),
     SCMP_SYS(mknodat),
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · * Greg Kurz ([email protected]) wrote:

This is how glibc implements lseek(2) on POWER.

OK, I'm going to assume that _llseek is present on pretty much everything?

Quoted 19 lines
---
 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..1ecf5bf318b3 100644
@@ -65,6 +65,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(linkat),
     SCMP_SYS(listxattr),
     SCMP_SYS(lseek),
+    SCMP_SYS(_llseek), /* For POWER */
     SCMP_SYS(madvise),
     SCMP_SYS(mkdirat),
     SCMP_SYS(mknodat),
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
author
#2 lore raw
Quoted 9 lines · On Thu, 21 Jan 2021 17:35:53 +0000 "Dr. David Alan Gilbert"…
Quoted 4 lines · * Greg Kurz ([email protected]) wrote:

This is how glibc implements lseek(2) on POWER.

OK, I'm going to assume that _llseek is present on pretty much everything?

I've only manually checked it is present on fedora x86, but this patch successfully passed gitlab CI and travis before being posted.

Quoted 21 lines
Quoted 19 lines
---
 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..1ecf5bf318b3 100644
@@ -65,6 +65,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(linkat),
     SCMP_SYS(listxattr),
     SCMP_SYS(lseek),
+    SCMP_SYS(_llseek), /* For POWER */
     SCMP_SYS(madvise),
     SCMP_SYS(mkdirat),
     SCMP_SYS(mknodat),
Signature · 1 line
2.26.2
#3 lore raw
Quoted 9 lines · * Greg Kurz ([email protected]) wrote:
Quoted 6 lines · On Thu, 21 Jan 2021 17:35:53 +0000 "Dr. David Alan Gilbert"…
Quoted 4 lines · * Greg Kurz ([email protected]) wrote:

This is how glibc implements lseek(2) on POWER.

Quoted 7 lines
Quoted 3 lines

OK, I'm going to assume that _llseek is present on pretty much everything?

I've only manually checked it is present on fedora x86, but this patch successfully passed gitlab CI and travis before being posted.

Ok, great - with the newer syscalls we had to be more careful; but this seems older.

Dave

Quoted 22 lines
Quoted 21 lines
Quoted 19 lines
---
 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..1ecf5bf318b3 100644
@@ -65,6 +65,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(linkat),
     SCMP_SYS(listxattr),
     SCMP_SYS(lseek),
+    SCMP_SYS(_llseek), /* For POWER */
     SCMP_SYS(madvise),
     SCMP_SYS(mkdirat),
     SCMP_SYS(mknodat),
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK