[{"id":1772609,"web_url":"http://patchwork.ozlabs.org/comment/1772609/","msgid":"<20170921112341.59175a29.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-21T09:23:41","subject":"Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary\n\tlength","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Wed, 20 Sep 2017 19:23:14 +0200\nHalil Pasic <pasic@linux.vnet.ibm.com> wrote:\n\n> The problem is, that the current implementation places unrealistic and\n> arbitrary constraints on the length of writes to the device (that is the\n> outbound requests), by asserting ccw.count being such that that even the\n> worst case escaped payload will fit an  more or less arbitrary sized\n> buffer. Actually on protocol level there is nothing to justify such\n> a limitation.\n> \n> Another strange thing is the return value which more or less reflects\n> the size (written) after escaping instead of before escaping. This\n> is strange, because this return value is used to calculate SCSW.count.\n\nDidn't the Linux driver care about the count?\n\n> \n> Let us teach 3270 how to deal with arbitrary long writes.\n> \n> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>\n> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>\n> Reported-by: Jason J . Herne <jjherne@linux.vnet.ibm.com>\n> Tested-by: Jason J . Herne <jjherne@linux.vnet.ibm.com>\n> ---\n>  hw/char/terminal3270.c | 30 ++++++++++++++++++------------\n>  1 file changed, 18 insertions(+), 12 deletions(-)\n\nLooks good.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyWQj1x6xz9t42\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 19:24:29 +1000 (AEST)","from localhost ([::1]:52554 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duxid-0004gG-81\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 05:24:27 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57384)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duxi1-0004ex-GG\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 05:23:50 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duxhy-0003LO-Be\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 05:23:49 -0400","from mx1.redhat.com ([209.132.183.28]:53252)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1duxhy-0003KJ-4b\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 05:23:46 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id DB0648A002;\n\tThu, 21 Sep 2017 09:23:44 +0000 (UTC)","from gondolin (dhcp-192-215.str.redhat.com [10.33.192.215])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 51FBA5C8B2;\n\tThu, 21 Sep 2017 09:23:43 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com DB0648A002","Date":"Thu, 21 Sep 2017 11:23:41 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Halil Pasic <pasic@linux.vnet.ibm.com>","Message-ID":"<20170921112341.59175a29.cohuck@redhat.com>","In-Reply-To":"<20170920172314.102710-3-pasic@linux.vnet.ibm.com>","References":"<20170920172314.102710-1-pasic@linux.vnet.ibm.com>\n\t<20170920172314.102710-3-pasic@linux.vnet.ibm.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tThu, 21 Sep 2017 09:23:45 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary\n\tlength","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\t\"Jason J . Herne\" <jjherne@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tRichard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1772659,"web_url":"http://patchwork.ozlabs.org/comment/1772659/","msgid":"<d36a9f7f-bbf1-0815-a0c1-c9f36cdd1803@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-21T10:30:11","subject":"Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary\n\tlength","submitter":{"id":68297,"url":"http://patchwork.ozlabs.org/api/people/68297/","name":"Halil Pasic","email":"pasic@linux.vnet.ibm.com"},"content":"On 09/21/2017 11:23 AM, Cornelia Huck wrote:\n> On Wed, 20 Sep 2017 19:23:14 +0200\n> Halil Pasic <pasic@linux.vnet.ibm.com> wrote:\n> \n>> The problem is, that the current implementation places unrealistic and\n>> arbitrary constraints on the length of writes to the device (that is the\n>> outbound requests), by asserting ccw.count being such that that even the\n>> worst case escaped payload will fit an  more or less arbitrary sized\n>> buffer. Actually on protocol level there is nothing to justify such\n>> a limitation.\n>>\n>> Another strange thing is the return value which more or less reflects\n>> the size (written) after escaping instead of before escaping. This\n>> is strange, because this return value is used to calculate SCSW.count.\n> \n> Didn't the Linux driver care about the count?\n> \n\nMaybe Jason can answer that. I did only most basic testing with my patch\napplied (and basically no testing without my changes).\n\nFrom code perspective I'm sure it does for the reads. For the writes\nI did not look into that.\n\nHalil\n\n>>\n>> Let us teach 3270 how to deal with arbitrary long writes.\n>>\n>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>\n>> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>\n>> Reported-by: Jason J . Herne <jjherne@linux.vnet.ibm.com>\n>> Tested-by: Jason J . Herne <jjherne@linux.vnet.ibm.com>\n>> ---\n>>  hw/char/terminal3270.c | 30 ++++++++++++++++++------------\n>>  1 file changed, 18 insertions(+), 12 deletions(-)\n> \n> Looks good.\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyXvL3wb5z9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 20:30:53 +1000 (AEST)","from localhost ([::1]:52801 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duykr-0000e4-Ut\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 06:30:49 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45717)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1duykR-0000dZ-JP\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:30:29 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1duykN-0008K9-CX\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:30:23 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53108\n\thelo=mx0a-001b2d01.pphosted.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pasic@linux.vnet.ibm.com>)\n\tid 1duykN-0008IB-7f\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 06:30:19 -0400","from pps.filterd (m0098419.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8LAT9TQ010437\n\tfor <qemu-devel@nongnu.org>; Thu, 21 Sep 2017 06:30:18 -0400","from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d4aemvw9d-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Thu, 21 Sep 2017 06:30:18 -0400","from localhost\n\tby e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <pasic@linux.vnet.ibm.com>;\n\tThu, 21 Sep 2017 11:30:16 +0100","from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198)\n\tby e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tThu, 21 Sep 2017 11:30:12 +0100","from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com\n\t[9.149.105.232])\n\tby b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8LAUCCr20512800; Thu, 21 Sep 2017 10:30:12 GMT","from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 799355208A;\n\tThu, 21 Sep 2017 10:25:09 +0100 (BST)","from oc3836556865.ibm.com (unknown [9.152.224.207])\n\tby d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 04ECB5208B; \n\tThu, 21 Sep 2017 10:25:08 +0100 (BST)"],"To":"Cornelia Huck <cohuck@redhat.com>","References":"<20170920172314.102710-1-pasic@linux.vnet.ibm.com>\n\t<20170920172314.102710-3-pasic@linux.vnet.ibm.com>\n\t<20170921112341.59175a29.cohuck@redhat.com>","From":"Halil Pasic <pasic@linux.vnet.ibm.com>","Date":"Thu, 21 Sep 2017 12:30:11 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170921112341.59175a29.cohuck@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","x-cbid":"17092110-0040-0000-0000-000003DBF228","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17092110-0041-0000-0000-000025DD2C3A","Message-Id":"<d36a9f7f-bbf1-0815-a0c1-c9f36cdd1803@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-21_02:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709210145","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.158.5","Subject":"Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary\n\tlength","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\t\"Jason J . Herne\" <jjherne@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tRichard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]