From patchwork Mon Jan 25 16:57:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 8112981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BFBC8BEEE5 for ; Mon, 25 Jan 2016 17:10:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02ED120220 for ; Mon, 25 Jan 2016 17:10:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26735201C0 for ; Mon, 25 Jan 2016 17:10:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNkcv-0005OL-Qz; Mon, 25 Jan 2016 17:08:29 +0000 Received: from mail-by2on0086.outbound.protection.outlook.com ([207.46.100.86] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNkU5-0003OE-03 for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2016 16:59:50 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) with Microsoft SMTP Server (TLS) id 15.1.390.13; Mon, 25 Jan 2016 16:58:57 +0000 From: Yury Norov To: , , , , , , , Subject: [PATCH 4/5] all: wrap getdents64 syscall Date: Mon, 25 Jan 2016 19:57:26 +0300 Message-ID: <1453741047-5498-5-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453741047-5498-1-git-send-email-ynorov@caviumnetworks.com> References: <1453741047-5498-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR07CA0037.eurprd07.prod.outlook.com (10.141.45.165) To DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 2:Ds8Hi1HoHUw3qYPv8m3mJSlKqOXppAupyyN2k4kBPL7HiTWCw0E6w/DqamIHfT97Cx6SrykJTT12NfV4vAEW3k+V/VMDhk4ABWB5B9bBAVlV37xz54Ris+Bn11sjYv6d1NPlXdNAkfPWjY2rt9pdDw==; 3:BFSkYwHY+Dh0ftgs4wfPZ9fy0Wh3QC1m7MjQwL0meitiJIFGFW3hyEpaJSaalFd35yXtjsOJocD6JdfQ1vlwNbmb+hGvan8UqDoNfZjsMk0yZPmmcaNK31fq42ENNO1y; 25:VDAfYU6mcYI62LANR/0bJqtS2TzAhBUGz3YZ1lx7kdQNIF6TMqaQHNqj1Xxd97JjxVNanEAZNgbSDcpD92oyP4sAllnwbnWx2A2/d9be2dHjfyw3Bha69ks43ys3CDZKfvLPUM7PpSh/riF8jN0lcpraTVXcfzYu8RdDcTNC8UQ0Nh27v/Z9IvT9STXinVpZi0W2ZA+AYgHTuOEJFCGXOfifFyiSt3IN8MjN8ZAbjNToeN6Dwn4ntlnxds9L6hvt X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB621; X-MS-Office365-Filtering-Correlation-Id: b13db872-64a1-4771-a6d4-08d325a8d0de X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 20:A4OFS78o8ViJT1xrzA/O5i0NZAuYyBIHpdah5IfpIDfSdVrK0/4OIDQKW40dswLf4jGyauVrDQbqRgajNqqhvQ1JtFUnTYITpcv5y5+jq36wr3qQB0ixaXwVImXGzbjJwQTaMNiy8kkjsrs/q9O8LVEPf21CvEmv+kV27gid79CT6Yf7oX+pBQUfF5fYgeXzJGVeRFfOSuUs6qsTRSLSB13gAvHpAcAprVrGMdAYvVwKICGup/o0JyQbg+AyYzP99GC2Ap1/DCTjDf6mZ0Ohr2ARpMIHkAcg4sgMAjC13ze6qLkL6ERaVT2kAeSEkSvfAzFAPr++OvH+F0EM78uIGeKQl9M9TOooExyOKauOwdE5iuXEx+675HxBcGqcJijBvH+Qxr3uekRdfkG8owlsa7UjC+u7JmGxPQHzBLciYX1h5nZsKWDLONJtCDG2PgwyEk6idn0Bd8FcQbYupBzv7p0Emxh/q0Jo4MEQgI5MHmTM6V3SoWNZJzGe81DcJiAKglL4zdjD9IEjBB869rEOSZ8xyoG8oVtCSLAJxsvmvipPZkY9J5/oMiDjnQu9crOgUeDYOz0eFYPtVdLVENM7VBE5Zg15AD+Lyamh0MpIABw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(123027)(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:DM2PR07MB621; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 4:i7saSVN8pGTXI7AQYky144vTsdWsfBaXaropBogrNxxnhz4URc/n50QBN+cJAx1P05fqzwhT+kYX3LpeWMfKw6PKUrglEB2UWaK9A0Zw6o6ts1+bqyo23fOKUKFIlIEL3rg35IeJyFdgGdoILEQexX3AyOehCC5EkUnhrGDQs0Fryp8+IVbLpgKOm5MRt07tpkz7T/H7xKR9Zx4pZSZbi0I0MDaerHwe57nE9drsmUy/Tq4Es2vtWQmnblOfNPlOscjHA/jMILuzzHTpaQGbaQs0UUeF7+c/Ue1Mxv92EWUMdpD7emxehIpyBgVCvbVeCNXnxUK9f0kbYfJV/Clh2v4pm074wH+oSVVmA2y1N3sIXimTD0q/qUDIzaLbJqcsnDAp4mw0lFNYwIakrk0trA== X-Forefront-PRVS: 083289FD26 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(4326007)(50466002)(2201001)(122386002)(19580405001)(2906002)(76506005)(42186005)(92566002)(40100003)(33646002)(36756003)(87976001)(5003940100001)(5004730100002)(50226001)(1096002)(77096005)(229853001)(107886002)(5001960100002)(2950100001)(3846002)(4001430100002)(81156007)(6116002)(48376002)(97736004)(5001770100001)(19580395003)(189998001)(101416001)(47776003)(66066001)(106356001)(50986999)(105586002)(5008740100001)(586003)(76176999)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB621; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB621; 23:l3b1A+Bah/PTJnJOgLe2ewPAw6IRn1IkyyY0BI+7+V?= =?us-ascii?Q?Wdtp65IRWygYw9lCUhZD3fRdLHBh0ZfVtCz/iDstOu/vnqW6Or6w0LmSAVDC?= =?us-ascii?Q?Frz7GSpXpRe5FQaL/hOK32WusaEn3StAPo575cEDfZjaVZDgsI1RAMPYK/wx?= =?us-ascii?Q?47sLGkGYG09k0JE27hpiwdhm7jKcSB3KzycUIhsvy2hsfkg5NrWO5J3l0u6y?= =?us-ascii?Q?7RmzU17L4vvBR614sMo1tbqkrFrqXtPnelrdboOTnSlgXyjsZ2Tele1bCkTH?= =?us-ascii?Q?We8mwcgDuuQI4SAZsuK1UIDCclWbH9rApIaSqo7lLuVPHGXmzhasqWV2KPDp?= =?us-ascii?Q?H/wsMvQr8i3WEsGcbh2yn6STheuTQiDFcoaw9Qf4F2aV/0eHDaiRSdh/OEMF?= =?us-ascii?Q?k7Jio0rq9Yn8aTvZzMFPvmfhxg6+EosOe4SnK8lVKK/oZQokHiXHuWxCLPDH?= =?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A/FoC1JiCENLl6tJViygikYzh9yvg==; 24:1g4+1XIpzF1cWl2MBfh+leAmqQnjUwg/MV0afuoer0IlJsayDMEaMnzXr59kmmoHE2n6kLS5brkuXxY1TdJap3u0ErMwBZnSG2UJgDKMy+Q= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2016 16:58:57.4295 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB621 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_085921_686562_C0C5587F X-CRM114-Status: UNSURE ( 6.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, Yury Norov , joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 #include #include +#include #include #include @@ -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;