From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH blktests v2 3/3] sg/001: add regression test for syzcaller generated GPF in sg_read path To: Johannes Thumshirn , Omar Sandoval Cc: Linux Block Layer Mailinglist , Linux SCSI Mailinglist References: <79600648b662bc8b9e701ff6627986887384585b.1495201975.git.jthumshirn@suse.de> <20170522175905.GA17738@vader.DHCP.thefacebook.com> <491d4221-8d89-8284-0971-d6f0e47b6463@suse.de> From: Jens Axboe Message-ID: <5417a4c9-fb9f-af9e-fa4a-fffb113a0f30@kernel.dk> Date: Tue, 23 May 2017 08:39:56 -0600 MIME-Version: 1.0 In-Reply-To: <491d4221-8d89-8284-0971-d6f0e47b6463@suse.de> Content-Type: text/plain; charset=utf-8 List-ID: On 05/23/2017 08:25 AM, Johannes Thumshirn wrote: > On 05/23/2017 04:15 PM, Jens Axboe wrote: >> Add some code to the framework that allows you to get the corresponding >> SG device for a SCSI block device? Make that part of the prepare, skip >> the test if the block device isn't a SCSI dev. > > Well the code is already there (in patch 2/3). > > I'll pack it into the prepare stage. I tried to look up that commit: 48ae8484e9fc ("scsi: sg: don't return bogus Sg_requests") but that isn't in Linus' tree. Even searched for just the title, still didn't find anything. I'm assuming this is a bug in the sg.c driver, in which case the 2/3 prep and real test case looks fine. For generic device testing, we should just use SG_IO and not bother with sg.c at all. The world would be a better place if we could just get rid of sg.c... -- Jens Axboe