Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp41986rbe; Wed, 28 Feb 2024 11:23:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXgUBfTbCZtoRVs7pHgxTqANlJ84lFUnkxVZTjTJeLI+OXKeej+NOjYCMIMNQ7rtmSW6cROrJZnvOGuG+8INdfxPaydi/MXHQ6OD2QRjw== X-Google-Smtp-Source: AGHT+IGb7LST9sdZIBajUsI7kcINs7512uCqp1Ft82Hb8Jw74GLgttfT35zXHnzrf3jbV382bqQc X-Received: by 2002:a05:6870:e2d3:b0:21f:2ab8:ee6a with SMTP id w19-20020a056870e2d300b0021f2ab8ee6amr636502oad.45.1709148217631; Wed, 28 Feb 2024 11:23:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709148217; cv=pass; d=google.com; s=arc-20160816; b=JLSsp35cAu6sveCTZzu73De4q7XJsRL+l4RTR5PD5SeT+pXHyh80bylVGj9e7yhfIu arl+Asbi1lx/d223HO7BNXmHmjlzijRDSgZp9Je7z6aWPf6y8G95GG8oqbbrRnD3KVIe cJlzHhFHxt3WzYv9jNAthxgrZjazG1T/5SMGa0chPTNKO1fOBZ2wgP8GtHIIT+79dYi6 rwtFMyxmcjHmh0bHtL4zcjFktflN1qLAdmuj0lFgObTL/He9ZuBVP3CmgixlNV9G7k2h EjK3d8yEOimgLfBaqO8svQ3SwB11jGJ57oIMEyO/d1jH8tkL8X4hCt0q5CgqQp3jx+OK hCTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=7wodWzzvT5AfFACf6Qwny7otGm9W5yysuPilleariZk=; fh=wqdoRlSl3sf0KRkEQpHOj8yTetLy30qZmd+bwdmvhes=; b=TVjx2p8VUSPLUiq+8uX3PaS58fvAXTVb63skKC3yy+ZoFlpS1Phm+D3DooQLca5l2q iwePN0+ct8T8DcSZ0Lng6Yqp9e1WimzIKNA6VzAw/699tBFrmoG0x3bc6HDDTzzSk7GR LKGpl9qRJ0HFOur85LUxwuLWRD90nuwV6mA0GEgJiizJlPqUyqF2P34CpCuS4DnEyFBU L45X7Z0jhjXmwGC1LeAY8kDMikcPHDwWihK+wq/Zc77DKTNB03HETBhGOEfZejMZ4MDW nylh5CU+r/ncYSpyCmKlMVUoguR4NkYKhWU9+A9j4yGmGFdnCCTuIoNEmLzmMn1EfY+s hUhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-85590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f14-20020a05620a15ae00b00787b8f7c5besi173710qkk.659.2024.02.28.11.23.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:23:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-85590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F99E1C225D6 for ; Wed, 28 Feb 2024 19:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3485E74429; Wed, 28 Feb 2024 19:23:28 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id F1A7F71EB3 for ; Wed, 28 Feb 2024 19:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148207; cv=none; b=KvlZaFGa3d80JjlCxJEaDQl0CB8t/g6kc5qdc7CxfTvVR5GPY0p5zd+WYEhIkIRAPnPEwG3awwYcn31Mc/e4ntupktBTVTEh7jd48+9uaCLGKgpUpMYv6bi1xmxSvVEqTQYT18b4tyQ5WoWhigBloM6XPtGF1z3raahxvFIHSP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709148207; c=relaxed/simple; bh=/ob7M7yrfVFKdy3ZAyUsgLJVGAIkaDCnpFHpEHTPS/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AUY1Zx6qhne/8fjmnuDKcrr0zINHl0NgwIyAuNRZm6WwOSuWr18IRLgsEqWTl6j0EXHqWDOUKBonkoelHoGyOvWFj1RdX4M6wO8z7BeYwGd6xsi3K+uB3Z3zp9izpbWVgzVGRSmku27S3g+oFiUZAj9lGel08Wk4LYRHh2URm4o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 803267 invoked by uid 1000); 28 Feb 2024 14:23:25 -0500 Date: Wed, 28 Feb 2024 14:23:25 -0500 From: Alan Stern To: Oliver Neukum Cc: syzbot , bvanassche@acm.org, emilne@redhat.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, martin.petersen@oracle.com, syzkaller-bugs@googlegroups.com, tasos@tasossah.com, usb-storage@lists.one-eyed-alien.net Subject: Re: [syzbot] [usb-storage?] divide error in isd200_ata_command Message-ID: References: <0000000000003eb868061245ba7f@google.com> <99b0fb1b-37b3-4da4-8129-e502ed8e479a@suse.com> <9bbc5b63-33e3-44de-8bce-4c59dcce5e92@rowland.harvard.edu> <12b30393-0b4b-400e-828b-231901d8933b@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12b30393-0b4b-400e-828b-231901d8933b@suse.com> On Wed, Feb 28, 2024 at 05:20:29PM +0100, Oliver Neukum wrote: > On 26.02.24 19:13, Alan Stern wrote: > > > > It oopses here: > > > > > > } else { > > > if (!id[ATA_ID_SECTORS] || !id[ATA_ID_HEADS]) > > > goto too_early; > > > > Those two lines are debugging code you added, right? > > Yes, sorry about that. > > > > > > sectnum = (u8)((lba % id[ATA_ID_SECTORS]) + 1); > > > cylinder = (u16)(lba / (id[ATA_ID_SECTORS] * > > > id[ATA_ID_HEADS])); > > > > > > in isd200_scsi_to_ata() because it must not be called before isd200_get_inquiry_data() > > > has completed. > > > > It can't be; isd200_get_inquiry_data is called by isd200_Initialization > > during probe before any SCSI commands are transmitted. > > So, you are concluding that the bisection is spurious because > without that patch the SCSI layer would see a capacity of zero > and not even try to read anything? I don't know. My guess is that without this patch, the test would fail for some reason before the SCSI layer has a chance to issue a READ command. Maybe because of a zero capacity, like you said, or maybe something else. Whatever the reason, it looks like Martin's commit merely exposed a problem which has existed all along. Alan Stern