Message ID | 20170519183016.12646-6-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EE19F601C2 for <patchwork-linux-block@patchwork.kernel.org>; Fri, 19 May 2017 18:30:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E60CC2856E for <patchwork-linux-block@patchwork.kernel.org>; Fri, 19 May 2017 18:30:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAC1C28573; Fri, 19 May 2017 18:30:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D6F92856E for <patchwork-linux-block@patchwork.kernel.org>; Fri, 19 May 2017 18:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755060AbdESSag (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Fri, 19 May 2017 14:30:36 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:10207 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755096AbdESSa0 (ORCPT <rfc822;linux-block@vger.kernel.org>); Fri, 19 May 2017 14:30:26 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="115828401" Received: from mail-by2nam01lp0178.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([216.32.181.178]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2017 02:46:38 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qxUOXl0QzZE5hmfkV8CDlRorVCnw2Ew6wDAqY6PGuTA=; b=XxIJzfQS9TSbYjHWfC4N17x/88dPF50RpClXR5y8zFAFCMlelULKWYZHn7SEdnjPQwTvF8vDURGDntbc0AdxEurma39yZDPV5Kzo/WSkiYu+bbglvfsR/gntGfLOqIaX03Y6vlWWT509uBVsYzqb6Hv6vY9iJxTU8Nk3z2OeNfs= Received: from BN3PR0401CA0036.namprd04.prod.outlook.com (10.162.159.174) by DM5PR04MB0364.namprd04.prod.outlook.com (10.173.169.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 18:30:21 +0000 Received: from BN3NAM04FT057.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::208) by BN3PR0401CA0036.outlook.office365.com (2a01:111:e400:51d1::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Fri, 19 May 2017 18:30:21 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN3NAM04FT057.mail.protection.outlook.com (10.152.93.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Fri, 19 May 2017 18:30:20 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id D0.5A.29323.BB93F195; Fri, 19 May 2017 11:30:19 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Fri, 19 May 2017 11:30:18 -0700 X-AuditID: 0ac94369-548749800000728b-8d-591f39bb81ef Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id BA.37.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: "Martin K . Petersen" <martin.petersen@oracle.com>, James Bottomley <James.Bottomley@HansenPartnership.com> CC: <linux-scsi@vger.kernel.org>, Bart Van Assche <bart.vanassche@sandisk.com>, "J . Bruce Fields" <bfields@fieldses.org>, "Jeff Layton" <jlayton@poochiereds.net>, Jens Axboe <axboe@fb.com>, "Christoph Hellwig" <hch@lst.de>, Omar Sandoval <osandov@fb.com>, Hannes Reinecke <hare@suse.com>, <linux-nfs@vger.kernel.org>, <linux-block@vger.kernel.org> Subject: [PATCH 05/18] nfsd: Check private request size before submitting a SCSI request Date: Fri, 19 May 2017 11:30:03 -0700 Message-ID: <20170519183016.12646-6-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170519183016.12646-1-bart.vanassche@sandisk.com> References: <20170519183016.12646-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42LhOum8SHe3pXykwdmFUhb/9xxjs3gxJcpi wZu9bBYrVx9lstjYz2Hx4d8fRou9t7QtLhw4zW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CESWLWjYVsIAlhgQiJ6Rs+sILYLAKqEifmb2bsYuTg4BWw l7j4vBRigbzE2S07wWZyCjhIvDy+kB2kRAio5H5f/QRG7gWMDKsYxXIzc4pz0zMLDI30ihPz UjKLs/WS83M3MYIDjzNqB+P1ieaHGJk4OKUaGDe+/6qYMN2vPM1uisbJ7N+vQ57vfxDzodkn x4vjxs6oGSlpdw8dE5q8MkfxmXpM8pa/8SoRD19vamRYL8kju+yMx4EVfh4z/vhXfXC+9rZZ VsxncdhZg/OX7B++PKZS/W3nhw8f//LLsttbmItMzQvXnW2+/fryo4/frUld9dTwZt4vJvFG pRIlluKMREMt5qLiRACjefB37AEAAA== MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39840400002)(39860400002)(39410400002)(39400400002)(39850400002)(2980300002)(438002)(199003)(189002)(9170700003)(36756003)(5003940100001)(305945005)(81166006)(54906002)(38730400002)(7416002)(33646002)(50226002)(8676002)(8936002)(2950100002)(106466001)(5660300001)(86362001)(50986999)(4326008)(47776003)(189998001)(356003)(76176999)(48376002)(2906002)(77096006)(6666003)(53936002)(50466002)(1076002)(72206003)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0364; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT057; 1:1WcHUePmCkRs0KuOmi5zeTzi+Za86HMq0M/Hxdz7SHwlpafVgrKQInEbW21UX1fcVyJXkfwEwtTDlWdYloJd+MX86TyrkJpBCwruQT23foJ2vKfj/4dHam7G2895CktGV8+hJpxO1cd9JuyFQlNsvbn0/f38yPdM4XuY45ldsAXWefFj3EowWF0l7hSetjh6J2zc4TFfx5DSkLXVjI3TYqAT1pG96HJLSiheOS4uijLUEQiNAM3lmUry9X+gAY6IorsME77IXId68m2R5y5z6d/y4Vd0cbTWGu0/avBRHQvDr3Ly2NDIDJXrfvL0jUn9gmqC+9LloUj+RvqHVgDJfQcs253Mg+t2iJ/CqKOi88McNHc4bCIDXK37LvXEsir7hhZ3QW/8Ku9olqEJ7gxoGyp9keaWs39rsoEZzWMh8JxpcKf9Z4qepVndKgYwbwr7jPuyGMkG4Oblb8zBFLyW4Z1SYRS2WDieecI3tHxn1n3BdTKfAvwmbeCU3p1/NWAc49F8b01faHgg48HAC7uxFcnY+uT4wD33R1FJqidaudo= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0364: X-MS-Office365-Filtering-Correlation-Id: e67bdce3-e9e5-472c-87d3-08d49ee51b91 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0364; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0364; 3:X3ltZFBo8lVokd7mqYHWVqj8My7KBIPxwtQyceIxYR0g1y0N231WRjIE8vlLoojAiIMnBkIl8lmBLah5YvdxOg4XoEMTwfMKUjr8GugDBuIk8ZLHOHiuaTVIuUuPRoic5mHE4+gpifSinxZLtADz9EOdzu08G+iUaiwRr6svYqTYKRwytPRyUrC2dvjxkozEEIy29Njx94Q+pvhIbTmYqP2lcUs7d0ieo+6XfINDgjfc4CXeWyp69VyIlvAJt5j/k7DuDbHNdwpHkeE8AGd1F2Yw0aZ8ClZ/WTEaAXft0YRRk3ZlXY1o23b7RVsCy1NN5/lM7wWk4D/X5iIYOg3iXNa5kri5I8z57gcBEah8+pqZoId+MH/l6MJrC43c0M1FC+AZTpQN+4kWCa/sfLUyACsMck5RX/aGCIhyDsLTvRnqlQGJv9ngYadQ3bV/oprYrE8n4Gl0TGeVed2ol+Tlvu70FGuUCb9nBUQF2pvWiyBkbvEUlUe/EHArjrfGPzj8 X-Microsoft-Exchange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n6vh80itfjtDgYlHFUx0m6c7ta7cSDEJibzTVSbk351ahbtjMWNMaEGReTrTMroG5fAR35CcUmBe3GPW4OjpH0znzC4sEEgszY/6ogV0BOi2MR+kOCaLombqL2RaVZbLz0ZXue+CN+pCReF5Fw/u2sT4eSEgsVOAM+NFq1wF8QMmrGmEdEzW7iALoGp50SbXRXD8t1wI9SejOKesIRi6T17nWeK/dDYj2JxeH7ObQ6Nyv1RPaZr7sDN4iJoHm9/zPxHK6ULYY6o48/rgi6/HMu X-Microsoft-Antispam-PRVS: <DM5PR04MB03644782C02471BEC8CB8A9A81E50@DM5PR04MB0364.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(6072148); SRVR:DM5PR04MB0364; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0364; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0364; 4:tOspDCz3xXXjlqvojdjfjto03kdz4msM/cQ8JpaXWQ?= =?us-ascii?Q?bJ2ghZnIbxC+tV7Mdgj2ILseUGZuANT8OKsV79wGShUxojClwKanV2xcE1NF?= =?us-ascii?Q?Fq6Cs38b9upHb+uTjSyuncwhLTeUFEfk29ZzhtMM2aiwrgIAIyXSOOrA5eLr?= =?us-ascii?Q?t45jNsua75GG5/CTPocUiYUJ575kqYOi3V8LXwSIL7f+k5/I/4vD3FuC9GI+?= =?us-ascii?Q?adBMyv3FO9cOFgLzopgX1btxsKjwgmYZjicvidoOtOdD8XV71cVRXEW0g7gv?= =?us-ascii?Q?TLEsSn9yagQW4m+dp1W6x5P8ou7aS5NOQ3Lu2i1RB9OeayqopHtbV37Dv03Q?= =?us-ascii?Q?VTzwpR3q/97etmmyIbCWUVsqSeH6N5tGKB+NI7cj/gtde1inEJUmsTkFpPSk?= =?us-ascii?Q?6dwubvOxcZuon89U7KkLctC0I3uTCvoFQeaDcpZJiT9DlRXzoFgnURj3GMVz?= =?us-ascii?Q?7ATw5JiY02S+XfjqsMEWZ54k/jtVi0r05bOFulrISBujX6Y4cnxcXtImnd57?= =?us-ascii?Q?SEleymjYArGO1k17w3jJz3vcjLo9v0/a/fz5iMaFB3b6+O5hbtX5eN553XA2?= =?us-ascii?Q?I1HW4P1qmu5ZDAveDDU5G5Fu72WkzyfsnxAdagVO+Oj7jyO+gxhKmoxWOEbV?= =?us-ascii?Q?OJiOUSb+ocv7rF/Akc8dSUc+swf/AiwbF4deGeSA2u8Qu2Di+A3HC704Aq4u?= =?us-ascii?Q?bB4eVuKo0Nlez2rYkVihF6ffZo8yXI9pjKBPYIIsGCItynxt8oYATEHyMp8k?= =?us-ascii?Q?dzKPoIOy/x+oKb3MhS59cm71iue7nXgXG0WG/l2k3ETL93w3GETybL7O5EU5?= =?us-ascii?Q?iwK/7QI5UVvm9H/La4kZHeC0168vUUuO9s4XbKmU+sriu3ZLAK1/vjsVJ4mk?= =?us-ascii?Q?lQyYDi+6JGOdLwgxGRlCi0aIP4lwE3/tPr2oHEbfnOIto2myuHbJ5tZKwMC1?= =?us-ascii?Q?ScGnFk17ex7+swjl6Mw5+WT4pVR6Bp3DYPJhqqrA=3D=3D?= X-Forefront-PRVS: 031257FE13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0364; 23:dlGUU41TVrzopcYwXmZLM+WxVkssl1VmUFO6zYeqG?= =?us-ascii?Q?gyqhXrij92kbSpkMMhAY6bu7S3NXH8whOvXEb37u0OSqbjJo59pMc7uhxi5V?= =?us-ascii?Q?iOtLSiqIbiDNHYRxTmCDx3uhbeGDnR6eLMYRVYmBlInYfcL/UyARb4LTvUhj?= =?us-ascii?Q?doFa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fJhGAQGzmY7EQfpgmC1yQikRyHhOv1BteWJD8PVuYL3lJ5wZhmPzc/cEzhKP6jE8Kl5DDtQ6dEfv5lh3dTlUElqy7wl6SMrQ6nARnxa6sKZ9sR3V2gtDY3o4sZG2FY0DqhjUagUKdUdWBG6MSw7YicjJF7AIwXjM7RNbFvyWWtn8MRMiq6K+ajJ9GZy6k734K8HcMa5fGftn7/NFJhapYj0cunYouEUq+82rLXyUl1gggD5IRi7VElYMFv3JAeemJw==; 20:ctU9+KDxKRCO/RSlHwcAJ39kzitUH9axcVfwgXz7MJm2M/krMTr4oT7VN5uyp/fG+i7ddTFlt8lErv5eaNXydxuc47abfFM4R46NhOTosx0bju1gqq4P++47YpBkRwpBpZUuCItxK11xkMu5iex/fxjqjJr1cBaph5dHfiywg8I= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:20.3929 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0364 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
ACK as far as I'm concerned.--b. On Fri, May 19, 2017 at 11:30:03AM -0700, Bart Van Assche wrote: > Since using scsi_req() is only allowed against request queues for which > struct scsi_request is the first member of their private request > data, refuse to register block layer queues for which the private > data is smaller than struct scsi_request. > > References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Cc: J. Bruce Fields <bfields@fieldses.org> > Cc: Jeff Layton <jlayton@poochiereds.net> > Cc: Jens Axboe <axboe@fb.com> > Cc: Christoph Hellwig <hch@lst.de> > Cc: Omar Sandoval <osandov@fb.com> > Cc: Hannes Reinecke <hare@suse.com> > Cc: linux-nfs@vger.kernel.org > Cc: linux-block@vger.kernel.org > --- > fs/nfsd/blocklayout.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c > index fb5213afc854..90d1df31491b 100644 > --- a/fs/nfsd/blocklayout.c > +++ b/fs/nfsd/blocklayout.c > @@ -219,6 +219,9 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, > u8 *buf, *d, type, assoc; > int error; > > + if (WARN_ON_ONCE(blk_queue_cmd_size(q) < sizeof(struct scsi_request))) > + return -EINVAL; > + > buf = kzalloc(bufflen, GFP_KERNEL); > if (!buf) > return -ENOMEM; > -- > 2.12.2
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index fb5213afc854..90d1df31491b 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -219,6 +219,9 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, u8 *buf, *d, type, assoc; int error; + if (WARN_ON_ONCE(blk_queue_cmd_size(q) < sizeof(struct scsi_request))) + return -EINVAL; + buf = kzalloc(bufflen, GFP_KERNEL); if (!buf) return -ENOMEM;
Since using scsi_req() is only allowed against request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which the private data is smaller than struct scsi_request. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: J. Bruce Fields <bfields@fieldses.org> Cc: Jeff Layton <jlayton@poochiereds.net> Cc: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Omar Sandoval <osandov@fb.com> Cc: Hannes Reinecke <hare@suse.com> Cc: linux-nfs@vger.kernel.org Cc: linux-block@vger.kernel.org --- fs/nfsd/blocklayout.c | 3 +++ 1 file changed, 3 insertions(+)