cpuset cleanup race

2016-04-26 Thread Ulrich Drepper
I came across a problem with code which uses a cpuset CG and tries to be responsible and clean up after itself. The code attached at the bottom illustrates the problem. It's only long because it has no dependencies aside from the basic runtime and should work on all machines. You need to run it

Re: NUMA node information for pages

2014-04-07 Thread Ulrich Drepper
On Mon, Mar 31, 2014 at 9:24 PM, Naoya Horiguchi wrote: > The information about "pfn-node" mapping seldom (or never) changes after boot, > so it seems better to me that adding a new interface somewhere under > /sys/devices/system/node/nodeN which shows pfn range of a given node. > If this doesn't

NUMA node information for pages

2014-03-31 Thread Ulrich Drepper
ation. If this is correct, could the attached patch be considered? It's really simple and follows the same line as the kpageflags file. Signed-off-by: Ulrich Drepper Documentation/vm/pagemap.txt |3 ++ fs/proc/page.c | 50 +++ 2 fi

Re: [RFC] apparently broken RLIMIT_CORE

2013-10-06 Thread Ulrich Drepper
On Sun, Oct 6, 2013 at 4:42 PM, Linus Torvalds wrote: > I doubt it is intentional, but I also cannot really feel that we care > deeply. Afaik we don't really honor the size limit exactly anyway, ie > we tend to check only at page boundaries etc. So do we really care? I could imagine in the case A

[PATCH] perf: remove duplicate block from Makefile

2013-10-05 Thread Ulrich Drepper
This looks like a merge error, the code is duplicated with the first copy doing something else as well. Just remove the second block. Signed-off-by: Ulrich Drepper Makefile |8 1 file changed, 8 deletions(-) Index: perf/config/Makefile

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Sat, Mar 2, 2013 at 10:09 PM, Eric Dumazet wrote: > > Using non blocking IO means the sender (and the receiver) must be able > to perform several operations, as long as the whole transfert is not > finished. Certainly, and this is implemented. But the receiver never gets the rest of the data

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet wrote: > I don't understand the issue. > > sendfile() returns -EAGAIN only if no bytes were copied to the socket. There is something wrong/unexpected/... I have a program which can use either sendfile or send. When using sendfile to transmit a large

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Wed, Jan 16, 2013 at 9:25 AM, Jiri Olsa wrote: > I was thinking having config files (global and arch specific) > comming with perf having predefined formulas. All the more reason to not mention the file name or really any source for the definition of the formula in the name, > 1) -e 'ratio/

Re: [RFC 0/4] perf tool: Adding ratios support

2013-01-16 Thread Ulrich Drepper
On Tue, Jan 15, 2013 at 8:39 AM, Jiri Olsa wrote: > $ perf stat -f formula.conf:cpi kill > usage: kill [ -s signal | -p ] [ -a ] pid ... > kill -l [ signal ] I do like this proposal. The only comment I have is that perhaps the command line syntax isn't ideal. What you use above is

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 5:06 PM, Kirill A. Shutemov wrote: > They are bugs. > > Let's fix strerror_r() usage. > > Signed-off-by: Kirill A. Shutemov Acked-by: Ulrich Drepper -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 4:31 PM, Kirill A. Shutemov wrote: > + const char *err = strerror_r(errnum, buf, buflen); > + > + if (err != buf && buflen > 0) { > + size_t len = strlen(err); > + char *c = mempcpy(buf, err, min(buflen

Re: [PATCH 2/2] perf: use XSI-complaint version of strerror_r() instead of GNU-specific

2012-07-23 Thread Ulrich Drepper
On Mon, Jul 23, 2012 at 11:00 AM, Kirill A. Shutemov wrote: > The right way to fix it is to switch to XSI-compliant version. And why exactly would this be "the right way"? Just fix the use of strerror_r or use strerror_l. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCHv3 0/3] perf tool: Add new event group management

2012-07-18 Thread Ulrich Drepper
On Wed, Jul 18, 2012 at 6:21 AM, Jiri Olsa wrote: > Well, I personally like the '{}' syntax more than '--group-events or > --group-reads > option in front', it feels more user friendly.. anyway, we can easily have > both ways. I like the actual visual grouping better, too. Also, it doesn't req

Re: [PATCH] RUSAGE_THREAD

2008-01-18 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland McGrath wrote: > +#define RUSAGE_LWP RUSAGE_THREAD /* Solaris name for same */ No need to clutter the kernel header with this, it'll be in the libc header. Aside from that: Acked-by: Ulrich Drepper <[EMAI

Re: [RFC] Per-thread getrusage

2008-01-17 Thread Ulrich Drepper
alled) is the only usage then the syscall should require that the TID parameter is from a thread in the same process which would solve the security problem. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) i

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
s like "sys_indirect adds parameters" are not really contested. Yes, that's what sys_indirect does. So what? It does this with almost no cost which outweighs the ugliness factor in my book. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-26 Thread Ulrich Drepper
e sys_indirect approach ain't pretty but it does it jobs, doesn't impact performance, and is expandable in direction we *know* we will want to go very soon. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-24 Thread Ulrich Drepper
On Nov 24, 2007 12:28 AM, Eric Dumazet <[EMAIL PROTECTED]> wrote: > OK, but maybe for consistency, we might accept the two mechanisms. It's not a question of the kernel interface. The issue with all these extensions is the userlevel interface. Ideally no new userlevel interface is needed. This

Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-23 Thread Ulrich Drepper
es could you remind it to me ? No security issue. But look at any correct network program, all need to set the mode to non-blocking. Adding this support to the syscall comes at almost no cost and it cuts the cost for every program down by one or two syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 4

Re: Where is the new timerfd?

2007-11-23 Thread Ulrich Drepper
On Nov 23, 2007 9:29 AM, Davide Libenzi <[EMAIL PROTECTED]> wrote: > Yes, it's disabled, and yes, I'll repost today ... I haven't seen the patch and don't feel like searching. So I say it here: please mak sure you add a flags parameter to the system call itself (instead of adding it on as for eve

[PATCHv5 1/5] actual sys_indirect code

2007-11-20 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h | 17 + include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |3 +++ kernel/indirect.c| 40 +

[PATCHv5 0/5] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
CLOEXEC %s set\n", s4 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0 || t1 != 0 || t2 == 0 || s3 == 0 || s4 == 0; } Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> arch/x86/

[PATCHv5 2/5] x86&x86-64 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/Kconfig |3 ++ arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c | 38 + arch/x86/kernel/syscal

[PATCHv5 3/5] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. include/asm-x86/ia32_unistd.h |1 + include/linux/indirect.h | 27 +++ net/socket.

[PATCHv5 5/5] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-20 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6 +

[PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- linux/net/socket.c +++ linux/net/socket.c @@ -362,7 +362,7 @@ static int sock_alloc_fd

Re: 2.6.24-rc3: find complains about /proc/net

2007-11-20 Thread Ulrich Drepper
emantics seems to be more useful. So I guess, no change is the way to go here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
nterface is sufficiently prepared for this and that there is no need to wait adding this initial, synchronous syscall stuff before the syslet stuff is ready. These interface changes are security-relevant and should be added ASAP. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ ---

Re: [PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-20 Thread Ulrich Drepper
ut all members added to the structure can and should be neutral of the word size. We've done this with some syscalls already (like pread64) where we always use the wide form in the parameter list. It's just more simple here since it does not have to split into two 32-bit registers. - -

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
#x27;ll find that I explained this. I talked to Andrew and he favored new syscalls. But then I talked to Linus and he favored this approach. Probably especially because it can be used for syslets as well. And it is less code and data than introducing new syscalls. - -- ➧ Ulrich Drepper ➧ Red Hat, I

Re: [PATCHv4 2/6] x86&x86-64 support for sys_indirect

2007-11-20 Thread Ulrich Drepper
mber. That macro wasn't always available. I'll test it. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHQwdg2ijCOnn/RHQRAmh9AJ9EuthsaoupSHn3kR/x0cWxqR3FoQCfSbmE 8RIDWzPKZ6cv+QVGNl0faw

Re: [PATCHv4 0/6] sys_indirect system call

2007-11-20 Thread Ulrich Drepper
quot; flag. In the latter case an additional parameter might be needed to indicate the notification mechanism. > And no change in the test program reflecting this 'flags' new param, so > it fails. Yep, sorry, I didn't update the text by including the most recent test program. I

Re: [PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-20 Thread Ulrich Drepper
PARAM() macro get defined? I do not > see it being defined anywhere in these patches. Defined in : +#define INDIRECT_PARAM(set, name) current->indirect_params.set.name Not my idea, I was following one review comment. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View

[PATCHv4 4/6] Allow setting FD_CLOEXEC flag for new sockets

2007-11-19 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

[PATCHv4 1/6] actual sys_indirect code

2007-11-19 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36 +

[PATCHv4 5/6] Allow setting O_NONBLOCK flag for new sockets

2007-11-19 Thread Ulrich Drepper
This patch adds support for setting the O_NONBLOCK flag of the file descriptors returned by socket, socketpair, and accept. socket.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) --- net/socket.c +++ net/socket.c @@ -362,7 +362,7 @@ static int sock_alloc_fd(struct file

[PATCHv4 2/6] x86&x86-64 support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S |2 ++ arch/x86/ia32/sys_ia32.c | 31 +++ arch/x86/kernel/syscall_table_32.S |1 + include/asm-x86/indirect.h |5 + include/asm-x86/indirec

[PATCHv4 3/6] UML support for sys_indirect

2007-11-19 Thread Ulrich Drepper
This part adds support for sys_indirect for UML. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null +++ include/asm-um/indirect.h @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __UM_INDIRECT_H + +#include "asm/arch/indirect.h" + +#endif - To unsubscribe from this list: se

[PATCHv4 0/6] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
is"); close (fd); FILL_IN(r, __NR_eventfd, 8); fd = syscall (__NR_indirect, &r, &i, sizeof (i)); int s4 = fcntl (fd, F_GETFD); printf ("eventfd: FD_CLOEXEC %s set\n", s4 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0 || t1 !=

[PATCHv4 6/6] FD_CLOEXEC support for eventfd, signalfd, timerfd

2007-11-19 Thread Ulrich Drepper
This patch adds support to set the FD_CLOEXEC flag for the file descriptors returned by eventfd, signalfd, timerfd. fs/anon_inodes.c | 15 +++ fs/eventfd.c |5 +++-- fs/signalfd.c |6 -- fs/timerfd.c |6 +

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
e limited parameter number. Plus, using sys_indirect could in future be used to transport entire parameters (like a sigset_t) along with other information, thereby saving individual copy operations. I think the sys_indirect approach is the way forward. I'll submit a last version of the patch in a bit.

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
e good news is that user programs should never use this syscall directly (just like don't for existing ones). I see no problem at all here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-19 Thread Ulrich Drepper
in user code, and > only use the substructs for each function. There is no overhead introduced through the union. The only reason the union is there in the first place is to allocate sufficient data in task_struct to cover all cases. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mou

Re: [PATCHv3 0/4] sys_indirect system call

2007-11-18 Thread Ulrich Drepper
so much simpler. Overhead is only paid if you really need it which is rarely the case. Plus, you might have heard Linus and Zack talk about syslets again. Starting syslets can be done using the same interface, I guess. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View,

Re: [PATCH 0/4] sys_indirect system call

2007-11-17 Thread Ulrich Drepper
_indirect in the v3 patch. This should allow you to add additional functionality like syslets later. Currently a zero value is enforced. In future nonzero values could also imply that the function takes additional parameters. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View,

[PATCHv3 0/4] sys_indirect system call

2007-11-16 Thread Ulrich Drepper
%s set\n", s2 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0; } Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> arch/x86/ia32/Makefile |1 arch/x86/ia32/ia32entry.S |2 + arch/x86/ia32/sys_ia32.c

[PATCHv3 3/4] UML support for sys_indirect

2007-11-16 Thread Ulrich Drepper
This part adds support for sys_indirect for UML. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null +++ include/asm-um/indirect.h @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __UM_INDIRECT_H + +#include "asm/arch/indirect.h" + +#endif - To unsubscribe from this list: se

[PATCHv3 2/4] x86&x86-64 support for sys_indirect

2007-11-16 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S |2 ++ arch/x86/ia32/sys_ia32.c | 31 +++ arch/x86/kernel/syscall_table_32.S |1 + include/asm-x86/indirect.h |5 + include/asm-x86/indirec

[PATCHv3 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. arch/x86/ia32/Makefile|1 + arch/x86/ia32/sys_ia32.c |4 include/asm-x86/ia32_unistd.h |

[PATCHv3 1/4] actual sys_indirect code

2007-11-16 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. include/linux/indirect.h |6 ++ include/linux/sched.h|4 include/linux/syscalls.h |4 kernel/Makefile |2 +- kernel/indirect.c| 36 +

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
wrappers. But them to some good news after all. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHPeim2ijCOnn/RHQRAu8xAJsF/0Ir1

Re: [PATCHv2 4/4] first use of sys_indirect system call

2007-11-16 Thread Ulrich Drepper
ntimes/libraries can say something like that. Library writers don't have the luxury of being able to modify any global state. This has all been discussed here before. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7

Re: [PATCHv2 2/4] x86&x86-64 support for sys_indirect

2007-11-15 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric Dumazet wrote: > I am not sure how compat is handled ? (ie running a 32bit task in a > 64bit kernel) I already mentioned that I have a patch here. I'll test it first, though. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St

Re: [PATCH 0/4] sys_indirect system call

2007-11-15 Thread Ulrich Drepper
tched the x86-on-x86_64 support. I have a patch but need to patch it before I'll submit v3 of the patch set. If you want to work on the patch and get syslet support going, let me know, I'll send the latest version. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain Vi

Re: [PATCHv2 2/4] x86&x86-64 support for sys_indirect

2007-11-15 Thread Ulrich Drepper
ing you again. Sorry. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHPKkm2ijCOnn/RHQRAkY2AKCRfOhk5pUrYuTSMWnBBgu0Ou0fJACfQVz1 qzhRYyWgS1

Re: [PATCHv2 2/4] x86&x86-64 support for sys_indirect

2007-11-15 Thread Ulrich Drepper
7;ve retired the 32-bit machines around here. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHPKcp2ijCOnn/RHQRAjqMAKCL

[PATCHv2 2/4] x86&x86-64 support for sys_indirect

2007-11-15 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. arch/x86/ia32/ia32entry.S|1 + b/arch/x86/kernel/syscall_table_32.S |1 + b/include/asm-x86/indirect.h |5 + b/include/asm-x86/indirect_32.h | 23 +++ b/include/asm-x86/indire

[PATCHv2 0/4] sys_indirect system call

2007-11-15 Thread Ulrich Drepper
t\n", s2 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0; } ~~~~ Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> arch/x86/ia32/ia32entry.S |1 arch/x86/kernel/syscall_table_32.S |1 i

[PATCHv2 4/4] first use of sys_indirect system call

2007-11-15 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. socket.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) --- a/net/socket.c +++ b/net

[PATCHv2 3/4] x86&x86-64 UML support for sys_indirect

2007-11-15 Thread Ulrich Drepper
This part adds support for sys_indirect on UML on x86 and x86-64. indirect.h |6 ++ 1 file changed, 6 insertions(+) --- /dev/null 2007-09-23 16:36:38.465394704 -0700 +++ b/include/asm-um/indirect.h 2007-11-15 09:56:23.0 -0800 @@ -0,0 +1,6 @@ +#ifndef __UM_INDIRECT_H +#define __

[PATCHv2 1/4] actual sys_indirect code

2007-11-15 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. b/include/linux/indirect.h | 13 b/include/linux/syscalls.h |3 ++ b/kernel/Makefile |2 - b/kernel/indirect.c| 46 + include/l

[PATCH 3/4] x86&x86-64 UML support for sys_indirect

2007-11-15 Thread Ulrich Drepper
This part adds support for sys_indirect on UML on x86 and x86-64. b/arch/um/Makefile |2 +- b/include/asm-um/indirect-i386.h |6 ++ b/include/asm-um/indirect-x86_64.h | 10 ++ 3 files changed, 17 insertions(+), 1 deletion(-) --- a/arch/um/Makefile +++ b/a

[PATCH 0/4] sys_indirect system call

2007-11-15 Thread Ulrich Drepper
O_IP); fd = syscall (__NR_indirect, &r, &i, sizeof (i)); int s2 = fcntl (fd, F_GETFD); printf ("new: FD_CLOEXEC %s set\n", s2 == 0 ? "not" : "is"); close (fd); return s1 != 0 || s2 == 0; } ~~~~

[PATCH 4/4] first use of sys_indirect system call

2007-11-15 Thread Ulrich Drepper
This is a first user of sys_indirect. Several of the socket-related system calls which produce a file handle now can be passed an additional parameter to set the FD_CLOEXEC flag. socket.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) --- a/net/socket.c +++ b/ne

[PATCH 1/4] actual sys_indirect code

2007-11-15 Thread Ulrich Drepper
This is the actual architecture-independent part of the system call implementation. b/include/linux/indirect.h | 13 + b/include/linux/syscalls.h |3 +++ b/kernel/Makefile |2 +- b/kernel/indirect.c| 25 + b/include/linux/sched.h

[PATCH 2/4] x86&x86-64 support for sys_indirect

2007-11-15 Thread Ulrich Drepper
This part adds support for sys_indirect on x86 and x86-64. b/arch/x86/ia32/ia32entry.S |1 + b/arch/x86/kernel/syscall_table_32.S |1 + b/include/asm-x86/indirect.h |5 + b/include/asm-x86/indirect_32.h | 27 +++ b/include/asm-x86/in

Re: 2.6.24-rc2-mm1

2007-11-13 Thread Ulrich Drepper
use it but only if you compile for compatibility with kernels before 2.6.2. Nobody should need to need such backward compatibility. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using Gn

Re: compat_sys_times() bogus until jiffies >= 0.

2007-11-09 Thread Ulrich Drepper
ammers should ever only require what the standard guarantees. I am perfectly willing to support a solution where the time is measured from process startup time. The only code using times() I found is cross-platform and most likely does not depend on the value returned is usable in isolation (o

Re: [patch] PID namespace design bug, workaround

2007-11-02 Thread Ulrich Drepper
ssary in this case and will only cause support problems for innocent people. I bet the result will be that if you have a separate PID namespace you need to enforce every other namespace as well. There are simply too many dependencies. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St

Re: [patch] PID namespace design bug, workaround

2007-11-02 Thread Ulrich Drepper
sue. And I doubt that I spent enough time thinking about all this to arrive at the more subtle problems. I don't think especially the PID namespace is ready at all at this time. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE

Re: [patch] PID namespace design bug, workaround

2007-11-02 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pavel Emelyanov wrote: >> Isn't it this? >> >> http://lkml.org/lkml/2007/11/1/141 > > That was the initial problem, and I already answered to Ingo about > it No, look at my old mail which Ingo referenced in that posti

Re: [patch] PID namespace design bug, workaround

2007-11-01 Thread Ulrich Drepper
via this simple patch. Until this issue is > resolved properly the new PID namespace code needs to be turned off. > Letting this into 2.6.24 would be a disaster. > > Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Acked-by: Ulrich Drepper <[EMAIL PROTECTED]> - -- ➧

Re: [patch] PID namespace design bug, workaround

2007-11-01 Thread Ulrich Drepper
k of a way to fix this PID namespaces are IMO not something which should go in at all. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHKm2R2ijCOnn/RHQRAgjXAKCkU9lcWC9aTR0nG89x47AZO9pVfwCgiaVC /Giy

Re: [patch] PID namespace design bug, workaround

2007-11-01 Thread Ulrich Drepper
> soon. You sound far too optimistic for my taste. I probably haven't seen the proposal you have in mind but everything else I have seen simply doesn't work without breaking something. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SI

Re: [patch] PID namespace design bug, workaround

2007-11-01 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ingo Molnar wrote: > + clone_flags &= ~CLONE_NEWPID; I think the call should rather fail than silently drop the bit but aside from that I agree. The problems we'd run into if the feature is getting used as-is are severe. - -- ➧ Ul

Re: OOM notifications

2007-10-18 Thread Ulrich Drepper
dling. You might want to give a process a second shot at handling SIGDANGER but after that's it's all about preparation for a shutdown. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux)

Re: F_DUPFD_CLOEXEC implementation

2007-09-28 Thread Ulrich Drepper
;d need this call anyway since neither dup nor dup2 provides the functionality of F_DUPFD (but F_DUPFD can be used to implement dup). For dup2() I will wait until we have a sys_indirect implementation. I'll try to get this soon. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mount

F_DUPFD_CLOEXEC implementation

2007-09-28 Thread Ulrich Drepper
;); return 1; } execl ("/proc/self/exe", "/proc/self/exe", "1", NULL); puts ("execl failed"); return 1; } ~~ Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> diff --git a/

Re: __kernel_vsyscall () hangs in SIGCHLD handler

2007-09-26 Thread Ulrich Drepper
On 9/26/07, John Z. Bohach <[EMAIL PROTECTED]> wrote: > Is there some reason that syslog() sleeps in __kernel_vsyscall() when > invoked from a signal handler? Only very few functions are allowed to be called from signal handlers. This is clearly spelled out in the POSIX spec. Section XSH 2.4.3 l

Re: follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
ut for IPv4/6 it's not an issue. Some implementations might handle all-zeros and the spec _currently_ calls for it. In this case an alignment would be good. I guess I'll just go ahead and file a problem report with the spec. Maybe the Unix vendors will test their implementations in

Re: follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
) > on UDP/RAW and it's certainly possible to connect() to that. Where do you get this from? And where is this implemented? I don't doubt it but I have to convince people to change the standard and possibly introduce incompatibility. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 4

Re: follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
F_UNSPEC But the spec calls for null address for the protocol. That means the family for the null address is the same as the family of the socket. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFG8WCO

Re: follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ulrich Drepper wrote: > Yes, but for IPv4/6 it's not an issue. Some implementations might > handle all-zeros and the spec _currently_ calls for it. In this case an > alignment would be good. Searching the web shows

Re: follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
socket, connect to one address, call connect with a "null address", then connect to another address (which likely has to use a different interface since otherwise the connect will just succeed, it seems). - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN

follow-up: discrepancy with POSIX

2007-09-19 Thread Ulrich Drepper
can point to other implementations doing the same as Linux) let me know and I'll work on getting the spec changed. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFG8T6L2ijCOnn/RHQRAnSRAJ9sXDGG9OepEQWQIna

Re: x86_64: vsyscall vs vdso

2007-09-18 Thread Ulrich Drepper
On 9/17/07, Francis Moreau <[EMAIL PROTECTED]> wrote: > Actually if we could easily retrieve the vdso in a process memory > mapping (through a new syscall or /proc/self/maps), it should be easy > for gcc/ld to statically links vdso functions into a statically linked > app, shouldn't it ? Nonsense.

Re: x86_64: vsyscall vs vdso

2007-09-17 Thread Ulrich Drepper
On 9/17/07, Francis Moreau <[EMAIL PROTECTED]> wrote: > Does that mean we'll need to keep 3 different implementations of gtod > in the kernel forever ? That's a question for the kernel maintainers to answer. > I think signal trampolines will still need them too. So making > vsyscalls configurabl

Re: Credentials test patch

2007-09-17 Thread Ulrich Drepper
On 9/17/07, David Howells <[EMAIL PROTECTED]> wrote: > A better way would be to compare fsuid/fsgid to uid/gid and to just take an > extra ref on the incumbent cred object if they're the same, rather than always > allocating a new one. That, I suspect, would speed up 99.99% of the cases. Indeed.

Re: x86_64: vsyscall vs vdso

2007-09-16 Thread Ulrich Drepper
On 9/16/07, Francis Moreau <[EMAIL PROTECTED]> wrote: > I'm a bit puzzled because vdso doesn't seem to be used on my fedora 7: > I just compiled a trivial program which just call gettimeofday() and > ld.so resolves this call with vsyscall's gettimeofday. > > Now I'm wondering when vdso is used, cou

Re: Credentials test patch

2007-09-15 Thread Ulrich Drepper
In sys_faccessat you temporarily allocate a cred object which is discarded in the end. With a few more macro definitions you could create a dup_cred variant which initialized an automatic variable of type struct cred. This way the kmalloc/kfree pair would fall away. access is actually used frequ

Re: O_CLOEXEC / MSG_CMSG_CLOEXEC documentation

2007-09-06 Thread Ulrich Drepper
On 9/5/07, Michael Kerrisk <[EMAIL PROTECTED]> wrote: > O_CLOEXEC (Since Linux 2.6.23) > Enable the close-on-exec flag for the new file > descriptor. This is useful in multithreaded programs > since using a separate fcntl(2) F_SETFD operation to >

Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc

2007-08-29 Thread Ulrich Drepper
ve a function pointer variable which either has the old vsyscall value or the address of the function in the vdso. Everything else is identical. Unless the interface of the vdso function is different (which it shouldn't) I don't think you can blame glibc. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc.

arch maintainers: define O_CLOEXEC correctly!

2007-08-03 Thread Ulrich Drepper
eeds value 01000 Sparc*: -"- 0x40 - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGs2E82ijCOnn/RHQRArC+AKCT+/od1qzfC8t7r6jobwd7WS5nOwCgqlzn ugozxlOLdgTVG0XMsJx0x7Q= =Pi

More documentation: system call how-to

2007-08-01 Thread Ulrich Drepper
ve added a few rules I could think of right now. What should be added as well is a rule for 64-bit parameters on 32-bit platforms. I leave this to the s390 people who have the biggest restrictions when it comes to this. Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> Rules for desi

[PATCH] tiny sched_getaffinity cleanup

2007-07-29 Thread Ulrich Drepper
Unless I'm missing something quite tricky here's another tiny cleanup. The generated code is not affected (gcc is smart enough) but for people looking over the code it is just irritating to have the extra conditional. Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> --

[PATCH] CPU online file permission

2007-07-29 Thread Ulrich Drepper
ectly implement the sysconf() function to return the number of online CPUs. In the presence of hotplug we currently cannot provide this information. The patch below should to it. Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> --- drivers/base/cpu.c 2007-02-20 12:01:31.0 -

[PATCH] tiny signalfd cleanup

2007-07-23 Thread Ulrich Drepper
This is probably a leftover from a time when the return wasn't there yet. Now the extra assignment is just irritating. Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> --- fs/signalfd.c 2007-06-29 10:24:04.0 -0700 +++ fs/signalfd.c-new 2007-07-23 20:17:34.

fallocate syscall interface defficiency

2007-07-23 Thread Ulrich Drepper
t = inode->i_op->fallocate(inode, mode, offset, len); else - - ret = -ENOSYS; + ret = -EOPNOTSUPP; out_fput: fput(file); - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -BEGIN PGP SIGNATURE- Version: GnuPG v

Fix compiling UML

2007-07-22 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The following patch is needed to get 2.6.23-rc1 to compile for UML on x86-64. Signed-off-by: Ulrich Drepper <[EMAIL PROTECTED]> diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index b126df4..9c70cb0 100644 - --- a/arch/um/os

Re: Regression with sys_time() speedup patch

2007-07-20 Thread Ulrich Drepper
On 7/20/07, Takashi Iwai <[EMAIL PROTECTED]> wrote: But, is it safe to introduce another variable different from xtime.tv_sec? Since xtime.tv_sec is referred in many other places, I'm afaid this may bring confusion... Perhaps not if they are changed. Somewhere where I cannot find them right n

  1   2   3   4   >