PROBLEM: Kernel null pointer dereference when sandboxing

2015-06-01 Thread Steven Stewart-Gallus
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.kerne

PROBLEM: Kernel null pointer dereference when sandboxing

2015-06-01 Thread Steven Stewart-Gallus
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.kernel.org More majordomo

When should I not use CLONE_IO?

2014-12-18 Thread Steven Stewart-Gallus
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 More majordomo inf

When should I not use CLONE_IO?

2014-12-18 Thread Steven Stewart-Gallus
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 More majordomo info at http

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

Re: How can I parse the command name from /proc/pid/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

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

2014-12-04 Thread Steven Stewart-Gallus
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/

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

2014-12-04 Thread Steven Stewart-Gallus
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
ement? 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: send the line "unsu

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

2014-11-16 Thread Steven Stewart-Gallus
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: send the line unsubscribe linux-kernel in the body

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

2014-11-14 Thread Steven Stewart-Gallus
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" in the body of

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

2014-11-14 Thread Steven Stewart-Gallus
source 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 to majord...@vger.kernel.org More majordomo

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

2014-11-14 Thread Steven Stewart-Gallus
? 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 to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2014-11-14 Thread Steven Stewart-Gallus
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 in the body of a message to majord

[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 +278,29

[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 sstewartgallu...@mylangara.bc.ca --- diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 4fcf39a..aa3f903 100644 --- a/ipc/mqueue.c +++ b/ipc

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: send

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

2014-09-28 Thread Steven Stewart-Gallus
Hello, I can't seem to get inotify to work with special files such as /proc/pid/task/tid/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

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

2014-09-21 Thread Steven Stewart-Gallus
ers 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: [PATCH] V1 1/2] ipc: let message queues use SIGEV_THREAD_ID with mq_notify

2014-09-21 Thread Steven Stewart-Gallus
that's also okay. If you also feel that nobody would use the feature in the first place that's okay too. Personally, it just bugged me that SIGEV_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

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;

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; } if

How is pivot_root intended to be used?

2014-09-01 Thread Steven Stewart-Gallus
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 this l

How is pivot_root intended to be used?

2014-09-01 Thread Steven Stewart-Gallus
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 this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

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 you, St

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 you, Steven Stewart

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

[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

[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 sstewartgallu...@mylangara.bc.ca 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

[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

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 assert.h #include errno.h #include fcntl.h #include mqueue.h #include pthread.h #include signal.h #include stdbool.h #include stdio.h

rt_sigreturn rejects a substitute stack frame as invalid.

2014-08-17 Thread Steven Stewart-Gallus
, 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!"); } static void sw

rt_sigreturn rejects a substitute stack frame as invalid.

2014-08-17 Thread Steven Stewart-Gallus
, Steven Stewart-Gallus The code: #include stdio.h #include signal.h #include ucontext.h #include unistd.h 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
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/

Does anyone know when FUTEX_WAIT can fail with EAGAIN?

2014-07-29 Thread Steven Stewart-Gallus
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

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: [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/

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 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 sstewartgallu...@mylangara.bc.ca --- include/uapi

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 sstewartgallu...@mylangara.bc.ca --- man2/access.2| 14 +- man2/chmod.2 | 14 +- man2/chown.2 | 14 +- man2/fanotify_mark.2 | 15 ++- man2/futimesat.2

[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 @@ -38,9

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

2014-07-05 Thread Steven Stewart-Gallus
From: Steven Stewart-Gallus sstewartgallu...@mylangara.bc.ca This constant means that in the far future it might be possible to define other AT_FD* constants. Signed-off-by: Steven Stewart-Gallus sstewartgallu...@mylangara.bc.ca --- This is my first kernel patch but this is really trivial so I

Suggestion, "public process scoped interfaces"

2014-04-02 Thread Steven Stewart-Gallus
ctory 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 list: send the line "unsub

Suggestion, public process scoped interfaces

2014-04-02 Thread Steven Stewart-Gallus
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 list: send the line unsubscribe linux-kernel in the body of a message to majord