From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] syscall: Add userfaultfd testcase
Date: Mon, 18 Mar 2019 18:51:58 +0100 [thread overview]
Message-ID: <20190318175158.GA3892@dell5510> (raw)
In-Reply-To: <100593127.9468868.1552688247623.JavaMail.zimbra@redhat.com>
Hi Christian, Jan,
> ----- Original Message -----
> > This tests the userfaultfd syscall to handle pagefault events.
> > It does so by registering a userfaultfd object to the address of
> > a memory page. In a second thread it handles the event and writes
> > data in the monitored memory page to indicate success.
> > Signed-off-by: Christian Amann <camann@suse.com>
> Acked-by: Jan Stancek <jstancek@redhat.com>
> Couple small nits below (no need to repost).
> syscall -> syscalls in subject
> > +
> > +static int userfaultfd(int flags)
> If glibc ever provides func, my money would be on this :-).
> But looking at HEAD, we're safe now.
Yes, I'd be for changing the name, see 651895c9f ("getcpu01: Rename getcpu to
avoid conflict with glibc >= 2.29" :)
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Nice work! Would it be possible to fix warnings?
userfaultfd01.c: In function ‘handle_thread’:
userfaultfd01.c:50:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
uffd = (int) arg;
^
userfaultfd01.c:80:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
In file included from userfaultfd01.c:19:
userfaultfd01.c: In function ‘run’:
userfaultfd01.c:108:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
handle_thread, (void *) uffd);
^
../../../../include/tst_safe_pthread.h:39:70: note: in definition of macro ‘SAFE_PTHREAD_CREATE’
safe_pthread_create(__FILE__, __LINE__, thread_id, attr, thread_fn, arg)
^~~
Kind regards,
Petr
prev parent reply other threads:[~2019-03-18 17:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 9:45 [LTP] [PATCH v3] syscall: Add userfaultfd testcase Christian Amann
2019-03-15 22:17 ` Jan Stancek
2019-03-18 17:51 ` Petr Vorel [this message]
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=20190318175158.GA3892@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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