Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp777181pxb; Thu, 15 Apr 2021 06:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA10sW7xPd6Ev2eZUSOUWBplhEh53PRqGCdOk4siICHhEJb8EKM3uOFQDdVsFmNXXsz+C2 X-Received: by 2002:a17:906:6bc8:: with SMTP id t8mr3466347ejs.115.1618493202448; Thu, 15 Apr 2021 06:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618493202; cv=none; d=google.com; s=arc-20160816; b=DoBc52iifrRAv6VbdB5Qyhgdq0ShqJIGgWwqxpNVtdaO0Y0QI/C6A+GgclVxY0Nb50 2Rtw5nlvelEjtZXRLA2AAs7kOVqmGpe/AXBfSBeQkjGU5SuogDmSTLm860xI9XZWx38H r1M50XijfEo5WNHihfDUyNbV+ogYQi1rAn2hRaKEhj4NYrJwwJ7cnF9sZ0Tkq6ti8/t5 69vnGPpMxoxSMoz/sJPBoPjG0+tYsHf57MOVx1c3JgCMZgGMkVnJO7mHNU3ZusNaeKLa ctvgx0eh1AAR1zeCOzerAehn2FkMa1Bn4FCN2HDPTMNsGJ+fDLrLfkFp8+8wTAeVk004 pPHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:emacs:references:subject:cc:to:from; bh=J07lTkF8j/X/4FHqm/OLkMRokpXRrMaoLLkYQ2pp5t8=; b=sulR68tUaf0aMXrlLEFFuK9sNAdSbXQKPEZxcmw+BJum4lFooAcRSKt7dXDgHXl7qV fuhOaoZX78cyhg6PAKTZRbdj4k/gsv+ZDm8/OgYltZ0oJ79kAqHzDWE93f/IyC7pvfa4 Oye2CN5skfEgOp/IyAzB3QnXCykDBbM/KSDs0f4VF+TaHZv25yN1xsjTZ5iavKlSSHGs u2x5SGKZxe3wYxkyXLdKOjfXt5DkiNksopcFvaESehCPTmrMP+sJubIzrpPQtqt59NiO EVPyYRZNdU4ZXXSRcn+HWVJuc/J9xqCkA/VwunL+vg1dzJkZNcsaFx77rCldg4W2uuod cLrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o8si2087053ejr.670.2021.04.15.06.26.18; Thu, 15 Apr 2021 06:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232877AbhDONZd (ORCPT + 99 others); Thu, 15 Apr 2021 09:25:33 -0400 Received: from icebox.esperi.org.uk ([81.187.191.129]:48454 "EHLO mail.esperi.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232759AbhDONZd (ORCPT ); Thu, 15 Apr 2021 09:25:33 -0400 X-Greylist: delayed 2585 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Apr 2021 09:25:32 EDT Received: from loom (nix@sidle.srvr.nix [192.168.14.8]) by mail.esperi.org.uk (8.16.1/8.16.1) with ESMTP id 13FCg21I028870; Thu, 15 Apr 2021 13:42:02 +0100 From: Nix To: "Maciej W. Rozycki" Cc: Khalid Aziz , "James E.J. Bottomley" , "Martin K. Petersen" , Bernd Schubert , Christoph Hellwig , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] scsi: Set allocation length to 255 for ATA Information VPD page References: Emacs: a compelling argument for pencil and paper. Date: Thu, 15 Apr 2021 13:42:02 +0100 In-Reply-To: (Maciej W. Rozycki's message of "Thu, 15 Apr 2021 00:39:28 +0200 (CEST)") Message-ID: <878s5joh2d.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DCC--Metrics: loom 1481; Body=8 Fuz1=8 Fuz2=8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14 Apr 2021, Maciej W. Rozycki stated: > Set the allocation length to 255 for the ATA Information VPD page > requested in the WRITE SAME handler, so as not to limit information > examined by `scsi_get_vpd_page' in the supported vital product data > pages unnecessarily. > > Originally it was thought that Areca hardware may have issues with a > valid allocation length supplied for a VPD inquiry, however older SCSI > standard revisions[1] consider 255 the maximum length allowed and what Aaaah. That explains a lot! (Not that I can remember what SCSI standard rev that Areca firmware claimed to implement. I know I never updated the firmware, so it's going to be something no newer than mid-2009 and probably quite a bit older.) > Nix, > > I can see you're still around. Would you therefore please be so kind > as to verify this change with your Areca hardware if you still have it? It's been up in the loft for years, but I'll get it out this weekend and give it a spin :) this'll let me make sure the disks still spin as well, which matters for an in-case-of-lightning-strike disaster-recovery backup box. (I just hope this kernel boots on it at all. It's about three years since I retired it... let's see!) > It looks to me like you were thinking in the right direction with: > . It's the sort of mistake I could see myself making: an easy mistake to make when so many things in C require buffer size - 1 or you get a disastrous security hole... -- NULL && (void)