Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Tue, 20 Mar 2007, Oleg Nesterov wrote: > On 03/20, Oleg Nesterov wrote: > > > > On 03/19, Davide Libenzi wrote: > > > > > > I'd need a get_task_struct in any case in order to safely call > > > unlock_task_sighand(). At that point I'd prefer to just pass through the > > > struct pid*. I'll be

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/20, Oleg Nesterov wrote: > > On 03/19, Davide Libenzi wrote: > > > > I'd need a get_task_struct in any case in order to safely call > > unlock_task_sighand(). At that point I'd prefer to just pass through the > > struct pid*. I'll be posting the new version for review as soon as I > >

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/19, Davide Libenzi wrote: > > On Mon, 19 Mar 2007, Oleg Nesterov wrote: > > > On 03/19, Davide Libenzi wrote: > > > > > > On Mon, 19 Mar 2007, Eric W. Biederman wrote: > > > > > > > > +struct signalfd_ctx { > > > > > + struct list_head lnk; > > > > > + wait_queue_head_t wqh; > > >

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Oleg Nesterov wrote: > On 03/19, Davide Libenzi wrote: > > > > On Mon, 19 Mar 2007, Eric W. Biederman wrote: > > > > > > +struct signalfd_ctx { > > > > + struct list_head lnk; > > > > + wait_queue_head_t wqh; > > > > + sigset_t sigmask; > > > > +

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/19, Davide Libenzi wrote: > > On Mon, 19 Mar 2007, Eric W. Biederman wrote: > > > > +struct signalfd_ctx { > > > + struct list_head lnk; > > > + wait_queue_head_t wqh; > > > + sigset_t sigmask; > > > + struct task_struct *tsk; > > > +}; > > > > I think you want to use a struct pid *pid

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Eric W. Biederman wrote: > Davide Libenzi writes: > > > On Mon, 19 Mar 2007, Eric W. Biederman wrote: > > > >> Davide Libenzi writes: > >> > >> > struct signalfd_siginfo { > >> > __u32 signo;/* si_signo */ > >> > __s32 err; /* si_errno */ > >> > __s32 code;

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Eric W. Biederman
Davide Libenzi writes: > On Mon, 19 Mar 2007, Eric W. Biederman wrote: > >> Davide Libenzi writes: >> >> > struct signalfd_siginfo { >> >__u32 signo;/* si_signo */ >> >__s32 err; /* si_errno */ >> >__s32 code; /* si_code */ >> >__u32 pid; /* si_pid */ >> >

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Eric W. Biederman wrote: > Davide Libenzi writes: > > > struct signalfd_siginfo { > > __u32 signo;/* si_signo */ > > __s32 err; /* si_errno */ > > __s32 code; /* si_code */ > > __u32 pid; /* si_pid */ > > __u32 uid; /* si_uid */ >

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Eric W. Biederman
Davide Libenzi writes: > struct signalfd_siginfo { > __u32 signo;/* si_signo */ > __s32 err; /* si_errno */ > __s32 code; /* si_code */ > __u32 pid; /* si_pid */ > __u32 uid; /* si_uid */ > __s32 fd; /* si_fd */ > __u32 tid;

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Eric W. Biederman
Davide Libenzi davidel@xmailserver.org writes: struct signalfd_siginfo { __u32 signo;/* si_signo */ __s32 err; /* si_errno */ __s32 code; /* si_code */ __u32 pid; /* si_pid */ __u32 uid; /* si_uid */ __s32 fd; /* si_fd */

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Eric W. Biederman wrote: Davide Libenzi davidel@xmailserver.org writes: struct signalfd_siginfo { __u32 signo;/* si_signo */ __s32 err; /* si_errno */ __s32 code; /* si_code */ __u32 pid; /* si_pid */ __u32 uid; /*

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Eric W. Biederman
Davide Libenzi davidel@xmailserver.org writes: On Mon, 19 Mar 2007, Eric W. Biederman wrote: Davide Libenzi davidel@xmailserver.org writes: struct signalfd_siginfo { __u32 signo;/* si_signo */ __s32 err; /* si_errno */ __s32 code; /* si_code */ __u32 pid;

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Eric W. Biederman wrote: Davide Libenzi davidel@xmailserver.org writes: On Mon, 19 Mar 2007, Eric W. Biederman wrote: Davide Libenzi davidel@xmailserver.org writes: struct signalfd_siginfo { __u32 signo;/* si_signo */ __s32 err; /* si_errno */

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/19, Davide Libenzi wrote: On Mon, 19 Mar 2007, Eric W. Biederman wrote: +struct signalfd_ctx { + struct list_head lnk; + wait_queue_head_t wqh; + sigset_t sigmask; + struct task_struct *tsk; +}; I think you want to use a struct pid *pid instead of a pointer to the

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Mon, 19 Mar 2007, Oleg Nesterov wrote: On 03/19, Davide Libenzi wrote: On Mon, 19 Mar 2007, Eric W. Biederman wrote: +struct signalfd_ctx { + struct list_head lnk; + wait_queue_head_t wqh; + sigset_t sigmask; + struct task_struct *tsk;

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/19, Davide Libenzi wrote: On Mon, 19 Mar 2007, Oleg Nesterov wrote: On 03/19, Davide Libenzi wrote: On Mon, 19 Mar 2007, Eric W. Biederman wrote: +struct signalfd_ctx { + struct list_head lnk; + wait_queue_head_t wqh; + sigset_t sigmask; +

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Oleg Nesterov
On 03/20, Oleg Nesterov wrote: On 03/19, Davide Libenzi wrote: I'd need a get_task_struct in any case in order to safely call unlock_task_sighand(). At that point I'd prefer to just pass through the struct pid*. I'll be posting the new version for review as soon as I complete a few

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-19 Thread Davide Libenzi
On Tue, 20 Mar 2007, Oleg Nesterov wrote: On 03/20, Oleg Nesterov wrote: On 03/19, Davide Libenzi wrote: I'd need a get_task_struct in any case in order to safely call unlock_task_sighand(). At that point I'd prefer to just pass through the struct pid*. I'll be posting the new

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Davide Libenzi
On Mon, 19 Mar 2007, Arnd Bergmann wrote: > On Sunday 18 March 2007, Davide Libenzi wrote: > > bah, __put_user is basically a move, so I don't think that efficency would > > be that different (assuming that it'd matter in this case). The only thing > > many __put_user do, is increase the

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Arnd Bergmann
On Sunday 18 March 2007, Davide Libenzi wrote: > bah, __put_user is basically a move, so I don't think that efficency would > be that different (assuming that it'd matter in this case). The only thing > many __put_user do, is increase the exception table sizes. The cost of user access functions

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Davide Libenzi
On Sat, 17 Mar 2007, Arnd Bergmann wrote: > > +asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t > > sizemask) +{ > > + int error; > > + unsigned long flags; > > + sigset_t sigmask; > > + struct signalfd_ctx *ctx; > > + struct sighand_struct *sighand; > > +

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Davide Libenzi
On Sat, 17 Mar 2007, Arnd Bergmann wrote: +asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask) +{ + int error; + unsigned long flags; + sigset_t sigmask; + struct signalfd_ctx *ctx; + struct sighand_struct *sighand; + struct file *file;

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Arnd Bergmann
On Sunday 18 March 2007, Davide Libenzi wrote: bah, __put_user is basically a move, so I don't think that efficency would be that different (assuming that it'd matter in this case). The only thing many __put_user do, is increase the exception table sizes. The cost of user access functions

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-18 Thread Davide Libenzi
On Mon, 19 Mar 2007, Arnd Bergmann wrote: On Sunday 18 March 2007, Davide Libenzi wrote: bah, __put_user is basically a move, so I don't think that efficency would be that different (assuming that it'd matter in this case). The only thing many __put_user do, is increase the exception

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Stephen Rothwell
On Sat, 17 Mar 2007 22:35:08 +0100 Arnd Bergmann <[EMAIL PROTECTED]> wrote: > > sizeof(sigset_t) may be different for native and 32-bit compat code. > It would be good if you could handle sizemask==4 && sizeof(sigset_t)==8 > in this code, so that there is no need for an extra compat_sys_signalfd >

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Arnd Bergmann
On Saturday 17 March 2007 22:35:08 Arnd Bergmann wrote: > Also, what's the reasoning behind defining a new structure > instead of just returning siginfo_t? Sure siginfo_t is ugly > but it is a well-defined structure and users already deal > with the problems it causes. Ok, found the answer

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Arnd Bergmann
On Friday 16 March 2007 01:22:15 Davide Libenzi wrote: > + > +static struct sighand_struct *signalfd_get_sighand(struct signalfd_ctx > *ctx, + unsigned long > *flags); > +static void signalfd_put_sighand(struct signalfd_ctx *ctx, > +

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Arnd Bergmann
On Friday 16 March 2007 01:22:15 Davide Libenzi wrote: + +static struct sighand_struct *signalfd_get_sighand(struct signalfd_ctx *ctx, + unsigned long *flags); +static void signalfd_put_sighand(struct signalfd_ctx *ctx, +

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Arnd Bergmann
On Saturday 17 March 2007 22:35:08 Arnd Bergmann wrote: Also, what's the reasoning behind defining a new structure instead of just returning siginfo_t? Sure siginfo_t is ugly but it is a well-defined structure and users already deal with the problems it causes. Ok, found the answer myself,

Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-17 Thread Stephen Rothwell
On Sat, 17 Mar 2007 22:35:08 +0100 Arnd Bergmann [EMAIL PROTECTED] wrote: sizeof(sigset_t) may be different for native and 32-bit compat code. It would be good if you could handle sizemask==4 sizeof(sigset_t)==8 in this code, so that there is no need for an extra compat_sys_signalfd

[patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-15 Thread Davide Libenzi
This patch series implements the new signalfd() system call. I took part of the original Linus code (and you know how badly it can be broken :), and I added even more breakage ;) Signals are fetched from the same signal queue used by the process, so signalfd will compete with standard kernel

[patch 2/13] signal/timer/event fds v6 - signalfd core ...

2007-03-15 Thread Davide Libenzi
This patch series implements the new signalfd() system call. I took part of the original Linus code (and you know how badly it can be broken :), and I added even more breakage ;) Signals are fetched from the same signal queue used by the process, so signalfd will compete with standard kernel