Re: [PATCH v4] selftest: size: Add size test for Linux kernel

2014-11-26 Thread Josh Triplett
On Wed, Nov 26, 2014 at 08:27:23PM -0800, Tim Bird wrote: --- /dev/null +++ b/tools/testing/selftests/size/Makefile [...] +LIBGCC=$(shell $(CC) -print-libgcc-file-name) + +get_size: get_size.c + $(CC) --static -ffreestanding -nostartfiles \ + -Wl,--entry=_start get_size.c

Re: linux-next: manual merge of the tiny tree with the tip tree

2014-11-24 Thread Josh Triplett
timer subsystem commit d1f6d68d03ea with this > > magnitude of linecount increase: > > > > Signed-off-by: Catalina Mocanu > > [josh: Handle CONFIG_COMPAT=y.] > > Reviewed-by: Josh Triplett > > Signed-off-by: Josh Triplett > > --- > &g

Re: linux-next: manual merge of the tiny tree with the tip tree

2014-11-24 Thread Josh Triplett
c to test_udelay.c") from the tip tree and commit > > d1f6d68d03ea ("kernel: time: Compile out NTP support") from the tiny > > tree. > > So I think a timer subsystem commit d1f6d68d03ea with this > magnitude of linecount increase: > > Signed-off-by: C

Re: [PATCH v4 0/7] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
422 (-8399) I replied to one patch with a minor nit in the commit message. Other than that, I don't see any obvious issues with this. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH v4 3/7] fs/splice: support compiling out splice-family syscalls

2014-11-24 Thread Josh Triplett
On Tue, Nov 25, 2014 at 12:01:02AM +0100, Pieter Smith wrote: > Many embedded systems will not need the splice-family syscalls (splice, > vmsplice, tee and sendfile). Omitting them saves space. This adds a new > EXPERT > config option CONFIG_SYSCALL_SPLICE (default y) to support compiling them

Re: [fuse-devel] [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 10:49:31AM +0100, Pieter Smith wrote: > On Sun, Nov 23, 2014 at 03:23:02PM -0800, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 11:29:08PM +0100, Richard Weinberger wrote: > > > On Sun, Nov 23, 2014 at 3:20 PM, Pieter Smith wrote: > > > > T

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 11:01:38AM +0100, Pieter Smith wrote: > On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: > > > On Sun, 23 Nov 2014 15:36:37 -0800 > > > Josh Triplett wrote: > >

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 09:38:20AM +0100, Geert Uytterhoeven wrote: > On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > >> On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > >> >

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 09:38:20AM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 11:01:38AM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23

Re: [fuse-devel] [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-24 Thread Josh Triplett
On Mon, Nov 24, 2014 at 10:49:31AM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 03:23:02PM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 11:29:08PM +0100, Richard Weinberger wrote: On Sun, Nov 23, 2014 at 3:20 PM, Pieter Smith pie...@boesman.nl wrote: To implement splice

Re: [PATCH v4 3/7] fs/splice: support compiling out splice-family syscalls

2014-11-24 Thread Josh Triplett
On Tue, Nov 25, 2014 at 12:01:02AM +0100, Pieter Smith wrote: Many embedded systems will not need the splice-family syscalls (splice, vmsplice, tee and sendfile). Omitting them saves space. This adds a new EXPERT config option CONFIG_SYSCALL_SPLICE (default y) to support compiling them out.

Re: [PATCH v4 0/7] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-24 Thread Josh Triplett
that, I don't see any obvious issues with this. - Josh Triplett -- 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: linux-next: manual merge of the tiny tree with the tip tree

2014-11-24 Thread Josh Triplett
-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Josh Triplett j...@joshtriplett.org --- drivers/pps/Kconfig| 2 +- include/linux/timex.h | 15 +-- init/Kconfig | 10 ++ kernel/compat.c| 8 ++-- kernel/sys_ni.c

Re: linux-next: manual merge of the tiny tree with the tip tree

2014-11-24 Thread Josh Triplett
Mocanu catalina.moc...@gmail.com [josh: Handle CONFIG_COMPAT=y.] Reviewed-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Josh Triplett j...@joshtriplett.org --- drivers/pps/Kconfig| 2 +- include/linux/timex.h | 15 +-- init/Kconfig

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: > On Sun, 23 Nov 2014 15:36:37 -0800 > Josh Triplett wrote: > > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > > > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > >

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > Truly removing sendfile/sendpage means that you can't even compile NFS &

Re: [fuse-devel] [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-23 Thread Josh Triplett
uct page *page); > > > > +#ifdef CONFIG_SYSCALL_SPLICE > > +#define __splice_p(x) x > > +#else > > +#define __splice_p(x) NULL > > +#endif > > + > > This needs to go into a different patch. > One logical change per patch please. :-) Easy enough to merge this one into the patch introducing CONFIG_SYSCALL_SPLICE, then. - Josh Triplett -- 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 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
eral *users* of sendpage; it doesn't compile out the sendpage support/infrastructure itself. - Josh Triplett -- 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/ma

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
out the sendpage support/infrastructure itself. - Josh Triplett -- 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

Re: [fuse-devel] [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-23 Thread Josh Triplett
CONFIG_SYSCALL_SPLICE +#define __splice_p(x) x +#else +#define __splice_p(x) NULL +#endif + This needs to go into a different patch. One logical change per patch please. :-) Easy enough to merge this one into the patch introducing CONFIG_SYSCALL_SPLICE, then. - Josh Triplett -- To unsubscribe

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean

Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)

2014-11-23 Thread Josh Triplett
On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014

Re: [PATCH 5/6] net/core: support compiling out splice

2014-11-22 Thread Josh Triplett
the code to prevent linking > against the struct. Do you know of a better technique to get the same > result? No, I don't. The approach you took seems fine; I'm just saying that you need to explain the need for it in the commit message. - JosH Triplett -- To unsubscribe from this list

Re: [PATCH 6/6] fs/splice: full support for compiling out splice

2014-11-22 Thread Josh Triplett
) Very nice! - Josh Triplett > function old new delta > pipe_to_null 4 - -4 > generic_pipe_buf_nosteal 6 - -6 > spd_release_page 10

Re: [PATCH 3/6] fs/splice: support compiling out splice-family syscalls

2014-11-22 Thread Josh Triplett
ing splice-related infrastructure. This commit message doesn't reflect the new approach of leaving those members in the structure. The patch looks good otherwise. - Josh Triplett > add/remove: 0/16 grow/shrink: 2/5 up/down: 114/-3693 (-3579) > function

Re: [PATCH 5/6] net/core: support compiling out splice

2014-11-22 Thread Josh Triplett
On Sat, Nov 22, 2014 at 10:00:00PM +0100, Pieter Smith wrote: > Compile out splice support from networking core when the splice-family of > syscalls is not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is > undefined). Please explain in the commit message why this particular bit of splice

Re: [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-22 Thread Josh Triplett
commit message why this particular splice_read function (and only the splice_read function, not the splice_write function) needs compiling out, when others do not? - Josh Triplett > Signed-off-by: Pieter Smith > --- > fs/fuse/dev.c | 4 ++-- > include/linux/fs.h | 6 ++ >

Re: [PATCH 4/6] fs/fuse: support compiling out splice

2014-11-22 Thread Josh Triplett
why this particular splice_read function (and only the splice_read function, not the splice_write function) needs compiling out, when others do not? - Josh Triplett Signed-off-by: Pieter Smith pie...@boesman.nl --- fs/fuse/dev.c | 4 ++-- include/linux/fs.h | 6 ++ 2 files changed

Re: [PATCH 5/6] net/core: support compiling out splice

2014-11-22 Thread Josh Triplett
On Sat, Nov 22, 2014 at 10:00:00PM +0100, Pieter Smith wrote: Compile out splice support from networking core when the splice-family of syscalls is not supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined). Please explain in the commit message why this particular bit of splice

Re: [PATCH 3/6] fs/splice: support compiling out splice-family syscalls

2014-11-22 Thread Josh Triplett
. This commit message doesn't reflect the new approach of leaving those members in the structure. The patch looks good otherwise. - Josh Triplett add/remove: 0/16 grow/shrink: 2/5 up/down: 114/-3693 (-3579) function old new delta splice_direct_to_actor

Re: [PATCH 6/6] fs/splice: full support for compiling out splice

2014-11-22 Thread Josh Triplett
On Sat, Nov 22, 2014 at 10:00:01PM +0100, Pieter Smith wrote: Entirely compile out splice translation unit when the system is configured without splice family of syscalls (i.e. CONFIG_SYSCALL_SPLICE is undefined). add/remove: 0/25 grow/shrink: 0/5 up/down: 0/-4845 (-4845) Very nice! - Josh

Re: [PATCH 5/6] net/core: support compiling out splice

2014-11-22 Thread Josh Triplett
to prevent linking against the struct. Do you know of a better technique to get the same result? No, I don't. The approach you took seems fine; I'm just saying that you need to explain the need for it in the commit message. - JosH Triplett -- To unsubscribe from this list: send the line

Re: Fwd: [PATCH 1/1] init:add boot option "initramfs_packnum"

2014-11-20 Thread Josh Triplett
wrong approach to me. Rather than changing Linux to ignore excess data in the initramfs, could you change your bootloader to pass the true length of the initramfs to Linux? Even if you reserve extra space, if you know how much data you've actually included, you could have your bootloader pass that infor

Re: Fwd: [PATCH 1/1] init:add boot option initramfs_packnum

2014-11-20 Thread Josh Triplett
your bootloader to pass the true length of the initramfs to Linux? Even if you reserve extra space, if you know how much data you've actually included, you could have your bootloader pass that information to Linux. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux

Re: linux-next: manual merge of the tiny tree with the net-next tree

2014-11-17 Thread Josh Triplett
On Mon, Nov 17, 2014 at 04:35:03PM +1100, Stephen Rothwell wrote: > Hi Josh, > > Today's linux-next merge of the tiny tree got a conflict in > net/openvswitch/Kconfig between commit 8cd4313aa775 ("openvswitch: Fix > build failure") from the net-next tree and commit b043d487e255 ("lib: >

Re: linux-next: manual merge of the tiny tree with the net-next tree

2014-11-17 Thread Josh Triplett
On Mon, Nov 17, 2014 at 04:35:03PM +1100, Stephen Rothwell wrote: Hi Josh, Today's linux-next merge of the tiny tree got a conflict in net/openvswitch/Kconfig between commit 8cd4313aa775 (openvswitch: Fix build failure) from the net-next tree and commit b043d487e255 (lib: Conditionally

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-16 Thread Josh Triplett
in, you have *exactly* the same credentials as the target)? > Also, I much prefer a sysctl to a boot option. Boot options are nasty > to configure in many distributions. Agreed. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the b

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-16 Thread Josh Triplett
t that > this option exists, and when/if we want to make it the default, so > it's perfectly clear and transparent to all what is happening. An option sounds sensible to me. I think a sysctl makes more sense, though. I'll add one in v4. What did you have in mind about the shell script? Som

Re: [PATCH 51/56] drivers/char/mem: support compiling out splice

2014-11-16 Thread Josh Triplett
rt: > fs/splice: > syscalls only: add/remove: 0/16 grow/shrink: 2/5 up/down: 114/-3693 > (-3579) > the remainder: add/remove: 0/24 grow/shrink: 0/4 up/down: 0/-4824 > (-4824) Nice! Go ahead and submit the patches for that portion, and the rest can wait until we get compile

Re: [PATCH 51/56] drivers/char/mem: support compiling out splice

2014-11-16 Thread Josh Triplett
/remove: 0/16 grow/shrink: 2/5 up/down: 114/-3693 (-3579) the remainder: add/remove: 0/24 grow/shrink: 0/4 up/down: 0/-4824 (-4824) Nice! Go ahead and submit the patches for that portion, and the rest can wait until we get compiler support for omitting structure fields. - Josh Triplett

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-16 Thread Josh Triplett
sense, though. I'll add one in v4. What did you have in mind about the shell script? Something like: grep -r !% /etc/sudoers /etc/sudoers.d ? - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-16 Thread Josh Triplett
to configure in many distributions. Agreed. - Josh Triplett -- 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

Re: [PATCH] Add supplementary UIDs, and getusers/setusers system calls

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 11:08:31PM -0800, Josh Triplett wrote: > asmlinkage long sys_setgroups(int gidsetsize, gid_t __user *grouplist); > +asmlinkage long sys_setusers(int uidsetsize, uid_t __user *grouplist); Obvious typo here: s/grouplist/userlist/. Will fix in a v2, but I'll wait for

[PATCH manpages] Document supplementary user IDs

2014-11-15 Thread Josh Triplett
Add new manpages for getusers(2) and setusers(2). Discuss supplementary UIDs in credentials(7). Update manpages for seteuid(2), setfsuid(2), setresuid(2), setreuid(2), and setuid(2). Signed-off-by: Josh Triplett --- man2/getusers.2| 177

[PATCH] Add supplementary UIDs, and getusers/setusers system calls

2014-11-15 Thread Josh Triplett
t;setresuid 2"); if (setusers(5, list1) < 0) err(1, "setusers 5"); show_users(); return 0; } In this test, all but the last call to setusers succeeds; the last call fails with EPERM because the unprivileged process attempts to add UID 5 to the supplementary UID list, wh

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 09:08:07PM -0600, Eric W. Biederman wrote: > Josh Triplett writes: > > On November 15, 2014 6:05:11 PM PST, Theodore Ts'o wrote: > >>On Sat, Nov 15, 2014 at 12:20:42PM -0800, Josh Triplett wrote: > >>> > However, sudoers seems to allow

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 10:40:06PM -0500, Theodore Ts'o wrote: > On Sat, Nov 15, 2014 at 06:35:05PM -0800, Josh Triplett wrote: > > >So arbitrarily anyone to drop groups from their supplemental group > > >list will result in a change from both existing practice and leg

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On November 15, 2014 6:05:11 PM PST, Theodore Ts'o wrote: >On Sat, Nov 15, 2014 at 12:20:42PM -0800, Josh Triplett wrote: >> > However, sudoers seems to allow negative group matches. So maybe >> > allowing this only with no_new_privs already set would make sense. >>

[PATCHv3 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett --- v2, v3: No changes to patch 1/2. kernel/groups.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions

[PATCH] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett --- v3: Document use of gid/egid/sgid. v2: Document requirement for no_new_privs. (If this doesn't end up going into 3.18, the version number in the patch will need updating.) man2/getgroups.2 | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

[PATCHv3 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
n 0; } Without this patch, the test program gets EPERM from the second setgroups call, after dropping root privileges. With this patch, the test program successfully drops groups 1 and 5, but then gets EPERM from the third setgroups call, since that call attempts to add groups the process does n

[PATCHv2 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
second setgroups call, after dropping root privileges. With this patch, the test program successfully drops groups 1 and 5, but then gets EPERM from the third setgroups call, since that call attempts to add groups the process does not currently have. Signed-off-by: Josh Triplett --- v2: Require

[PATCHv2 manpages] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett --- v2: Document requirement for no_new_privs. (If this doesn't end up going into 3.18, the version number in the patch will need updating.) man2/getgroups.2 | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man2/getgroups.2 b/man2/getgroups

[PATCHv2 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett --- kernel/groups.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/groups.c b

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 12:06:20PM -0800, Andy Lutomirski wrote: > On Sat, Nov 15, 2014 at 11:29 AM, Josh Triplett wrote: > > On Sat, Nov 15, 2014 at 09:37:27AM -0600, Eric W. Biederman wrote: > >> Josh Triplett writes: > >> > >> > Currently, unprivilege

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 09:37:27AM -0600, Eric W. Biederman wrote: > Josh Triplett writes: > > > Currently, unprivileged processes (without CAP_SETGID) cannot call > > setgroups at all. In particular, processes with a set of supplementary > > groups cannot further

[PATCH manpages] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett --- This should probably also include appropriate documentation for what kernel introduces this behavior. man2/getgroups.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man2/getgroups.2 b/man2/getgroups.2 index 373c204..edca37c 100644

[PATCH 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett --- kernel/groups.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/groups.c b

[PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
program successfully drops groups 1 and 5, but then gets EPERM from the third setgroups call, since that call attempts to add groups the process does not currently have. Signed-off-by: Josh Triplett --- kernel/groups.c | 33 ++--- kernel/uid16.c | 2 -- 2 files c

[PATCH 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett j...@joshtriplett.org --- kernel/groups.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
attempts to add groups the process does not currently have. Signed-off-by: Josh Triplett j...@joshtriplett.org --- kernel/groups.c | 33 ++--- kernel/uid16.c | 2 -- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/kernel/groups.c b/kernel/groups.c index

[PATCH manpages] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett j...@joshtriplett.org --- This should probably also include appropriate documentation for what kernel introduces this behavior. man2/getgroups.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man2/getgroups.2 b/man2/getgroups.2 index 373c204

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 09:37:27AM -0600, Eric W. Biederman wrote: Josh Triplett j...@joshtriplett.org writes: Currently, unprivileged processes (without CAP_SETGID) cannot call setgroups at all. In particular, processes with a set of supplementary groups cannot further drop permissions

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 12:06:20PM -0800, Andy Lutomirski wrote: On Sat, Nov 15, 2014 at 11:29 AM, Josh Triplett j...@joshtriplett.org wrote: On Sat, Nov 15, 2014 at 09:37:27AM -0600, Eric W. Biederman wrote: Josh Triplett j...@joshtriplett.org writes: Currently, unprivileged processes

[PATCHv2 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett j...@joshtriplett.org --- kernel/groups.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCHv2 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
EPERM from the third setgroups call, since that call attempts to add groups the process does not currently have. Signed-off-by: Josh Triplett j...@joshtriplett.org --- v2: Require no_new_privs. kernel/groups.c | 34 +++--- kernel/uid16.c | 2 -- 2 files changed, 31

[PATCHv2 manpages] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett j...@joshtriplett.org --- v2: Document requirement for no_new_privs. (If this doesn't end up going into 3.18, the version number in the patch will need updating.) man2/getgroups.2 | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man2

[PATCHv3 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
, the test program successfully drops groups 1 and 5, but then gets EPERM from the third setgroups call, since that call attempts to add groups the process does not currently have. Signed-off-by: Josh Triplett j...@joshtriplett.org --- v3: Allow gid, egid, or sgid. v2: Require no_new_privs. kernel

[PATCH] getgroups.2: Document unprivileged setgroups calls

2014-11-15 Thread Josh Triplett
Signed-off-by: Josh Triplett j...@joshtriplett.org --- v3: Document use of gid/egid/sgid. v2: Document requirement for no_new_privs. (If this doesn't end up going into 3.18, the version number in the patch will need updating.) man2/getgroups.2 | 11 +-- 1 file changed, 9 insertions

[PATCHv3 1/2] groups: Factor out a function to set a pre-sorted group list

2014-11-15 Thread Josh Triplett
This way, functions that already need to sort the group list need not do so twice. The new set_groups_sorted is intentionally not exported. Signed-off-by: Josh Triplett j...@joshtriplett.org --- v2, v3: No changes to patch 1/2. kernel/groups.c | 16 +--- 1 file changed, 13

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On November 15, 2014 6:05:11 PM PST, Theodore Ts'o ty...@mit.edu wrote: On Sat, Nov 15, 2014 at 12:20:42PM -0800, Josh Triplett wrote: However, sudoers seems to allow negative group matches. So maybe allowing this only with no_new_privs already set would make sense. Sigh, bad sudo. Sure

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 10:40:06PM -0500, Theodore Ts'o wrote: On Sat, Nov 15, 2014 at 06:35:05PM -0800, Josh Triplett wrote: So arbitrarily anyone to drop groups from their supplemental group list will result in a change from both existing practice and legacy Unix systems, and it could

Re: [PATCH 2/2] groups: Allow unprivileged processes to use setgroups to drop groups

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 09:08:07PM -0600, Eric W. Biederman wrote: Josh Triplett j...@joshtriplett.org writes: On November 15, 2014 6:05:11 PM PST, Theodore Ts'o ty...@mit.edu wrote: On Sat, Nov 15, 2014 at 12:20:42PM -0800, Josh Triplett wrote: However, sudoers seems to allow negative

[PATCH manpages] Document supplementary user IDs

2014-11-15 Thread Josh Triplett
Add new manpages for getusers(2) and setusers(2). Discuss supplementary UIDs in credentials(7). Update manpages for seteuid(2), setfsuid(2), setresuid(2), setreuid(2), and setuid(2). Signed-off-by: Josh Triplett j...@joshtriplett.org --- man2/getusers.2| 177

[PATCH] Add supplementary UIDs, and getusers/setusers system calls

2014-11-15 Thread Josh Triplett
call to setusers succeeds; the last call fails with EPERM because the unprivileged process attempts to add UID 5 to the supplementary UID list, which it does not currently have. Signed-off-by: Josh Triplett j...@joshtriplett.org --- arch/x86/syscalls/syscall_32.tbl | 2 + arch/x86/syscalls

Re: [PATCH] Add supplementary UIDs, and getusers/setusers system calls

2014-11-15 Thread Josh Triplett
On Sat, Nov 15, 2014 at 11:08:31PM -0800, Josh Triplett wrote: asmlinkage long sys_setgroups(int gidsetsize, gid_t __user *grouplist); +asmlinkage long sys_setusers(int uidsetsize, uid_t __user *grouplist); Obvious typo here: s/grouplist/userlist/. Will fix in a v2, but I'll wait for other

Re: linux-next: build warnings after merge of the tiny tree

2014-11-14 Thread Josh Triplett
timex __user *utp, struct timex > *txc) > ^ > > Introduced by commit 7beb114f18e0 ("kernel: time: Compile out NTP > support"). Neither of these functions is needed if CONFIG_NTP is not > set. Fixed. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe

Re: linux-next: build warnings after merge of the tiny tree

2014-11-14 Thread Josh Triplett
7beb114f18e0 (kernel: time: Compile out NTP support). Neither of these functions is needed if CONFIG_NTP is not set. Fixed. - Josh Triplett -- 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: linux-next: manual merge of the tiny tree with Linus' tree

2014-11-10 Thread Josh Triplett
rhashtable: Make rhashtable.c > optional") from the tiny tree. > > I fixed it up (see below) and can carry the fix as necessary (no action > is required). This resolution looks correct to me. - Josh Triplett > diff --cc net/Kconfig > index 99815b5454bf,02badd46823f.

Re: linux-next: manual merge of the akpm-current tree with the tiny tree

2014-11-10 Thread Josh Triplett
79b518a3 ("lib: Add CRC64 > ECMA module") from the akpm-current tree. > > I fixed it up (see below) and can carry the fix as necessary (no action > is required). Looks good. - Josh Triplett > diff --cc lib/Kconfig > index b8c97f05140d,2faf7b2de5b3.. > --

Re: linux-next: manual merge of the tiny tree with the net-next tree

2014-11-10 Thread Josh Triplett
b79ef ("lib: > rhashtable: Make rhashtable.c optional") from the tiny tree. > > I fixed it up (see below) and can carry the fix as necessary (no action > is required). This resolution looks correct to me. - Josh Triplett > diff --cc lib/Makefile > index 04e53dd

Re: linux-next: build failure after merge of the tiny tree

2014-11-10 Thread Josh Triplett
On Sun, Nov 09, 2014 at 11:56:04PM -0800, Josh Triplett wrote: > On Mon, Nov 10, 2014 at 06:17:16PM +1100, Stephen Rothwell wrote: > > Hi Josh, > > > > After merging the tiny tree, today's linux-next build (powerpc64 > > allnoconfig) > > failed like this: > &

Re: linux-next: build failure after merge of the tiny tree

2014-11-10 Thread Josh Triplett
On Sun, Nov 09, 2014 at 11:56:04PM -0800, Josh Triplett wrote: On Mon, Nov 10, 2014 at 06:17:16PM +1100, Stephen Rothwell wrote: Hi Josh, After merging the tiny tree, today's linux-next build (powerpc64 allnoconfig) failed like this: arch/powerpc/kernel/built-in.o: In function

Re: linux-next: manual merge of the tiny tree with the net-next tree

2014-11-10 Thread Josh Triplett
rhashtable.c optional) from the tiny tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). This resolution looks correct to me. - Josh Triplett diff --cc lib/Makefile index 04e53dd16070,47b8305288e2.. --- a/lib/Makefile +++ b/lib/Makefile

Re: linux-next: manual merge of the akpm-current tree with the tiny tree

2014-11-10 Thread Josh Triplett
module) from the akpm-current tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). Looks good. - Josh Triplett diff --cc lib/Kconfig index b8c97f05140d,2faf7b2de5b3.. --- a/lib/Kconfig +++ b/lib/Kconfig @@@ -186,9 -180,13 +186,16

Re: linux-next: manual merge of the tiny tree with Linus' tree

2014-11-10 Thread Josh Triplett
) from the tiny tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). This resolution looks correct to me. - Josh Triplett diff --cc net/Kconfig index 99815b5454bf,02badd46823f.. --- a/net/Kconfig +++ b/net/Kconfig @@@ -6,7 -6,8 +6,8

Re: linux-next: build failure after merge of the tiny tree

2014-11-09 Thread Josh Triplett
clear why that build failure didn't show up on x86. Looks like the two compat syscalls need cond_syscall lines as well. I'll add those to the patch. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kern

Re: linux-next: build failure after merge of the tiny tree

2014-11-09 Thread Josh Triplett
like the two compat syscalls need cond_syscall lines as well. I'll add those to the patch. - Josh Triplett -- 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 v5 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-08 Thread Josh Triplett
On Sat, Nov 08, 2014 at 12:49:29PM -0800, Joe Perches wrote: > On Sat, 2014-11-08 at 11:01 -0800, Josh Triplett wrote: > > On Sat, Nov 08, 2014 at 08:37:27PM +0200, Oded Gabbay wrote: > > > CREDITS | 7 +++ > > > MAINTAINERS | 10 ++ > >

Re: [PATCH] scripts/ksize: Add kernel build size report

2014-11-08 Thread Josh Triplett
> > Signed-off-by: Darren Hart > Cc: Josh Triplett One comment below; with that addressed: Reviewed-by: Josh Triplett > +def main(argv): > +try: > +opts, args = getopt.getopt(argv[1:], "dh", ["help"]) > +except getopt.GetoptError

Re: [PATCH v5 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-08 Thread Josh Triplett
hemselves to the MAINTAINERS file (perhaps in the same entry as get_maintainer.pl), so that get_maintainer.pl does not fall back to git history for them? - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [PATCH v5 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-08 Thread Josh Triplett
file (perhaps in the same entry as get_maintainer.pl), so that get_maintainer.pl does not fall back to git history for them? - Josh Triplett -- 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: [PATCH] scripts/ksize: Add kernel build size report

2014-11-08 Thread Josh Triplett
dvh...@linux.intel.com Cc: Josh Triplett j...@joshtriplett.org One comment below; with that addressed: Reviewed-by: Josh Triplett j...@joshtriplett.org +def main(argv): +try: +opts, args = getopt.getopt(argv[1:], dh, [help]) +except getopt.GetoptError, err: +print

Re: [PATCH v5 06/24] Update MAINTAINERS and CREDITS files with amdkfd info

2014-11-08 Thread Josh Triplett
On Sat, Nov 08, 2014 at 12:49:29PM -0800, Joe Perches wrote: On Sat, 2014-11-08 at 11:01 -0800, Josh Triplett wrote: On Sat, Nov 08, 2014 at 08:37:27PM +0200, Oded Gabbay wrote: CREDITS | 7 +++ MAINTAINERS | 10 ++ 2 files changed, 17 insertions(+) Given

Re: [PATCH] lib/flex_array: make build optional

2014-11-06 Thread Josh Triplett
e this to the user via Kconfig? > > > > > > No sane person would even turn it on if they don't need it. > > > > IOW, I think you should just make it: > > > > config FLEX_ARRAY > > def_bool n > > Joe Pershes complained on a similar

Re: [PATCH] lib/flex_array: make build optional

2014-11-06 Thread Josh Triplett
it default to 'n'. Will rework the patches this way. https://git.kernel.org/cgit/linux/kernel/git/josh/linux.git/commit/?h=tiny/unflex-arrayid=6631d5fb4cf395ebd2dc0f2da05525b9d3436a3f Already done. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] CodingStyle: Add a chapter on conditional compilation

2014-11-03 Thread Josh Triplett
On Mon, Nov 03, 2014 at 09:47:40AM -0800, Joe Perches wrote: > On Mon, 2014-11-03 at 11:46 -0500, Jonathan Corbet wrote: > > On Wed, 29 Oct 2014 11:15:17 -0700 > > Josh Triplett wrote: > > > > > Document several common practices and conventions regarding condi

Re: [PATCH] compiler: Correct macro parameter expansion problem

2014-11-03 Thread Josh Triplett
gt; > Signed-off-by: Mark Rustad > Tested-by: Aaron Brown > Signed-off-by: Jeff Kirsher Good catch. Reviewed-by: Josh Triplett > include/linux/compiler.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/compiler.h b/in

Re: [PATCH v4 10/10] x86: Support compiling out userspace IO (iopl and ioperm)

2014-11-03 Thread Josh Triplett
On Mon, Nov 03, 2014 at 12:10:49PM +, One Thousand Gnomes wrote: > On Sun, 2 Nov 2014 09:33:01 -0800 > Josh Triplett wrote: > > > On the vast majority of modern systems, no processes will use the > > userspsace IO syscalls, iopl and ioperm. Add a new config option,

<    4   5   6   7   8   9   10   11   12   13   >