Message ID | 20170524003420.5381-13-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 DF03C602A7 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17AE28867 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C64A72886A; Wed, 24 May 2017 00:35:47 +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=ham 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 310E928867 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:35:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968857AbdEXAfo (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Tue, 23 May 2017 20:35:44 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:44633 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763398AbdEXAef (ORCPT <rfc822;linux-block@vger.kernel.org>); Tue, 23 May 2017 20:34:35 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21105006" Received: from mail-co1nam03lp0021.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.21]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34:31 +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=AhlNbMIW3g1ngAeZwVLY44qQePFVMcOj+A/i0i+xCHU=; b=oWDo6T53PHKlVvB6HAFj09SJrfoqddXkGoKN+A7OUEfrZrP8WzrFMAgWK8nvvv5rLBNbYYZIj9ZPSp+wdJerZ5+YYqXFuUMYi400muLKVusIN73iiY/nvrpvuACmXSPRY9fCPiwsCPqALrACN9qj0VCK3TvZhvkEhm11fCHRNS4= Received: from MWHPR04CA0038.namprd04.prod.outlook.com (10.172.163.24) by CY4PR04MB0360.namprd04.prod.outlook.com (10.173.188.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 00:34:27 +0000 Received: from CO1NAM04FT053.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::202) by MWHPR04CA0038.outlook.office365.com (2603:10b6:300:ee::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 24 May 2017 00:34:27 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.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 CO1NAM04FT053.mail.protection.outlook.com (10.152.91.79) 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; Wed, 24 May 2017 00:34:27 +0000 Received: from MILHUBIP04.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 9A.43.45291.215D4295; Tue, 23 May 2017 17:34:26 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-fd-5924d51230ff Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id F2.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -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>, <linux-block@vger.kernel.org>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Christoph Hellwig <hch@lst.de>, "Omar Sandoval" <osandov@fb.com>, Hannes Reinecke <hare@suse.com> Subject: [PATCH 12/31] bsg: Check queue type before attaching to a queue Date: Tue, 23 May 2017 17:34:01 -0700 Message-ID: <20170524003420.5381-13-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170524003420.5381-1-bart.vanassche@sandisk.com> References: <20170524003420.5381-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHLMWRmVeSWpSXmKPExsXCddJ5ka7QVZVIgxO/VC0WvNnLZrFy9VEm i439HBZ7b2lbdF/fwWax/Pg/JovD966yOLB7TGx+x+4xbdIpNo/dNxvYPD4+vcXisX7LVRaP z5vkAtiiuGxSUnMyy1KL9O0SuDIa//exFvznqOiYOZ2tgXEfexcjJ4eEgInEhg0zWbsY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V3nFV8Ozl5TglJX7bInXJvy8JHEgn24a1bpj0s cvZL2lZ0vtVmfecejcsPun0OC7hvbX+3qeP/xNody+Xcli/gfP4/6WY9/6KNJxz3z/quHWCl my2qk7RH/Dz7/2z5KUfUCvap3HM2elGmxFKckWioxVxUnAgAlWpfw9ABAAA= 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)(979002)(6009001)(39450400003)(39840400002)(39850400002)(39400400002)(39860400002)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(189998001)(2906002)(478600001)(36756003)(5660300001)(72206003)(356003)(50226002)(6666003)(305945005)(4326008)(2950100002)(81166006)(8676002)(48376002)(8936002)(106466001)(1076002)(77096006)(54906002)(33646002)(50466002)(38730400002)(76176999)(50986999)(5003940100001)(47776003)(86362001)(53936002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0360; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT053; 1:1JqhwN6saXVjNIGDqia1zqcU0iNEMvZ4rKk9DqCrMtV7SvkpTgtn0/OCF5JpUjtyyhndnaYr1vMg4vb4PlVmSXKIweeq68EUMbNpkT7Xy/kA/Ohn/uJ0g6qgm0SV7ZodiguWq23wgFUllP2M/PFNvnPYeKTSKRgws6Enfqq1tZPjhuANkvAOXCjy6Uu3KI9Ck7Z4tQbwy45eoXEyCod+7fK/7l+01UQ/ITJ9l0u8q2kDQRX5FKj+VxCV0eNUrlCfWp6RlajgyITEOXzBi7QoIF/1yzHnL4SkElWyXi+cfkod10cJwKrX0vJLbHiXD4mvHFLZBSerkmHN3aNs1I7Pn6I5PDoz4nf76ZBKkUYbX9WVtss44jHrYeB58R3zlfqdhmedrpvVclVBjt8Kjn2VLWaSgKeKFtsQIdlbqrjB154fXCd9oUVXe4SSTDkgBKVFtVxFybo/uMWOVslwAfRI99Vo4hShru8+h4UOoFOenZfQpSFXOt49TaARzADrSooA X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0360: X-MS-Office365-Filtering-Correlation-Id: f514f16b-b12d-4b10-2b51-08d4a23ca2b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0360; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0360; 3:SxCRAqm33xE60WKVgLyqCvCsGdBW1l24E8UfTArdKWky1uDhs2AKLzGQeZLaSGy7kl2ogDTrjfwn7uobMlhAs84HsKyRf+IraTR5aeCoz2p35dFLZfD/fX0uR/1ru4V9+1J0jyupXhADefrfReBaaZIgoco7WL4x+8KqtJGIbi8pP93c7iJJ8KSlb8nOpot4+MmdDwF1TrzMHjZsQUeoa8iOwS/rxcZ7gTIl6c9T/hJf4ogXhpcucKFo61TNXu4yM9/9ZpqjBt0nXEXi3aeKCKVb6IRZRb08S5gMqY32OK5V7PF2oo7APQh3WjzuEfA4Y0Qwb+8+rtvkw9o4xNSP4lPB2FlC2iEuQL0nXJSV/BUgCqBRW+VNpLqj0pbnwQ5y3NhBG2HWf5h7IuoHI69bHpTcfiVlBArIXlMVf2Uij1J2qA6Id/Kh2GKMjbO9T+zjIz6ZYGzNo2FlfQj6FiV9txAJzUgeNwjUPFW7oV9oXSDCqeRVBHQml4HPcbl2m+Sp X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0360; 25:2a38La+mZkkzy5sleTZgUE+bXTHkBreu22vhnUKwinxTl+kxEnpCGZDkBZRllUpJufcLney1K7GIEXJcgKatSyVGfvxFeILVvdn/B88KwK/FrS1Hy5/0MyAvujV8BuIrktRh+qH0/MGiVEhM0yoN+hqb8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qczwIiYkTyIjls9B/tuqe8+utKtZIfD3Q3IxqVI+6qbCRZtm+XIx/DbyZ3f7JsGg8szK5335T+L1IU8tnFeaBhLeAthEkptyFAVc0UBk+tXSH8pISr6vhkjXAUQ6OpNAxlK4 X-Microsoft-Antispam-PRVS: <CY4PR04MB0360C0FEDB99D3694D5F4E8581FE0@CY4PR04MB0360.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)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(6072148); SRVR:CY4PR04MB0360; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0360; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0360; 4:e//RioLE4rzqmX5p3hOVwDnP2AtGyN9E8eJ+7XUdvQ?= =?us-ascii?Q?E/wTXvXXbuG3pmpOjhx0QN5lvNFy9Ch8hA91QbIeVG77fFaAg8Khr5oK+KYW?= =?us-ascii?Q?aUMxfPyafLcrlGcLjegqzaX389gvJLfu/J964J+EOtEqE25pYDN4vOApgDVS?= =?us-ascii?Q?sytlQENTP+4KvRzqPTLyadICW/c353lOMWVayphRtIJPO1fvgEVB4BLXW6HT?= =?us-ascii?Q?anOM7qs6q+4QOdFoRrbGJOFKVUmglGKPA/ucGDSyeBxG7MEdGb313TCkc7Rz?= =?us-ascii?Q?o4BqSobRY6vLdFGxghkNJoM8TtjiloF2dXSl7R/8UsLuflhdlId2GiaCSHUF?= =?us-ascii?Q?tbYrHpQSgIK15HOwwPx+gbwJkgA4v8S0h6upDqWJTeFJsSxREfm6zEkcG7YS?= =?us-ascii?Q?fjG8OjP3cshzidE+4qSB5RmHVwddPl/ZMNbcu9k8sp99YP27WmlTS96HkorQ?= =?us-ascii?Q?9uoFPUU3q5JRZ+ddQtduyKAqT3T+CpGumS95zXcNktcNA/BaD7M4NPUCanHa?= =?us-ascii?Q?j7f3SZcBekNR2vOQHMdXL3MKT2+3H8JaBS0bk06efSptxLcu7SpDY7UCLdFx?= =?us-ascii?Q?9+RKJ8rpFQo2+tWSW1kt3glagf1+ia4O11UExSMcps9m2sRUs1rvoEVk9rGf?= =?us-ascii?Q?25IC0wfrcoDaNXmIVWMSpD7DjRKFOIAZXZOGuT0H5ERD54fg58lXBjdONHwU?= =?us-ascii?Q?mIowtkPqFBRIrWaYOAeh7+Utlw0Yu9JNuAA8lzV4SV+ESuW0NO34jfIdYEOk?= =?us-ascii?Q?D9l4ZsTBsRqB/BAfyGfVyN0nSAqaxL75wjfvBBGhTc8NdpIilXNe0yWuZQeQ?= =?us-ascii?Q?SSOUju+/4pbeBYQKW/lduTEEbjQDNrGhNEOSURxCyPP9K9Z/aMQCH9jhLyyy?= =?us-ascii?Q?qZkex3SLEQIwYHkUR0tub/t0XLBVhMv+HC2Uov/n9d8NS+ahvtt6HQvjBTwV?= =?us-ascii?Q?TDzodcteQnjZxUGj3v9eKhdDZvnp5ObMLtSdcB2w=3D=3D?= X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0360; 23:yjmhEt7VzrivjwyRZA32idmhF41u4UM7r3HMxVtu1?= =?us-ascii?Q?njn8a4EX34foWKirgS8Rn3MuxHafBD5NdcmuLo9KN6f5cA/QcdA5PT2Q9Lz3?= =?us-ascii?Q?Zy8CK30I2MUPImaEEx9dbQIZGwBjvae0KbK9D/OEdjaI6BbP8aeFzwB0srBi?= =?us-ascii?Q?NYqUxCJ3Gu2G80l3f04u8UpX8W5XoGxii9JDgB6DL+u1XcTCcdqrRllDKybb?= =?us-ascii?Q?ieRirWYXblW8mtFS7NYrsCPfVKAWnNz1FjUVD92y4/P7T/RqGxBsvBmeWSiW?= =?us-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qll8VfvQxIQO/SNyR1huNI2HwjM7WL+wuVhr/HHnqkAAHBTzt1etr+/3UOkX68UtF/tV6Mz4KkJcdMvUcL/ZjoOLkIzl4CLpGpV24JRw+X5eHCQ2KMqfu4YBVpL5O+q4KL3iHZ2sapvb0YWexTzjigWiUQRJqzVFeaa/57s3LWn4jFjJpX+EsRC5TGKKm0MzOjLsA==; 20:1zXyymlndnR+kn0HpgdgqluEO3NTVQDncIr+nhEV4ItdCUf+4LUMwt2nSIbXn6hq6erAcORYL8uC5e6fA+n4qdaPwM3tBEeN7C+LfQ78aTtlQjUPIiJ8wcFSI8iuc8qOBguxU8WCcm4Cy82wbAz2xxdHh1yyCaxcZwpskm2Ixh4= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:27.3356 (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: CY4PR04MB0360 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 |
On 05/24/2017 02:34 AM, Bart Van Assche wrote: > Since BSG only supports request queues for which struct scsi_request > is the first member of their private request data, refuse to register > block layer queues for which struct scsi_request is not the first > member of their private data. > > References: commit bd1599d931ca ("scsi_transport_sas: fix BSG ioctl memory corruption") > References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Cc: Christoph Hellwig <hch@lst.de> > Cc: Omar Sandoval <osandov@fb.com> > Cc: Hannes Reinecke <hare@suse.com> > Cc: linux-block@vger.kernel.org > --- > block/bsg.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/block/bsg.c b/block/bsg.c > index 6fd08544d77e..f7695bb141d9 100644 > --- a/block/bsg.c > +++ b/block/bsg.c > @@ -750,6 +750,12 @@ static struct bsg_device *bsg_add_device(struct inode *inode, > #ifdef BSG_DEBUG > unsigned char buf[32]; > #endif > + > + if (!blk_queue_scsi_sup(rq)) { > + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); > + return ERR_PTR(-EINVAL); > + } > + > if (!blk_get_queue(rq)) > return ERR_PTR(-ENXIO); > > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
Bart, > Since BSG only supports request queues for which struct scsi_request > is the first member of their private request data, refuse to register > block layer queues for which struct scsi_request is not the first > member of their private data. > + > + if (!blk_queue_scsi_sup(rq)) { If you are renaming the flag, how about blk_queue_scsi_pdu()? > + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); > + return ERR_PTR(-EINVAL); > + } > + > if (!blk_get_queue(rq)) > return ERR_PTR(-ENXIO);
diff --git a/block/bsg.c b/block/bsg.c index 6fd08544d77e..f7695bb141d9 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -750,6 +750,12 @@ static struct bsg_device *bsg_add_device(struct inode *inode, #ifdef BSG_DEBUG unsigned char buf[32]; #endif + + if (!blk_queue_scsi_sup(rq)) { + WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); + return ERR_PTR(-EINVAL); + } + if (!blk_get_queue(rq)) return ERR_PTR(-ENXIO);
Since BSG only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which struct scsi_request is not the first member of their private data. References: commit bd1599d931ca ("scsi_transport_sas: fix BSG ioctl memory corruption") References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Omar Sandoval <osandov@fb.com> Cc: Hannes Reinecke <hare@suse.com> Cc: linux-block@vger.kernel.org --- block/bsg.c | 6 ++++++ 1 file changed, 6 insertions(+)