Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp360470pxb; Wed, 14 Apr 2021 17:49:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymfbns95yZklt6i9lUvbSzh0Dwy5QTIP9YBOGoxVPulKRCZNJd7rFg2ecx3RNAkdyLvU0v X-Received: by 2002:a17:903:1ce:b029:eb:4e2d:7f73 with SMTP id e14-20020a17090301ceb02900eb4e2d7f73mr1044001plh.24.1618447793276; Wed, 14 Apr 2021 17:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447793; cv=none; d=google.com; s=arc-20160816; b=wC4VypNkIDj3fYHS3g3cZrawD3/zPeNmddZ/l2raX3QfJLUHfoqDRHzzCNirpb4nZL we2VT+JLiQoC49KbnigSpPDyg+LJHylHHRK8P/5b1Rg60Z1yYsNEfPw2TRl6KGKEqQpQ bqJzdk3915xlX919EAtZFUjo0HNzutbGZbOnlvHlgFD6Sz72ZLtLg8vfqGyIOTTMdEfu dZT/06Uqm2J6Gnqirx/98dRwAlqSDMydQtzdKw/wtSKhvH8da/qnrPuyUpTR1nlwa3OX SBfhX0aQBCy76w7NLoL77rNeYn42UCTBPAB4htUYNCxEa8N5CFsMSoE/S6/Ym210Vn/v odrQ== 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:subject:cc:to :from:date; bh=/YN/5YGOsFpvwnAKquHUglRNiXJ87wfRHk2cG3jeNf8=; b=G87OhZtktUvzJxun1OL/i2xiT5ocek6YXV1EP/OQak3S8yDYgiTMGLZy3iCGv6gmCe 5A4TTkgoUzPunEG2iUMr4L/y72ie1slvIIxY4gon71vefmkDNzlN2baePC027Zf6DmVG lJ2Q091qWG1zO0V3u4LFiPjGSGmOrya16qWM3I5tpXnKwfv27HZvmD5LS7ZbPVZ23IUt LJtcSMFPhHHnxLFxqT3UiJbPFAXeZnlwgGcjnPftxMc/ug8eTaLwdICaWL6kieJBdwgJ Qsuy+3zlG6Ail6HZ2td3bX+fsXwDbtxlHBYLfL+swqIeqsLHai7PyHjBcLbMOkRAKxWz SIUg== 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 g9si1246014pgr.207.2021.04.14.17.49.41; Wed, 14 Apr 2021 17:49:53 -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 S232841AbhDNWjZ (ORCPT + 99 others); Wed, 14 Apr 2021 18:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbhDNWjZ (ORCPT ); Wed, 14 Apr 2021 18:39:25 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2BF28C061574; Wed, 14 Apr 2021 15:39:03 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 579A192009C; Thu, 15 Apr 2021 00:38:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 4CD8B92009B; Thu, 15 Apr 2021 00:38:59 +0200 (CEST) Date: Thu, 15 Apr 2021 00:38:59 +0200 (CEST) From: "Maciej W. Rozycki" To: Khalid Aziz , "James E.J. Bottomley" , "Martin K. Petersen" cc: Christoph Hellwig , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] Bring the BusLogic host bus adapter driver up to Y2021 Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, First of all, does anyone have a copy of: "MultiMaster UltraSCSI Host Adapters for PCI Systems: Technical Reference Manual" (pub. 3002493-E)? It used to live in the "Mylex Manuals and Documentation Archives" section of the Mylex web site , specifically at: . Another useful document might be: "Wide SCSI Host Adapters for PCI and EISA Systems: Technical Reference Manual" (pub. 3000763-A), which used to live at: , linked from the same place. Sadly I didn't get to these resources while they were still there, and neither did archive.org, and now they not appear available from anywhere online. I'm sure Leonard had this all, but, alas, he is long gone too. It looks to me like either or both documents would help understanding how the BusLogic devices (are supposed to) work and possibly deal with issues in a better way. So we are here owing to Christoph's recent ISA bounce buffering sweep: which has prompted me to verify the current version of Linux with my old server, which has been long equipped with venerable Linux 2.6.18 and which I now have available for general experimenting, and the BusLogic BT-958 PCI SCSI host bus adapter the server has used for 20-something years now. This revealed numerous issues with the BusLogic driver. Firstly (1/5) it has suffered from some bitrot and messages produced have become messy from the lack of update for proper `pr_cont' support. Secondly (2/5) there has been a potential buffer overrun/stack corruption security issue from using an unbounded `vsprintf' call. Thirdly (3/5) it has become obvious the BusLogic driver would have been non-functional, should I have upgraded the kernel, at least with this configuration for some 8 years now, and the underlying cause has been a long-known issue with the MultiMaster firmware I have dealt with already, back in 2003. To put it short the firmware cannot cope with commands that request an allocation length exceeding the length of actual data returned. I have originally observed it with a LOG SENSE command in the course of investigating why smartmontools bring the system to a death, and worked it around: by issuing the command twice, first just to obtain the allocation length required. As it turns out we need a similar workaround in the kernel now. But in the course of investigating this issue I have discovered there is a second bottom to it and hence I have prepared follow-up changes (4-5/5) to address problems with our handling of Vital Product Data INQUIRY pages. See individual change descriptions for further details. Questions, comments, concerns? Otherwise please apply. Maciej