[{"id":1763271,"web_url":"http://patchwork.ozlabs.org/comment/1763271/","msgid":"<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-05T11:58:47","subject":"Re: [Qemu-devel] [PATCH] intc: arm_gicv3: limit GICR ipriority index","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 5 September 2017 at 12:21, P J P <ppandit@redhat.com> wrote:\n> From: Prasad J Pandit <pjp@fedoraproject.org>\n>\n> When reading or writing to GICR ipriority array, index 'irq'\n> could go beyond its bounds; Restrict it within array limits.\n>\n> Reported-by: Guoxiang Niu <niuguoxiang@huawei.com>\n> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>\n> ---\n>  hw/intc/arm_gicv3_redist.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c\n> index 77e5cfa327..7683c4cc7f 100644\n> --- a/hw/intc/arm_gicv3_redist.c\n> +++ b/hw/intc/arm_gicv3_redist.c\n> @@ -187,7 +187,7 @@ static MemTxResult gicr_readl(GICv3CPUState *cs, hwaddr offset,\n>      case GICR_ICACTIVER0:\n>          *data = gicr_read_bitmap_reg(cs, attrs, cs->gicr_iactiver0);\n>          return MEMTX_OK;\n> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\n> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\n>      {\n>          int i, irq = offset - GICR_IPRIORITYR;\n>          uint32_t value = 0;\n> @@ -310,7 +310,7 @@ static MemTxResult gicr_writel(GICv3CPUState *cs, hwaddr offset,\n>      case GICR_ICACTIVER0:\n>          gicr_write_clear_bitmap_reg(cs, attrs, &cs->gicr_iactiver0, value);\n>          return MEMTX_OK;\n> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\n> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\n>      {\n>          int i, irq = offset - GICR_IPRIORITYR;\n\nWhy do you think the buffer can be overrun? These functions\nare the word (4 byte) access functions, and they cannot\nbe called with a non-4-aligned offset (see the asserts in\ngicv3_redist_read() and gicv3_redist_write()).\n\nthanks\n-- PMM","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"goR7e2PZ\"; dkim-atps=neutral"],"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 3xmldV4SP1z9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 21:59:58 +1000 (AEST)","from localhost ([::1]:58277 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 1dpCWK-00036S-NI\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 07:59:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34822)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpCVe-00030Q-W8\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 07:59:19 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpCVa-0003lu-6q\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 07:59:15 -0400","from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:37287)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dpCVZ-0003lD-Um\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 07:59:10 -0400","by mail-wm0-x235.google.com with SMTP id u26so18146710wma.0\n\tfor <qemu-devel@nongnu.org>; Tue, 05 Sep 2017 04:59:09 -0700 (PDT)","by 10.223.159.68 with HTTP; Tue, 5 Sep 2017 04:58:47 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=LiJ9HGNKlkmjxTQEAWilh6v/vGzj+1t8UKjpgHm50uM=;\n\tb=goR7e2PZS0Xx4zZKPvEtWXCzyF8Mv5FGybYVxTHNhLTrB+cvAlW6OvlGI4V1qYeBji\n\tU13+bM3/XdhLv+lH0qh41eMMpiPkZmEEafDQrYTLQ7daxdD3yFl9gzDsGQWFj4LXsPDd\n\t6boqz9wS/EXJBRSE0BRzO39MwDPFcSBD6t3A4=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=LiJ9HGNKlkmjxTQEAWilh6v/vGzj+1t8UKjpgHm50uM=;\n\tb=i23FA2ayElJUXgbmA9Obdx1HzOBw3kml1u7fvrMnHUz5CYKZ7cqgeLYOmXDJe0fCuR\n\tLQT+RHAa9wID/QwNIK5UY+vvCVNsV3CpZ0Y0dSgCAS/Wap1JhlbK/frA0sAL1onz+Jgq\n\tGuiLvru7X9on6bOEGNX2WDk6HxudF0iZinQFxgZcg62f0Ceb3UtJsuE7KPhHwybf9Teo\n\tF4TDv72KjCIwlJOKMpAAef1kUMkaKm68KfNyaKeq4YIoWxaIQLccvv8xpLBF/seq014Q\n\tgX8dzB3ycTRCoTT3wawxVzQ3CHJn3wXAWOVdtsELTCAhGYz+/hOPPQ2ywHqkXPpCFvKG\n\tHkuA==","X-Gm-Message-State":"AHPjjUg5FUFQcdVRIxkHEiyi8FgL+2PdB3O3fW7CC1tfUnPXcQps0UEH\n\t2IM4xFVrzh0qO+8h+xD0/cHZeiH6A7gc","X-Google-Smtp-Source":"ADKCNb4NuV482ksVAKM8Y1xWhMTDIQVh6mt7XOqIOR2VLbX8n6srwGGOCEbHA8xOUGF/JhyV3Wluq3DXq/YeR4Niy6E=","X-Received":"by 10.28.34.198 with SMTP id i189mr2768477wmi.165.1504612748548; \n\tTue, 05 Sep 2017 04:59:08 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170905112152.8851-1-ppandit@redhat.com>","References":"<20170905112152.8851-1-ppandit@redhat.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Tue, 5 Sep 2017 12:58:47 +0100","Message-ID":"<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","To":"P J P <ppandit@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::235","Subject":"Re: [Qemu-devel] [PATCH] intc: arm_gicv3: limit GICR ipriority index","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-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, \n\tGuoxiang Niu <niuguoxiang@huawei.com>,\n\tPrasad J Pandit <pjp@fedoraproject.org>","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":1763295,"web_url":"http://patchwork.ozlabs.org/comment/1763295/","msgid":"<38d7ca82-43ca-a98a-e727-8fb5968c7d1b@amsat.org>","list_archive_url":null,"date":"2017-09-05T12:29:22","subject":"Re: [Qemu-devel] [Qemu-arm] [PATCH] intc: arm_gicv3: limit GICR\n\tipriority index","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"On 09/05/2017 08:58 AM, Peter Maydell wrote:\n> On 5 September 2017 at 12:21, P J P <ppandit@redhat.com> wrote:\n>> From: Prasad J Pandit <pjp@fedoraproject.org>\n>>\n>> When reading or writing to GICR ipriority array, index 'irq'\n>> could go beyond its bounds; Restrict it within array limits.\n>>\n>> Reported-by: Guoxiang Niu <niuguoxiang@huawei.com>\n>> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>\n>> ---\n>>   hw/intc/arm_gicv3_redist.c | 4 ++--\n>>   1 file changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c\n>> index 77e5cfa327..7683c4cc7f 100644\n>> --- a/hw/intc/arm_gicv3_redist.c\n>> +++ b/hw/intc/arm_gicv3_redist.c\n>> @@ -187,7 +187,7 @@ static MemTxResult gicr_readl(GICv3CPUState *cs, hwaddr offset,\n>>       case GICR_ICACTIVER0:\n>>           *data = gicr_read_bitmap_reg(cs, attrs, cs->gicr_iactiver0);\n>>           return MEMTX_OK;\n>> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\n\n0x1f are only the cpu (private) irqs, then the range is valid up-to:\n(extract64(cs->gicr_typer, 0, 5) + 1) * 32 - 1 supported irqs\n\n>> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\n>>       {\n>>           int i, irq = offset - GICR_IPRIORITYR;\n>>           uint32_t value = 0;\n>> @@ -310,7 +310,7 @@ static MemTxResult gicr_writel(GICv3CPUState *cs, hwaddr offset,\n>>       case GICR_ICACTIVER0:\n>>           gicr_write_clear_bitmap_reg(cs, attrs, &cs->gicr_iactiver0, value);\n>>           return MEMTX_OK;\n>> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\n>> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\n>>       {\n>>           int i, irq = offset - GICR_IPRIORITYR;\n> \n> Why do you think the buffer can be overrun? These functions\n> are the word (4 byte) access functions, and they cannot\n> be called with a non-4-aligned offset (see the asserts in\n> gicv3_redist_read() and gicv3_redist_write()).\n> \n> thanks\n> -- PMM\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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ueNlCKKf\"; dkim-atps=neutral"],"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 3xmmKT5rSPz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 22:31:08 +1000 (AEST)","from localhost ([::1]:58665 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 1dpD0U-0007bQ-1b\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 08:31:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48928)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dpCyx-0006Wc-JX\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:29:36 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dpCys-0005kB-Ph\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:29:31 -0400","from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:38518)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dpCys-0005k3-Kn; Tue, 05 Sep 2017 08:29:26 -0400","by mail-qk0-x242.google.com with SMTP id c69so2000589qke.5;\n\tTue, 05 Sep 2017 05:29:26 -0700 (PDT)","from [192.168.1.10] ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tq5sm306359qkh.43.2017.09.05.05.29.23\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 05 Sep 2017 05:29:25 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=ITLMphbgY3E8XnywKx6CqfZGjwpq2MmCV5p9mHXrZoo=;\n\tb=ueNlCKKf6Q5VLHJLF+jbO8dLzm3kgWDq3q/gp/jXe/BUEtMcxCzXCMjs2XrOM/tL02\n\t5gR1gNISwtqvqpZBFsuVpJjQBT+YIuYKYtQWa+mGZl+FiSKCLUsPBPZBO3//x26B4xNu\n\tlClYL0r/dvOATOTHT68yGkSrPHfnv+xMKsNI9fkjrwm5adksgSTSHKIDtijNr/pCdukA\n\tisR+Jv3nqd1tWSMWo05zIlM6+zaRdcAWCI73ro7r/JJXuSjiWcAFaapUEkGdcttV+U6K\n\tD71kNvC9jYAKM3HkdaoIeOih223cCxN1w3CaHmzeTD0L1jmHTBFnYjSn04BfB8BLHlN3\n\tP0gQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=ITLMphbgY3E8XnywKx6CqfZGjwpq2MmCV5p9mHXrZoo=;\n\tb=h+5Hhwmt8AkKon3VGC6xCyK3sPoqu7G8aI/Vuap3I4tUp0rPT5WSvK6oVaui03f347\n\ttCOi+0kTD3G0JxFww5JY06/uRTLOouH7xI6/NZYBfpzVyYJ12imOBAVLJny9Wd1t7Yco\n\tbJP/VDwNQXKMtQXBiK450rw3MUqUkgb2QHcix38eHvUdgLrPwec/PSozVxl0lZ/rCgZn\n\tz7sSKDa0JW6PC9ZLNw8nqRALl1ezokgfa4XSRDtwQdSzIgjGfBkk7npqB48u1cv0mYiS\n\tJ9X/+9jXq0+0k3vsK8tVhWkDnyoONPGGMe8Okd+g+M8QMXGkEQ+fVWYqVqGLfDFYtXeE\n\t1fPg==","X-Gm-Message-State":"AHPjjUjS3BUUjv8K4Hipn47qacgDCY1ljBOBkJhpggyzkgQT+SB4hmde\n\tvvzrBXuJ/pStWg==","X-Google-Smtp-Source":"ADKCNb69olcKsAxszNXNy9wFbMJZHNwMYX3Q0oFZCtBImefoBY7v/AlXeX3s350Hix4SPvVkBiS5Sg==","X-Received":"by 10.55.39.193 with SMTP id n184mr4537108qkn.273.1504614565967; \n\tTue, 05 Sep 2017 05:29:25 -0700 (PDT)","To":"Peter Maydell <peter.maydell@linaro.org>,\n\tPrasad J Pandit <ppandit@redhat.com>","References":"<20170905112152.8851-1-ppandit@redhat.com>\n\t<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<38d7ca82-43ca-a98a-e727-8fb5968c7d1b@amsat.org>","Date":"Tue, 5 Sep 2017 09:29:22 -0300","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":"<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::242","Subject":"Re: [Qemu-devel] [Qemu-arm] [PATCH] intc: arm_gicv3: limit GICR\n\tipriority index","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-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, \n\tGuoxiang Niu <niuguoxiang@huawei.com>,\n\tPrasad J Pandit <pjp@fedoraproject.org>","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":1763301,"web_url":"http://patchwork.ozlabs.org/comment/1763301/","msgid":"<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-05T12:35:38","subject":"Re: [Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9n?=\n\t=?utf-8?q?icv3=3A_limit_GICR_ipriority_index?=","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 5 September 2017 at 13:30, niuguoxiang <niuguoxiang@huawei.com> wrote:\n> I think only assert is not enough, because assert() depends on NDEBUG\n> preprocessing\n\nThe code cannot be reached with a non-aligned value,\nbecause we register these functions via the gic_ops[]\nMemoryRegionops in hw/intc/arm_gicv3.c, and since we\ndo not specify .valid.unaligned=true there, the memory.c\ncode will throw out attempts at unaligned accesses.\n\nThe assert is just checking at runtime that this never\nbecomes false accidentally (and also for the benefit of\npeople reading the code).\n\nIncidentally, QEMU can never be compiled with NDEBUG not\nset -- we will #error in the compilation if it is not set.\n(It's not good practice to depend on the assert() actually\ndoing anything though, and indeed in this case we don't.)\n\nthanks\n-- PMM","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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"WwnKJUr6\"; dkim-atps=neutral"],"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 3xmmTx75Ryz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 22:38:29 +1000 (AEST)","from localhost ([::1]:58699 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 1dpD7c-00035q-1d\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 08:38:28 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56031)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpD5S-00020P-Gk\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:36:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dpD5E-0004MV-Ao\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:36:14 -0400","from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:35921)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dpD5E-0004LJ-4L\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:36:00 -0400","by mail-wm0-x22c.google.com with SMTP id i145so18721202wmf.1\n\tfor <qemu-devel@nongnu.org>; Tue, 05 Sep 2017 05:35:59 -0700 (PDT)","by 10.223.159.68 with HTTP; Tue, 5 Sep 2017 05:35:38 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=4k6/cMj0I+y29sxZH+yEcFXnuq31L3KFr+JoPVglMV8=;\n\tb=WwnKJUr6jiltn07RWiEktH2hiKkekOe6gLGHiYbNvPy2HAfkvjJzGOSln7+1J30HPZ\n\tMYT9Ifg9LOadBpxR8Og1HuDAZiNw7sYLsqxI/Gj4YsVzuBBzeQIFY12TP6HwK9lKrRkt\n\tkMn1CB+djU5GDIqffLELrOsDW1v4Px8xNjjAc=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=4k6/cMj0I+y29sxZH+yEcFXnuq31L3KFr+JoPVglMV8=;\n\tb=kXhVauFTQW9hm1YyIu23pL9mzLqtx5t/uo3JsqH/LHpg+KwPA9PiRfEDTAFMDGe3s5\n\t+oy8eh0+OKdtI3BRfMhSId2bqZwYoj+coKFyzsVNFJmvQZM0sUUNHuDXWVben6/CYe5G\n\tRmu8fzNAO9O/M5pXx5xOFizBtoJtusyt1WmXM9diIbwdkUktMR8+3dYh8BQS0Smgv2Zi\n\taYtcn2o7hhcU9rJJeeTEpRlxINxCutrtniSwmLFmNCa71umZuohsUtg/smmY7Ma+xCpk\n\tQTu6vzMiwHc1dHsqdVAQfvRajFchCRTXnOSVPNBPqPKApRDYncYAmg7vhxEQrYg0+Qjx\n\t82kw==","X-Gm-Message-State":"AHPjjUgXYNFk0FAiYlp++Q68TIlmdJEp5JXzJ/jLxy+ogtZWs5ed/lCg\n\tJvXsdk8qzwR+7JJRQ87zN7xtd8Tavv0a","X-Google-Smtp-Source":"ADKCNb5OIo+QCRpjOo8Zd1Yq9U9uj4HG789kuGj3rvh9zAaomY0CaZQjmsIvvuj6+bs/ilBKvwR+QUCnrFU5gj0+WYo=","X-Received":"by 10.28.236.91 with SMTP id k88mr1590783wmh.95.1504614958879;\n\tTue, 05 Sep 2017 05:35:58 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>","References":"<20170905112152.8851-1-ppandit@redhat.com>\n\t<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>\n\t<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Tue, 5 Sep 2017 13:35:38 +0100","Message-ID":"<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","To":"niuguoxiang <niuguoxiang@huawei.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::22c","Subject":"Re: [Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9n?=\n\t=?utf-8?q?icv3=3A_limit_GICR_ipriority_index?=","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":"Prasad J Pandit <pjp@fedoraproject.org>, qemu-arm <qemu-arm@nongnu.org>, \n\tQEMU Developers <qemu-devel@nongnu.org>, P J P <ppandit@redhat.com>","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":1763401,"web_url":"http://patchwork.ozlabs.org/comment/1763401/","msgid":"<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>","list_archive_url":null,"date":"2017-09-05T12:30:53","subject":"[Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9naWN2?=\n\t=?utf-8?q?3=3A_limit_GICR_ipriority_index?=","submitter":{"id":72296,"url":"http://patchwork.ozlabs.org/api/people/72296/","name":"niuguoxiang","email":"niuguoxiang@huawei.com"},"content":"I think only assert is not enough, because assert() depends on NDEBUG preprocessing, please check :\r\n\r\n\r\n\r\n/usr/include/assert.h\r\n\r\n\r\n\r\n37#if defined __cplusplus && __GNUC_PREREQ (2,95)\r\n\r\n38# define __ASSERT_VOID_CAST static_cast<void>\r\n\r\n39#else\r\n\r\n40# define __ASSERT_VOID_CAST (void)\r\n\r\n41#endif\r\n\r\n\r\n\r\n48#ifdef  NDEBUG\r\n\r\n49\r\n\r\n50# define assert(expr)           (__ASSERT_VOID_CAST (0))\r\n\r\n\r\n\r\n62#else /* Not NDEBUG.  */\r\n\r\n68/* This prints an \"Assertion failed\" message and aborts.  */\r\n\r\n69extern void __assert_fail (const char *__assertion, const char *__file,\r\n\r\n70                           unsigned int __line, const char *__function)\r\n\r\n71     __THROW __attribute__ ((__noreturn__));\r\n\r\n 86#endif /* Not _ASSERT_H_DECLS */\r\n\r\n\r\n\r\n88# define assert(expr)                                                   \\\r\n\r\n89  ((expr)                                                               \\\r\n\r\n90   ? __ASSERT_VOID_CAST (0)                                             \\\r\n\r\n91   : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION))\r\n\r\n92\r\n\r\n\r\n\r\nFrom above, for NDEBUG, it may do nothing when assert fail,\r\n\r\nfor Not NDEBUG, it will print and abort when assert fail.\r\n\r\n\r\n\r\nSo, for NDEBUG, assert will not work when offset is 0x10000d.\r\n\r\n\r\n\r\nHow do you think?\r\n\r\n\r\n\r\nBr，\r\n\r\nGuoxiang Niu\r\n\r\n\r\n\r\n华为技术有限公司 Huawei Technologies Co., Ltd.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n本邮件及其附件含有华为公司的保密信息，仅限于发送给上面地址中列出的个人或群组。禁\r\n\r\n止任何其他人以任何形式使用（包括但不限于全部或部分地泄露、复制、或散发）本邮件中\r\n\r\n的信息。如果您错收了本邮件，请您立即电话或邮件通知发件人并删除本邮件！\r\n\r\nThis e-mail and its attachments contain confidential information from HUAWEI, which\r\n\r\nis intended only for the person or entity whose address is listed above. Any use of the\r\n\r\ninformation contained herein in any way (including, but not limited to, total or partial\r\n\r\ndisclosure, reproduction, or dissemination) by persons other than the intended\r\n\r\nrecipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by\r\n\r\nphone or email immediately and delete it!\r\n\r\n\r\n\r\n-----邮件原件-----\r\n发件人: Peter Maydell [mailto:peter.maydell@linaro.org]\r\n发送时间: 2017年9月5日 19:59\r\n收件人: P J P\r\n抄送: QEMU Developers; qemu-arm; niuguoxiang; Prasad J Pandit\r\n主题: Re: [PATCH] intc: arm_gicv3: limit GICR ipriority index\r\n\r\n\r\n\r\nOn 5 September 2017 at 12:21, P J P <ppandit@redhat.com<mailto:ppandit@redhat.com>> wrote:\r\n\r\n> From: Prasad J Pandit <pjp@fedoraproject.org<mailto:pjp@fedoraproject.org>>\r\n\r\n>\r\n\r\n> When reading or writing to GICR ipriority array, index 'irq'\r\n\r\n> could go beyond its bounds; Restrict it within array limits.\r\n\r\n>\r\n\r\n> Reported-by: Guoxiang Niu <niuguoxiang@huawei.com<mailto:niuguoxiang@huawei.com>>\r\n\r\n> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org<mailto:pjp@fedoraproject.org>>\r\n\r\n> ---\r\n\r\n>  hw/intc/arm_gicv3_redist.c | 4 ++--\r\n\r\n>  1 file changed, 2 insertions(+), 2 deletions(-)\r\n\r\n>\r\n\r\n> diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c\r\n\r\n> index 77e5cfa327..7683c4cc7f 100644\r\n\r\n> --- a/hw/intc/arm_gicv3_redist.c\r\n\r\n> +++ b/hw/intc/arm_gicv3_redist.c\r\n\r\n> @@ -187,7 +187,7 @@ static MemTxResult gicr_readl(GICv3CPUState *cs, hwaddr offset,\r\n\r\n>      case GICR_ICACTIVER0:\r\n\r\n>          *data = gicr_read_bitmap_reg(cs, attrs, cs->gicr_iactiver0);\r\n\r\n>          return MEMTX_OK;\r\n\r\n> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\r\n\r\n> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\r\n\r\n>      {\r\n\r\n>          int i, irq = offset - GICR_IPRIORITYR;\r\n\r\n>          uint32_t value = 0;\r\n\r\n> @@ -310,7 +310,7 @@ static MemTxResult gicr_writel(GICv3CPUState *cs, hwaddr offset,\r\n\r\n>      case GICR_ICACTIVER0:\r\n\r\n>          gicr_write_clear_bitmap_reg(cs, attrs, &cs->gicr_iactiver0, value);\r\n\r\n>          return MEMTX_OK;\r\n\r\n> -    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\r\n\r\n> +    case GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1c:\r\n\r\n>      {\r\n\r\n>          int i, irq = offset - GICR_IPRIORITYR;\r\n\r\n\r\n\r\nWhy do you think the buffer can be overrun? These functions are the word (4 byte) access functions, and they cannot be called with a non-4-aligned offset (see the asserts in\r\n\r\ngicv3_redist_read() and gicv3_redist_write()).\r\n\r\n\r\n\r\nthanks\r\n\r\n-- PMM","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 3xmpv52sylz9t1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 00:26:57 +1000 (AEST)","from localhost ([::1]:59297 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 1dpEoZ-00029G-Fb\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 10:26:55 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:52037)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <niuguoxiang@huawei.com>) id 1dpD29-0000Rm-QH\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:33:01 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <niuguoxiang@huawei.com>) id 1dpD1p-0000Ov-MR\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 08:32:49 -0400","from szxga01-in.huawei.com ([45.249.212.187]:4486)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71)\n\t(envelope-from <niuguoxiang@huawei.com>)\n\tid 1dpD0k-0007iV-RO; Tue, 05 Sep 2017 08:31:24 -0400","from 172.30.72.56 (EHLO DGGEMA402-HUB.china.huawei.com)\n\t([172.30.72.56])\n\tby dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id AVU70747; Tue, 05 Sep 2017 20:31:03 +0800 (CST)","from DGGEMA501-MBX.china.huawei.com ([169.254.1.103]) by\n\tDGGEMA402-HUB.china.huawei.com ([10.3.20.43]) with mapi id\n\t14.03.0301.000; Tue, 5 Sep 2017 20:30:53 +0800"],"From":"niuguoxiang <niuguoxiang@huawei.com>","To":"Peter Maydell <peter.maydell@linaro.org>, P J P <ppandit@redhat.com>","Thread-Topic":"[PATCH] intc: arm_gicv3: limit GICR ipriority index","Thread-Index":"AQHTJjk56t2HHt70s0CviXa2pcuKTaKlqhqAgACJNoA=","Date":"Tue, 5 Sep 2017 12:30:53 +0000","Message-ID":"<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>","References":"<20170905112152.8851-1-ppandit@redhat.com>\n\t<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","In-Reply-To":"<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>","Accept-Language":"en-US","Content-Language":"zh-CN","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.111.153.156]","MIME-Version":"1.0","X-CFilter-Loop":"Reflected","X-Mirapoint-Virus-RAPID-Raw":"score=unknown(0),\n\trefid=str=0001.0A090202.59AE9908.0096, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=169.254.1.103,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32","X-Mirapoint-Loop-Id":"965af5395d9b600bc284a3ed1fb05645","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]\n\t[fuzzy]","X-Received-From":"45.249.212.187","X-Mailman-Approved-At":"Tue, 05 Sep 2017 10:26:13 -0400","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"[Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9naWN2?=\n\t=?utf-8?q?3=3A_limit_GICR_ipriority_index?=","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-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, \n\tPrasad J Pandit <pjp@fedoraproject.org>","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":1763604,"web_url":"http://patchwork.ozlabs.org/comment/1763604/","msgid":"<4dac78d2-da60-95c7-4d46-76f660db6a9f@redhat.com>","list_archive_url":null,"date":"2017-09-05T19:42:46","subject":"Re: [Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9n?=\n\t=?utf-8?q?icv3=3A_limit_GICR_ipriority_index?=","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 09/05/2017 07:35 AM, Peter Maydell wrote:\n> On 5 September 2017 at 13:30, niuguoxiang <niuguoxiang@huawei.com> wrote:\n>> I think only assert is not enough, because assert() depends on NDEBUG\n>> preprocessing\n> \n\n> Incidentally, QEMU can never be compiled with NDEBUG not\n> set -- we will #error in the compilation if it is not set.\n\nWell, right now, we only #error if you happen to compile certain\ndevices, although the proposal has been made to #error for ALL builds:\n\nhttps://lists.gnu.org/archive/html/qemu-devel/2017-08/msg03608.html","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-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@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 3xmxwT27zjz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 05:43:37 +1000 (AEST)","from localhost ([::1]:32971 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 1dpJl1-00058w-FK\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 15:43:35 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51344)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dpJkf-00058E-61\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 15:43:17 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dpJkY-00082H-8j\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 15:43:13 -0400","from mx1.redhat.com ([209.132.183.28]:52870)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1dpJkH-0007nU-Nw; Tue, 05 Sep 2017 15:42:49 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\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 8A86561468;\n\tTue,  5 Sep 2017 19:42:48 +0000 (UTC)","from [10.10.120.228] (ovpn-120-228.rdu2.redhat.com [10.10.120.228])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 6347261F24;\n\tTue,  5 Sep 2017 19:42:47 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 8A86561468","To":"Peter Maydell <peter.maydell@linaro.org>,\n\tniuguoxiang <niuguoxiang@huawei.com>","References":"<20170905112152.8851-1-ppandit@redhat.com>\n\t<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>\n\t<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>\n\t<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<4dac78d2-da60-95c7-4d46-76f660db6a9f@redhat.com>","Date":"Tue, 5 Sep 2017 14:42:46 -0500","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":"<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"Od5WInuJV72EVsEl2cCTLXPX4XB053hqX\"","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tTue, 05 Sep 2017 19:42:48 +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","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] =?utf-8?b?562U5aSNOiBbUEFUQ0hdIGludGM6IGFybV9n?=\n\t=?utf-8?q?icv3=3A_limit_GICR_ipriority_index?=","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":"P J P <ppandit@redhat.com>, qemu-arm <qemu-arm@nongnu.org>,\n\tPrasad J Pandit <pjp@fedoraproject.org>,\n\tQEMU Developers <qemu-devel@nongnu.org>","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":1763836,"web_url":"http://patchwork.ozlabs.org/comment/1763836/","msgid":"<nycvar.YSQ.7.76.1709061202500.13418@wniryva>","list_archive_url":null,"date":"2017-09-06T06:45:32","subject":"Re: [Qemu-devel] =?gb2312?b?tPC4tDogW1BBVENIXSBpbnRjOiBhcm1fZ2lj?=\n\t=?gb2312?b?djM6IGxpbWl0IEdJQ1IgaXByaW9yaXR5IGluZGV4?=","submitter":{"id":67408,"url":"http://patchwork.ozlabs.org/api/people/67408/","name":"Prasad Pandit","email":"ppandit@redhat.com"},"content":"+-- On Tue, 5 Sep 2017, Peter Maydell wrote --+\n| The code cannot be reached with a non-aligned value,\n| because we register these functions via the gic_ops[]\n| MemoryRegionops in hw/intc/arm_gicv3.c, and since we\n| do not specify .valid.unaligned=true there, the memory.c\n| code will throw out attempts at unaligned accesses.\n\n  I see, thank you for the clarification; ie. within the range\n\n   GICR_IPRIORITYR ... GICR_IPRIORITYR + 0x1f:\n\n'offset' would be GICR_IPRIORITYR +0, +4, +8 ... 0x1c?\n\nMaybe the patch could still be considered, not as bug fix though.\n\nThank you.\n--\nPrasad J Pandit / Red Hat Product Security Team\n47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F","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-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=ppandit@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 3xnDd63Dr0z9sNd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 16:46:15 +1000 (AEST)","from localhost ([::1]:34404 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 1dpU6H-0000IT-CP\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 02:46:13 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40656)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <ppandit@redhat.com>) id 1dpU5r-0000Hf-My\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 02:45:48 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <ppandit@redhat.com>) id 1dpU5r-0007Ga-18\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 02:45:47 -0400","from mx1.redhat.com ([209.132.183.28]:58032)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <ppandit@redhat.com>)\n\tid 1dpU5k-0007Ch-Jj; Wed, 06 Sep 2017 02:45:40 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\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 943115AFD9;\n\tWed,  6 Sep 2017 06:45:38 +0000 (UTC)","from javelin (ovpn-116-48.ams2.redhat.com [10.36.116.48])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 6B4F619C80;\n\tWed,  6 Sep 2017 06:45:36 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 943115AFD9","Date":"Wed, 6 Sep 2017 12:15:32 +0530 (IST)","From":"P J P <ppandit@redhat.com>","X-X-Sender":"pjp@javelin","To":"Peter Maydell <peter.maydell@linaro.org>","In-Reply-To":"<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","Message-ID":"<nycvar.YSQ.7.76.1709061202500.13418@wniryva>","References":"<20170905112152.8851-1-ppandit@redhat.com>\n\t<CAFEAcA8B4EwXCPSBsftt=QkAuH8jCBbK23-uU7NA7G3k6ADHLw@mail.gmail.com>\n\t<7FD21DDFE9A3784693E393AF276FE7D21F17E49E@DGGEMA501-MBX.china.huawei.com>\n\t<CAFEAcA8JxuM-ddQVTBfgnSDD2fD+kz_RNShdNDqMqVH=zOKBfw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tWed, 06 Sep 2017 06:45:38 +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] =?gb2312?b?tPC4tDogW1BBVENIXSBpbnRjOiBhcm1fZ2lj?=\n\t=?gb2312?b?djM6IGxpbWl0IEdJQ1IgaXByaW9yaXR5IGluZGV4?=","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-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>, \n\tniuguoxiang <niuguoxiang@huawei.com>","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>"}}]