Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Andrew Morton <akpm@osdl.org>
Cc: tony.luck@intel.com, linux-arch@vger.kernel.org,
	janak@us.ibm.com, Ulrich Drepper <drepper@redhat.com>,
	dwmw2@infradead.org, dhowells@redhat.com, christoph@lameter.com
Subject: Re: new syscalls
Date: Thu, 19 Jan 2006 16:13:49 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.63.0601191606300.6527@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0601191347160.6527@localhost.localdomain>

On Thu, 19 Jan 2006, Davide Libenzi wrote:

> On Wed, 18 Jan 2006, Andrew Morton wrote:
>
>> Davide Libenzi <davidel@xmailserver.org> wrote:
>>> 
>>> How sophisticated this has to be?
>> 
>> umm
>> 
>> - test basic functionality
>> 
>> - test things which should fail: syscall arguments out-of-bounds,
>>  negative syscall args, etc.  invalid fd.  valid fd but for the wrong type
>>  of file.
>> 
>> - if you can, something which will test the 32bit->64bit->32bit
>>  conversions which 32-bit userspace on 64-bit kernel needs to do.
>
> Somehow, I knew I didn't have to ask :)

Here you go:

http://www.xmailserver.org/epoll_pwait_test.c

There is a problem with the test we have inside the kernel about the size 
of sigset_t, from the kernel (8 bytes on i386) and the glibc one (128 bytes):

         if (sigmask) {
                 if (sigsetsize != sizeof(sigset_t))
                         return -EINVAL;
                 if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask)))
                         return -EFAULT;
                 sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
                 sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
         }

ATM I left the check and I bolt 8 inside the test software, but this needs 
nicer handling. Typical run will show:

davide@debstar:~/tmp$ ./epoll_pwait_test
Testing from wrong epfd type            : OK
Testing from closed epfd type           : OK
Testing numevents <= 0                  : OK
Testing numevents too big               : OK
Testing wrong sigmask size              : OK
Testing getevents when none available   : OK
Testing getevents when one available    : OK
Testing signal when blocked             : OK
Testing signal when non blocked         : OK




- Davide



  reply	other threads:[~2006-01-20  0:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18 18:55 new syscalls Luck, Tony
2006-01-18 21:36 ` Andrew Morton
2006-01-18 21:48   ` Ulrich Drepper
2006-01-18 21:58     ` David S. Miller
2006-01-18 21:53   ` David Woodhouse
2006-01-18 21:58     ` David S. Miller
2006-01-20 10:04     ` Andi Kleen
2006-01-20 10:15       ` David S. Miller
2006-01-23  6:44         ` David Woodhouse
2006-01-23  9:58         ` Heiko Carstens
2006-01-19  1:17   ` Davide Libenzi
2006-01-19  1:26     ` David S. Miller
2006-01-19  5:00       ` David Woodhouse
2006-01-19  1:28     ` Andrew Morton
2006-01-19 21:48       ` Davide Libenzi
2006-01-20  0:13         ` Davide Libenzi [this message]
2006-01-20  0:23           ` Ulrich Drepper
2006-01-20  0:34             ` Davide Libenzi
2006-01-19  1:19   ` Christoph Lameter
2006-01-19  2:30     ` Andi Kleen
2006-01-19 13:50   ` JANAK DESAI
2006-01-22 17:45   ` JANAK DESAI
2006-01-24 23:44   ` JANAK DESAI
  -- strict thread matches above, loose matches on Subject: below --
2006-01-18  3:29 Andrew Morton
2006-01-18  3:38 ` Andi Kleen
2006-01-20  9:43   ` Heiko Carstens
2006-01-20  9:48     ` Andi Kleen
2006-01-20  9:49     ` David S. Miller

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.63.0601191606300.6527@localhost.localdomain \
    --to=davidel@xmailserver.org \
    --cc=akpm@osdl.org \
    --cc=christoph@lameter.com \
    --cc=dhowells@redhat.com \
    --cc=drepper@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=janak@us.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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