mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [patch 2/13] signal/timer/event fds v6 - signalfd core ...
Date: Mon, 19 Mar 2007 12:11:01 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703191209100.2101@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <m11wjlxd91.fsf@ebiederm.dsl.xmission.com>

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 */
> >> > 	__s32 code;	/* si_code */
> >> > 	__u32 pid;	/* si_pid */
> >> > 	__u32 uid;	/* si_uid */
> >> > 	__s32 fd;	/* si_fd */
> >> > 	__u32 tid;	/* si_fd */  
> >> > 	__u32 band;	/* si_band */
> >> > 	__u32 overrun;	/* si_overrun */
> >> > 	__u32 trapno;	/* si_trapno */
> >> > 	__s32 status;	/* si_status */
> >> > 	__s32 svint;	/* si_int */
> >> > 	__u64 svptr;	/* si_ptr */
> >> > 	__u64 utime;	/* si_utime */
> >> > 	__u64 stime;	/* si_stime */
> >> > 	__u64 addr;	/* si_addr */
> >> > };
> >> 
> >> Shouldn't we pad this to 128 bytes like we do siginfo in case there are
> >> more fields we need to include, or we need to extend the size of some
> >> field?
> >
> > Yes, I guess we can.
> 
> I'm just a little paranoid about ABI's.  There is always something
> that crops up.  And while we can probably cope by simply having another
> version of the signalfd or whatever your syscall is, but having to do
> that at the first sign of trouble sucks.  Especially since we would have
> to maintain two versions indefinitely.

Ok, I added the padding to 128 bytes to the struct.



> >> I think you want to use a struct pid *pid instead of a pointer to the
> >> task struct here.  It is slightly less efficient (one more
> >> dereference) but it means that we won't pin the task struct in memory
> >> indefinitely.  Pinning the task_struct like this makes for a very
> >> interesting way to get around the limits on the number of processes a
> >> user can have.
> >
> > Hmm, when the task is detached from the sighand, we get a notify, so I 
> > could do a put from there. This would avoid the extra de-reference. I need 
> > to verify locking though ...
> 
> Ok.  That sounds more efficient than playing with struct pid pointers,
> if it works.

I'm looking into this right now ...



- Davide



  reply	other threads:[~2007-03-19 19:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16  0:22 Davide Libenzi
2007-03-17 21:35 ` Arnd Bergmann
2007-03-17 21:50   ` Arnd Bergmann
2007-03-18  4:56   ` Stephen Rothwell
2007-03-18 20:31   ` Davide Libenzi
2007-03-18 23:45     ` Arnd Bergmann
2007-03-19  0:22       ` Davide Libenzi
2007-03-19 17:20 ` Eric W. Biederman
2007-03-19 18:53   ` Davide Libenzi
2007-03-19 19:08     ` Eric W. Biederman
2007-03-19 19:11       ` Davide Libenzi [this message]
2007-03-19 20:36     ` Oleg Nesterov
2007-03-19 22:33       ` Davide Libenzi
2007-03-19 22:53         ` Oleg Nesterov
2007-03-19 23:28           ` Oleg Nesterov
2007-03-19 23:34             ` Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0703191209100.2101@alien.or.mcafeemobile.com \
    --to=davidel@xmailserver.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®