PROBLEM: Kernel null pointer dereference when sandboxing

2015-06-01 Thread Steven Stewart-Gallus
love to run any tests or help any way I can to fix this bug. I understand if maintainers are too busy to reply or fix this bug. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

When should I not use CLONE_IO?

2014-12-18 Thread Steven Stewart-Gallus
f them? Even if the threads sharing the same I/O context must use the same scheduler can they have different priorities? Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org Mor

Re: How can I parse the command name from /proc//stat?

2014-12-06 Thread Steven Stewart-Gallus
Thank you, I dislike the idea of relying upon stat never gaining any other part that uses ) but that would work instead of using status. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vg

How can I parse the command name from /proc//stat?

2014-12-04 Thread Steven Stewart-Gallus
e works totally correctly. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks

2014-11-16 Thread Steven Stewart-Gallus
t still needs improvement? Finally, please don't ignore the rest of my message. Even if my patch isn't that good there are lots of ways to compromise and improve it such as adding tests, annotations and making it clearer. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: se

Re: [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks

2014-11-14 Thread Steven Stewart-Gallus
r the changes I made too it? Or that you'd want some more formal methods to make the code easier to verify? I suppose the area of code use a few extra sparse annotations. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&q

Re: [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks

2014-11-14 Thread Steven Stewart-Gallus
eue creation is not rejected then the resource user has to be accounted for right? And we can't add the resource to accounting if it is not created right? Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

[PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks

2014-11-06 Thread Steven Stewart-Gallus
This shouldn't be too controversial. I simply looked for where there was a tiny bit of waste in the message queue code. Signed-off-by: Steven Stewart-Gallus --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 4fcf39a..aa3f903 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -278,16 +2

Does inotify work with special files such as /proc//task//children?

2014-09-28 Thread Steven Stewart-Gallus
Hello, I can't seem to get inotify to work with special files such as /proc//task//children? I just need to get a simple yes/no answer on whether it works for special files or whether I have to try a different approach. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: sen

Re: [PATCH] V1 1/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify

2014-09-21 Thread Steven Stewart-Gallus
THREAD_ID was only used by timers and not in a few other places where it seems like an obvious fit. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: How is pivot_root intended to be used?

2014-09-04 Thread Steven Stewart-Gallus
Thank you, I think I will change the code to be like: int old_root = open("/", O_DIRECTORY); if (-1 == old_root) { perror("open"); return EXIT_FAILURE; } if (-1 == syscall(__NR_pivot_root, ".", ".")) { perror("pivot_root"); return EXIT_FAILURE;

How is pivot_root intended to be used?

2014-09-01 Thread Steven Stewart-Gallus
e mount namespace, setup a sandbox directory and changed into it. If you just want to look at the code, the actual code is avaliable at https://gitorious.org/linted/linted/source/b25685ba4762bfb794c8f36ae74276d32d2b0ca8:src/spawn/spawn.c. Thank you, Steven Stewart-Gallus -- To unsubscribe from t

Re: [PATCH RFC v7 net-next 00/28] BPF syscall

2014-08-27 Thread Steven Stewart-Gallus
> I'm personally not reviewing such a large patch series, sorry. > > You need to submit smaller sets if you want to get reasonable > review of your changes and ideas. Hello. As well, this clogs up the mailing boxes of other people who have no interest in the patch set. Thank yo

Re: [PATCH] V1 2/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify

2014-08-23 Thread Steven Stewart-Gallus
Any one who wants a quick way to test the changes can use the following hacky program that works as an init program. Thank you, Steven Stewart-Gallus #include #include #include #include #include #include #include #include #include #include #include #include #include /* GLibc does

[PATCH] V1 2/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify

2014-08-23 Thread Steven Stewart-Gallus
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 4fcf39a..8ca70a2 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -88,7 +88,7 @@ struct mqueue_inode_info { static const struct inode_operations mqueue_dir_inode_operations; static const struct file_operations mqueue_file_operations; static const str

[PATCH] V1 1/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify

2014-08-23 Thread Steven Stewart-Gallus
From: Steven Stewart-Gallus Currently the only thread-safe way of using mq_notify with message queues is to use the SIGEV_THREAD option. Unfortunately, existing wrappers around such functionality spawn a thread each time a notification happens instead of caching threads which is slow and

rt_sigreturn rejects a substitute stack frame as invalid.

2014-08-17 Thread Steven Stewart-Gallus
why. Thank you, Steven Stewart-Gallus The code: #include #include #include #include static ucontext_t alternate_context; static char alternate_context_stack[SIGSTKSZ]; static char signal_stack[SIGSTKSZ]; static void alternate_context_func(void) { puts("alternate context!"); }

Does anyone know when FUTEX_WAIT can fail with EAGAIN?

2014-07-29 Thread Steven Stewart-Gallus
17:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Bug 24912 - I think this one fell through the cracks a bit

2014-07-27 Thread Steven Stewart-Gallus
Hello, I think that bug 2491 at https://bugzilla.kernel.org/show_bug.cgi?id=24912 sort of fell through the cracks and I'm not sure as many people are aware of it as there could be. This bug is that one can't mount bind mounts readonly but can only remount them readonly which is insufficient for re

Re: [PATCH v2 2/2] man2: Document constant for only allowing absolute paths

2014-07-09 Thread Steven Stewart-Gallus
Signed-off-by: Steven Stewart-Gallus --- man2/access.2| 14 +- man2/chmod.2 | 14 +- man2/chown.2 | 14 +- man2/fanotify_mark.2 | 15 ++- man2/futimesat.2 | 14 +- man2/link.2

[PATCH v2 1/2] include/uapi: Define AT_ABSOLUTE to allow only absolute paths

2014-07-09 Thread Steven Stewart-Gallus
This way people can use existing functionality (passing an invalid value for dirfd to allow only absolute paths in *at style functions) and be compatible for the future if Linux ever adds in new AT_* flags. Signed-off-by: Steven Stewart-Gallus --- include/uapi/linux/fcntl.h | 11

Re: [PATCH 1/1] include/uapi: Define AT_FDNODIR constant as future guarantee

2014-07-09 Thread Steven Stewart-Gallus
AT_FDCWD is. Thank you, Steven Stewart-Gallus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 1/1] include/uapi: Define AT_FDNODIR constant as future guarantee

2014-07-05 Thread Steven Stewart-Gallus
From: Steven Stewart-Gallus --- This is my first kernel patch but this is really trivial so I hope I'm doing this right. diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h index 074b886..92223f0 100644 --- a/include/uapi/linux/fcntl.h +++ b/include/uapi/linux/fcntl.h @@

Suggestion, "public process scoped interfaces"

2014-04-02 Thread Steven Stewart-Gallus
hich requires the directory to be empty. Final note, for a bit of speed and for letting /proc not be mounted it could be convenient to create a system call, process_run_dir, that takes a PID and opens the run directory for the process. Thank you, Steven Stewart-Gallus -- To unsubscribe from this l