[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/MUSL PATCH 13/19] Add patch to update setxid if syscall num is not known at build time
wip: This patch updates the setxid.c file by replacing the __syscall function call by uk_syscall from the syscall_shin layer since the syscall number is not known at build time. Signed-off-by: Gaulthier Gain <gaulthier.gain@xxxxxxxxx> --- patches/0009-use-uk-syscall.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/0009-use-uk-syscall.patch diff --git a/patches/0009-use-uk-syscall.patch b/patches/0009-use-uk-syscall.patch new file mode 100644 index 0000000..f2f0faf --- /dev/null +++ b/patches/0009-use-uk-syscall.patch @@ -0,0 +1,34 @@ +From e951c7996f2bf3d80143c2c2d5f16b49f28402de Mon Sep 17 00:00:00 2001 +From: Gaulthier Gain <gaulthier.gain@xxxxxxxxx> +Date: Sun, 13 Oct 2019 17:21:03 +0200 +Subject: [MUSL] [PATCH] Use uk_syscall if syscall is not known at build time + +Signed-off-by: Gaulthier Gain <gaulthier.gain@xxxxxxxxx> +--- + src/unistd/setxid.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/unistd/setxid.c b/src/unistd/setxid.c +index 0239f8a..f8ff653 100644 +--- a/src/unistd/setxid.c ++++ b/src/unistd/setxid.c +@@ -1,6 +1,6 @@ + #include <unistd.h> + #include <errno.h> +-#include "syscall.h" ++#include <syscall.h> + #include "libc.h" + #include "pthread_impl.h" + +@@ -13,7 +13,7 @@ static void do_setxid(void *p) + { + struct ctx *c = p; + if (c->err>0) return; +- int ret = -__syscall(c->nr, c->id, c->eid, c->sid); ++ int ret = -uk_syscall(c->nr, c->id, c->eid, c->sid); + if (ret && !c->err) { + /* If one thread fails to set ids after another has already + * succeeded, forcibly killing the process is the only safe +-- +2.11.0 + -- 2.11.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |