From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022274; cv=none; d=zohomail.com; s=zohoarc; b=TdnrlDHUvUFXX0R+MCyhlyJ5HtQIuHxXMSt6hPKBnKEzCegcKiw3l+pqJeln/Lo0z3fIzC2GCq8tKPNXJX+aOalQ2ojIC1Yon5CrHIk7ulaT/TpOKycBSshLOMQSLqZjjKQaI069/J7aeaJDK4UXOCFePyWKNH0lXDOT1lQWZ7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022274; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OP0k54yqbjanqGf/yorgE+TGQ4bMmrkAczmTe2Q7EMs=; b=Sj38MNhog0vTO1gjwOIicYdGUm6MUPiRFJ6VRLJGsuAG94PKCOmtCRqrmr0PcWZ0FLFHceThJRHBLvIwYvKG763fstbF/ed1Kw98D7dzft+/FKWBklKVip5og/RmXu5AJwnJE74PyFcrSSk75L7bP90Tl8P5hCbBDGL146EwHfs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616022274389637.1302572963839; Wed, 17 Mar 2021 16:04:34 -0700 (PDT) Received: from localhost ([::1]:44044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfDN-0003O7-Cf for importer@patchew.org; Wed, 17 Mar 2021 19:04:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBX-0002Aq-Ty for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:39 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35368 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBW-0005Je-Dq for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:39 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBU-0006Bn-Pg; Wed, 17 Mar 2021 23:02:41 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:18 +0000 Message-Id: <20210317230223.24854-2-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 1/6] esp: don't underflow cmdfifo if no message out/command data is present X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" If a guest sends a TI (Transfer Information) command without previously sen= ding any message out/command phase data then cmdfifo will underflow triggering an assert reading the IDENTIFY byte. Buglink: https://bugs.launchpad.net/qemu/+bug/1919035 Signed-off-by: Mark Cave-Ayland Tested-by: Alexander Bulekov --- hw/scsi/esp.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 507ab363bc..5d3f1ccbc8 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -318,18 +318,24 @@ static void do_busid_cmd(ESPState *s, uint8_t busid) =20 static void do_cmd(ESPState *s) { - uint8_t busid =3D fifo8_pop(&s->cmdfifo); + uint8_t busid; uint32_t n; =20 - s->cmdfifo_cdb_offset--; + if (fifo8_num_used(&s->cmdfifo)) { + busid =3D fifo8_pop(&s->cmdfifo); =20 - /* Ignore extended messages for now */ - if (s->cmdfifo_cdb_offset) { - fifo8_pop_buf(&s->cmdfifo, s->cmdfifo_cdb_offset, &n); - s->cmdfifo_cdb_offset =3D 0; - } + if (s->cmdfifo_cdb_offset) { + s->cmdfifo_cdb_offset--; + + /* Ignore extended messages for now */ + if (s->cmdfifo_cdb_offset) { + fifo8_pop_buf(&s->cmdfifo, s->cmdfifo_cdb_offset, &n); + s->cmdfifo_cdb_offset =3D 0; + } + } =20 - do_busid_cmd(s, busid); + do_busid_cmd(s, busid); + } } =20 static void satn_pdma_cb(ESPState *s) --=20 2.20.1 From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022401; cv=none; d=zohomail.com; s=zohoarc; b=f4nwNjd3iBBo+K2HmhD58NYHWpROrczUV0Asw07B6IuME9HnzpaAumAA4NSrqEfuGpbXtuytaZ6MUwHXZhVsR3BxqSNdR5ucDZQYY4YYKiv71nC/fDETAPDc8+5zmWVYwNnalrn0qlaw5Znl8dIz0Q8wBSlQIBu1L525idAMLCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022401; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CegyZYw4OKu8QAH1cgbM8+B6vlKV/u0qA7Y4exQvEis=; b=lKS+NXZd/+KxyuIkch7YTqBDlNYRTDh8hzkNg3YIMOL8XcjG53FW7BR66HqmUkk8nUPLL/EvmjJ90q8Ow2a7b5wTHdGgmfX6vUdXtWs4cBpuCgmEVRnG0BrOw6ifD1kH9/v+zdQk0ytx4W3RlOLjoZsdHI7e+M0oKBSMqJ8gbUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16160224014111020.4654950105235; Wed, 17 Mar 2021 16:06:41 -0700 (PDT) Received: from localhost ([::1]:49268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfFQ-0005iM-2Z for importer@patchew.org; Wed, 17 Mar 2021 19:06:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBc-0002Gv-0p for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:44 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35380 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBa-0005MH-Ep for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:43 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBZ-0006Bn-Kh; Wed, 17 Mar 2021 23:02:46 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:19 +0000 Message-Id: <20210317230223.24854-3-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 2/6] esp: don't overflow cmdfifo if TC is larger than the cmdfifo size X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" If a guest transfers the message out/command phase data using DMA with a TC that is larger than the cmdfifo size then the cmdfifo overflows triggering an assert. Limit the size of the transfer to the free space available in cmdfifo. Buglink: https://bugs.launchpad.net/qemu/+bug/1919036 Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Alexander Bulekov --- hw/scsi/esp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 5d3f1ccbc8..bbcbfa4a91 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -579,6 +579,7 @@ static void esp_do_dma(ESPState *s) cmdlen =3D fifo8_num_used(&s->cmdfifo); trace_esp_do_dma(cmdlen, len); if (s->dma_memory_read) { + len =3D MIN(len, fifo8_num_free(&s->cmdfifo)); s->dma_memory_read(s->dma_opaque, buf, len); fifo8_push_all(&s->cmdfifo, buf, len); } else { --=20 2.20.1 From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022310; cv=none; d=zohomail.com; s=zohoarc; b=hbhCRqEkfMG2EAMeUvSVs4X83mvKjsYnLlH0/x4tsMiFc0RBGbLsI3jEJQHwX/TFKpT3mlDTIYpnpbwpxy+RhszZtuYjffzsDs+1RejLNM5uU3n1/V0jY7Ptrgs4ZbzVEXOoZXPpG9fVrtcQJYA+51YI48rwDZdXAVC1koE7bqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022310; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ORb6Wa9Fa/vmJpLe9u1b/EKYUfbTufb+41PJnlG2u5U=; b=IAFBi0usKHJP/1ZLMEO3MIdjYHbMwgd38mopkGAxYwwMuIipH6argvcqFIQCUGppCtQA6bvWma50kaLiCfE5Tde2q75TVQeXtt1sKHjlz1EBVHnAHlMjw7P4U9e3dfFgJIAGzPqNLVVTG7HDnYZj2pGYLJw9MEHeiuH10Hk7qTE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616022310960680.4123411357598; Wed, 17 Mar 2021 16:05:10 -0700 (PDT) Received: from localhost ([::1]:45070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfDx-0003ok-UX for importer@patchew.org; Wed, 17 Mar 2021 19:05:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBk-0002TM-3E for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:52 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35390 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBi-0005Oy-Bp for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:51 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBe-0006Bn-Gq; Wed, 17 Mar 2021 23:02:53 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:20 +0000 Message-Id: <20210317230223.24854-4-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 3/6] esp: ensure cmdfifo is not empty and current_dev is non-NULL X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When about to execute a SCSI command, ensure that cmdfifo is not empty and current_dev is non-NULL. This can happen if the guest tries to execute a TI (Transfer Information) command without issuing one of the select commands first. Buglink: https://bugs.launchpad.net/qemu/+bug/1910723 Buglink: https://bugs.launchpad.net/qemu/+bug/1909247 Signed-off-by: Mark Cave-Ayland Tested-by: Alexander Bulekov --- hw/scsi/esp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index bbcbfa4a91..ae362c9dfb 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -286,6 +286,9 @@ static void do_busid_cmd(ESPState *s, uint8_t busid) trace_esp_do_busid_cmd(busid); lun =3D busid & 7; cmdlen =3D fifo8_num_used(&s->cmdfifo); + if (!cmdlen || !s->current_dev) { + return; + } buf =3D (uint8_t *)fifo8_pop_buf(&s->cmdfifo, cmdlen, &n); =20 current_lun =3D scsi_device_find(&s->bus, 0, s->current_dev->id, lun); --=20 2.20.1 From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022492; cv=none; d=zohomail.com; s=zohoarc; b=h474EpHdvmaXU8k6anNstXFAQf9Wrb8o7QglhGKo8/acGbWKaybZ+rUNyhFRn0cZzXB3XUGAz8iJHoCpV608YbJ/Nmn596mYNZ+yYinZqmb34O2dU5B8A/fR/W1+806J6H8j97xFEdC56+tTuS8zsN0iwPs07QXLIyZw0kBC2QY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022492; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rrvJDgOJPcAT8LGGx2vq7cbNdJ5fXTZoV+bUFKgTdrY=; b=itK/TUQWdjByBy6f2iyv9iiErEY4Wq/4zdlM/IWD39nf0MAqHBWJ4HHOf785Kbrx7lV99uA+fiREJDouQL5WR6EtYxSwUPvA1R9a7pafgKxvX+SIznmggDCycTjSPPwZCsAONT/RPxIfTNYwXjy0d8U8/jyOADju8Q6ST+slJJI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616022492558212.27889491375015; Wed, 17 Mar 2021 16:08:12 -0700 (PDT) Received: from localhost ([::1]:52852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfGt-0007Dk-Ir for importer@patchew.org; Wed, 17 Mar 2021 19:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBq-0002iT-U6 for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:58 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35398 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBn-0005RQ-UC for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:02:58 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBm-0006Bn-0a; Wed, 17 Mar 2021 23:03:00 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:21 +0000 Message-Id: <20210317230223.24854-5-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 4/6] esp: don't underflow fifo when writing to the device X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When writing to the device make sure that the fifo is not empty, otherwise = the fifo will underflow triggering an assert. Buglink: https://bugs.launchpad.net/qemu/+bug/1909247 Signed-off-by: Mark Cave-Ayland Tested-by: Alexander Bulekov --- hw/scsi/esp.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index ae362c9dfb..bb57125035 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -509,18 +509,20 @@ static void do_dma_pdma_cb(ESPState *s) /* Copy FIFO data to device */ len =3D MIN(s->async_len, ESP_FIFO_SZ); len =3D MIN(len, fifo8_num_used(&s->fifo)); - memcpy(s->async_buf, fifo8_pop_buf(&s->fifo, len, &n), len); - s->async_buf +=3D n; - s->async_len -=3D n; - s->ti_size +=3D n; - - if (n < len) { - /* Unaligned accesses can cause FIFO wraparound */ - len =3D len - n; + if (len) { memcpy(s->async_buf, fifo8_pop_buf(&s->fifo, len, &n), len); s->async_buf +=3D n; s->async_len -=3D n; s->ti_size +=3D n; + + if (n < len) { + /* Unaligned accesses can cause FIFO wraparound */ + len =3D len - n; + memcpy(s->async_buf, fifo8_pop_buf(&s->fifo, len, &n), len= ); + s->async_buf +=3D n; + s->async_len -=3D n; + s->ti_size +=3D n; + } } =20 if (s->async_len =3D=3D 0) { @@ -730,10 +732,12 @@ static void esp_do_nodma(ESPState *s) =20 if (to_device) { len =3D MIN(fifo8_num_used(&s->fifo), ESP_FIFO_SZ); - memcpy(s->async_buf, fifo8_pop_buf(&s->fifo, len, &n), len); - s->async_buf +=3D len; - s->async_len -=3D len; - s->ti_size +=3D len; + if (len) { + memcpy(s->async_buf, fifo8_pop_buf(&s->fifo, len, &n), len); + s->async_buf +=3D len; + s->async_len -=3D len; + s->ti_size +=3D len; + } } else { len =3D MIN(s->ti_size, s->async_len); len =3D MIN(len, fifo8_num_free(&s->fifo)); --=20 2.20.1 From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022647; cv=none; d=zohomail.com; s=zohoarc; b=hdemtRotrcxlB63BY56WqGKBHxxqoXgPUC+guHfTukElSqzu093Qm5uOnFurFekRm2ry8aURTOrRSU5nk4JqlIe7XGD9Ko8guhN7e3sJQm/1gDc9/o8MfeR5qxanqNvHhI/brFVx9y4rU1AcCeu+/hz1awJXvZXgPYw5sDFN3tg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022647; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7z+k2rAYgmzYQblYdJVVUa6JQlNlYI3A9fUvimjPTTs=; b=jD6q4rvkWCL/v2NS927TOVaSdj6Ut0GEfhIfTeiBaUO0XzZsm6bjlxfaR6sirsl8+fXX3ICRl7AY7l9PM647sjvLrHUEaD/4pCOqQs5BTUwWJfvSZqyPClTgHBQ/j09dAGv02a1BoYefMdlD7g8JaPVGLfluNwOPkxHtQMXlhB0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161602264711497.61340820930502; Wed, 17 Mar 2021 16:10:47 -0700 (PDT) Received: from localhost ([::1]:55764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfJN-0008TV-OO for importer@patchew.org; Wed, 17 Mar 2021 19:10:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBu-0002pd-Oh for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:03:02 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35410 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBs-0005TR-UC for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:03:02 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBs-0006Bn-E9; Wed, 17 Mar 2021 23:03:05 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:22 +0000 Message-Id: <20210317230223.24854-6-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 5/6] esp: always check current_req is not NULL before use in DMA callbacks X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len !=3D 0) then the next TI (Transfer Information) command will attempt to reference the NULL pointer causing a segfault. Buglink: https://bugs.launchpad.net/qemu/+bug/1910723 Buglink: https://bugs.launchpad.net/qemu/+bug/1909247 Signed-off-by: Mark Cave-Ayland Tested-by: Alexander Bulekov --- hw/scsi/esp.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index bb57125035..d7b81b7608 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -505,6 +505,10 @@ static void do_dma_pdma_cb(ESPState *s) return; } =20 + if (!s->current_req) { + return; + } + if (to_device) { /* Copy FIFO data to device */ len =3D MIN(s->async_len, ESP_FIFO_SZ); @@ -538,11 +542,9 @@ static void do_dma_pdma_cb(ESPState *s) return; } else { if (s->async_len =3D=3D 0) { - if (s->current_req) { - /* Defer until the scsi layer has completed */ - scsi_req_continue(s->current_req); - s->data_in_ready =3D false; - } + /* Defer until the scsi layer has completed */ + scsi_req_continue(s->current_req); + s->data_in_ready =3D false; return; } =20 @@ -616,6 +618,9 @@ static void esp_do_dma(ESPState *s) } return; } + if (!s->current_req) { + return; + } if (s->async_len =3D=3D 0) { /* Defer until data is available. */ return; @@ -725,6 +730,10 @@ static void esp_do_nodma(ESPState *s) return; } =20 + if (!s->current_req) { + return; + } + if (s->async_len =3D=3D 0) { /* Defer until data is available. */ return; --=20 2.20.1 From nobody Wed Nov 19 12:36:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1616022423; cv=none; d=zohomail.com; s=zohoarc; b=PFHfSTHTMjeAntHKvSCKYPFt+n93VXXggdV1lyUIPVbkdd5AD1DFglYtGVvpKyfCsRT+e3d9MnMcPQ9QW8kCtHSUpNhbhDPXjieKlKrh0BqmD3Sc/qcqReIQpPP0QpQRSciwVahvifdDG8S78yFwff9w56QF8k9VZjIYFka1rUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616022423; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0ysrgGGeDykM3/YaYLOIhxn/0rn2bnyV04YEVhJkMgE=; b=j1QgOOoyfv+udg/NaMSTc3104UA3RAFzgnZO5r/6x+ue1Bm4U2OgcZRJiofZztplW2W5GGQFzAn/Rfyq3HM9adNTxPaMMCvP7JDKCcY+PnVK0FDMCLM/Z5fQ2N6jGX/Ahpd0SVywtpL/3GBzjhov+qMkRIJ6/AH1oj3MzKFf+CQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616022423762546.187563841926; Wed, 17 Mar 2021 16:07:03 -0700 (PDT) Received: from localhost ([::1]:49934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfFm-00060I-QA for importer@patchew.org; Wed, 17 Mar 2021 19:07:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfC1-0002tx-4c for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:03:09 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:35420 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfBy-0005Vs-Bv for qemu-devel@nongnu.org; Wed, 17 Mar 2021 19:03:08 -0400 Received: from host86-148-103-84.range86-148.btcentralplus.com ([86.148.103.84] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMfBx-0006Bn-B7; Wed, 17 Mar 2021 23:03:10 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, alxndr@bu.edu, laurent@vivier.eu, pbonzini@redhat.com Date: Wed, 17 Mar 2021 23:02:23 +0000 Message-Id: <20210317230223.24854-7-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> References: <20210317230223.24854-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.103.84 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 6/6] tests/qtest: add tests for am53c974 device X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Use the autogenerated fuzzer test cases as the basis for a set of am53c974 regression tests. Signed-off-by: Mark Cave-Ayland Reviewed-by: Alexander Bulekov --- tests/qtest/am53c974-test.c | 122 ++++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 1 + 2 files changed, 123 insertions(+) create mode 100644 tests/qtest/am53c974-test.c diff --git a/tests/qtest/am53c974-test.c b/tests/qtest/am53c974-test.c new file mode 100644 index 0000000000..c90bd4c187 --- /dev/null +++ b/tests/qtest/am53c974-test.c @@ -0,0 +1,122 @@ +/* + * QTest testcase for am53c974 + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" + +#include "libqos/libqtest.h" + + +static void test_cmdfifo_underflow_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + qtest_outl(s, 0xcf8, 0x80001004); + qtest_outw(s, 0xcfc, 0x01); + qtest_outl(s, 0xcf8, 0x8000100e); + qtest_outl(s, 0xcfc, 0x8a000000); + qtest_outl(s, 0x8a09, 0x42000000); + qtest_outl(s, 0x8a0d, 0x00); + qtest_outl(s, 0x8a0b, 0x1000); + qtest_quit(s); +} + +static void test_cmdfifo_overflow_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + qtest_outl(s, 0xcf8, 0x80001004); + qtest_outw(s, 0xcfc, 0x01); + qtest_outl(s, 0xcf8, 0x8000100e); + qtest_outl(s, 0xcfc, 0x0e000000); + qtest_outl(s, 0xe40, 0x03); + qtest_outl(s, 0xe0b, 0x4100); + qtest_outl(s, 0xe0b, 0x9000); + qtest_quit(s); +} + +static void test_target_selected_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + qtest_outl(s, 0xcf8, 0x80001001); + qtest_outl(s, 0xcfc, 0x01000000); + qtest_outl(s, 0xcf8, 0x8000100e); + qtest_outl(s, 0xcfc, 0xef800000); + qtest_outl(s, 0xef8b, 0x4100); + qtest_outw(s, 0xef80, 0x01); + qtest_outl(s, 0xefc0, 0x03); + qtest_outl(s, 0xef8b, 0xc100); + qtest_outl(s, 0xef8b, 0x9000); + qtest_quit(s); +} + +static void test_fifo_underflow_on_write_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + qtest_outl(s, 0xcf8, 0x80001010); + qtest_outl(s, 0xcfc, 0xc000); + qtest_outl(s, 0xcf8, 0x80001004); + qtest_outw(s, 0xcfc, 0x01); + qtest_outl(s, 0xc008, 0x0a); + qtest_outl(s, 0xc009, 0x41000000); + qtest_outl(s, 0xc009, 0x41000000); + qtest_outl(s, 0xc00b, 0x1000); + qtest_quit(s); +} + +static void test_cancelled_request_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + qtest_outl(s, 0xcf8, 0x80001010); + qtest_outl(s, 0xcfc, 0xc000); + qtest_outl(s, 0xcf8, 0x80001004); + qtest_outw(s, 0xcfc, 0x05); + qtest_outb(s, 0xc046, 0x02); + qtest_outl(s, 0xc00b, 0xc100); + qtest_outl(s, 0xc040, 0x03); + qtest_outl(s, 0xc040, 0x03); + qtest_bufwrite(s, 0x0, "\x41", 0x1); + qtest_outl(s, 0xc00b, 0xc100); + qtest_outw(s, 0xc040, 0x02); + qtest_outw(s, 0xc040, 0x81); + qtest_outl(s, 0xc00b, 0x9000); + qtest_quit(s); +} + +int main(int argc, char **argv) +{ + const char *arch =3D qtest_get_arch(); + + g_test_init(&argc, &argv, NULL); + + if (strcmp(arch, "i386") =3D=3D 0) { + qtest_add_func("am53c974/test_cmdfifo_underflow_ok", + test_cmdfifo_underflow_ok); + qtest_add_func("am53c974/test_cmdfifo_overflow_ok", + test_cmdfifo_overflow_ok); + qtest_add_func("am53c974/test_target_selected_ok", + test_target_selected_ok); + qtest_add_func("am53c974/test_fifo_underflow_on_write_ok", + test_fifo_underflow_on_write_ok); + qtest_add_func("am53c974/test_cancelled_request_ok", + test_cancelled_request_ok); + } + + return g_test_run(); +} diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 66ee9fbf45..a44f612a34 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -63,6 +63,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test= '] : []) + \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : [= ]) + \ + (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) = + \ qtests_pci + = \ ['fdc-test', 'ide-test', --=20 2.20.1