All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/sendmmsg: add new test
Date: Mon, 29 Jul 2019 10:56:06 +0200	[thread overview]
Message-ID: <20190729085606.GA25517@dell5510> (raw)
In-Reply-To: <20190725211119.239938-1-smuckle@google.com>

Hi Steve,

> Test basic functionality of sendmmsg and recvmmsg.

> Signed-off-by: Steve Muckle <smuckle@google.com>
Acked-by: Petr Vorel <pvorel@suse.cz>

> ---

> Changes since v3:
>  - drop resending of messages on partially successful sendmmsg()
>  - drop use of pthreads, do message creation and port management in
>    setup/cleanup

The only thing left in v4 is duplicate LTP_CHECK_MMSGHDR call.
+ I'd use lapi/socket.h also in cve-2016-7117.c (as Cyril pointed out)
in this commit (this change is simple enough).

So I'd be for merging v4 with diff below.

Kind regards,
Petr

diff --git configure.ac configure.ac
index 5e4e7f1f9..f7d1afc40 100644
--- configure.ac
+++ configure.ac
@@ -255,7 +255,6 @@ LTP_CHECK_TIME
 LTP_CHECK_TIMERFD
 test "x$with_tirpc" = xyes && LTP_CHECK_TIRPC
 LTP_CHECK_TPACKET_V3
-LTP_CHECK_MMSGHDR
 LTP_CHECK_UNAME_DOMAINNAME
 LTP_CHECK_XFS_QUOTACTL
 LTP_CHECK_X_TABLES
diff --git testcases/cve/cve-2016-7117.c testcases/cve/cve-2016-7117.c
index f0f6c22f1..140839712 100644
--- testcases/cve/cve-2016-7117.c
+++ testcases/cve/cve-2016-7117.c
@@ -30,6 +30,8 @@
  * https://blog.lizzie.io/notes-about-cve-2016-7117.html
  */
 
+#include "config.h"
+
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -44,20 +46,12 @@
 
 /* The bug was present in the kernel before recvmmsg was exposed by glibc */
 #include "lapi/syscalls.h"
-
-#include "config.h"
+#include "lapi/socket.h"
 
 #define MSG "abcdefghijklmnop"
 #define RECV_TIMEOUT 1
 #define ATTEMPTS 0x1FFFFF
 
-#ifndef HAVE_STRUCT_MMSGHDR
-struct mmsghdr {
-	struct msghdr msg_hdr;
-	unsigned int msg_len;
-};
-#endif
-
 static volatile int socket_fds[2];
 static struct mmsghdr msghdrs[2] = {
 	{

  reply	other threads:[~2019-07-29  8:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 21:11 [LTP] [PATCH] syscalls/sendmmsg: add new test Steve Muckle
2019-07-29  8:56 ` Petr Vorel [this message]
2019-07-29  9:01   ` Cyril Hrubis
2019-07-29  9:31     ` Petr Vorel
  -- strict thread matches above, loose matches on Subject: below --
2019-03-20  2:16 Steve Muckle
2019-03-20 22:22 ` Petr Vorel
2019-03-20 23:04 ` Petr Vorel
2019-03-20 23:57   ` Steve Muckle

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=20190729085606.GA25517@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.