mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: <arnd@arndb.de>, <catalin.marinas@arm.com>,
	<heiko.carstens@de.ibm.com>, <schwidefsky@de.ibm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-s390@vger.kernel.org>,
	<linux-arch@vger.kernel.org>
Cc: <Prasun.Kapoor@caviumnetworks.com>, <pinskia@gmail.com>,
	<agraf@suse.de>, <broonie@kernel.org>, <joseph@codesourcery.com>,
	<christoph.muellner@theobroma-systems.com>,
	<Nathan_Lynch@mentor.com>, <klimov.linux@gmail.com>,
	Yury Norov <ynorov@caviumnetworks.com>
Subject: [PATCH 4/5] all: wrap getdents64 syscall
Date: Mon, 25 Jan 2016 19:57:26 +0300	[thread overview]
Message-ID: <1453741047-5498-5-git-send-email-ynorov@caviumnetworks.com> (raw)
In-Reply-To: <1453741047-5498-1-git-send-email-ynorov@caviumnetworks.com>

This system call may be handled by compat handler if
__ARCH_WANT_COMPAT_SYS_GETDENTS64 is defined. So we
should declare wrapper otherwise only.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
---
 fs/readdir.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/readdir.c b/fs/readdir.c
index ced6791..d34cc49 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -17,6 +17,7 @@
 #include <linux/dirent.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
+#include <linux/compat.h>
 #include <linux/unistd.h>
 
 #include <asm/uaccess.h>
@@ -274,8 +275,13 @@ efault:
 	return -EFAULT;
 }
 
+#ifndef __ARCH_WANT_COMPAT_SYS_GETDENTS64
+SYSCALL_DEFINE_WRAP3(getdents64, unsigned int, fd,
+		struct linux_dirent64 __user *, dirent, unsigned int, count)
+#else
 SYSCALL_DEFINE3(getdents64, unsigned int, fd,
 		struct linux_dirent64 __user *, dirent, unsigned int, count)
+#endif
 {
 	struct fd f;
 	struct linux_dirent64 __user * lastdirent;
-- 
2.5.0

  parent reply	other threads:[~2016-01-25 16:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 16:57 [PATCH 0/5] all: s390: make compat wrappers the generic solution Yury Norov
2016-01-25 16:57 ` [PATCH 1/5] all: s390: move wrapper infrastructure to generic headers Yury Norov
2016-01-25 18:10   ` kbuild test robot
2016-01-28 12:16   ` Heiko Carstens
2016-01-28 16:31     ` Yury Norov
2016-02-01 11:42       ` Yury Norov
2016-02-02  7:39         ` Heiko Carstens
2016-02-02 15:43           ` Yury Norov
2016-02-02 16:08             ` Heiko Carstens
2016-02-02 19:54               ` Heiko Carstens
2016-02-02 20:41                 ` Yury Norov
2016-02-03  8:01                   ` Heiko Carstens
2016-02-17  8:22                   ` Heiko Carstens
2016-02-17 13:57                     ` Yury Norov
2016-01-25 16:57 ` [PATCH 2/5] all: declare new wrappers Yury Norov
2016-01-25 16:57 ` [PATCH 3/5] all: s390: redefine wrappers in generic code Yury Norov
2016-01-25 16:57 ` Yury Norov [this message]
2016-01-25 16:57 ` [PATCH 5/5] all: introduce COMPAT_WRAPPER option and enable it for s390 Yury Norov

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=1453741047-5498-5-git-send-email-ynorov@caviumnetworks.com \
    --to=ynorov@caviumnetworks.com \
    --cc=Nathan_Lynch@mentor.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=joseph@codesourcery.com \
    --cc=klimov.linux@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pinskia@gmail.com \
    --cc=schwidefsky@de.ibm.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

all inboxes | Powered by JetHome®