[{"id":1780795,"web_url":"http://patchwork.ozlabs.org/comment/1780795/","msgid":"<86c98e0d-ed73-6d6e-d4bd-9f28df46b4ce@linaro.org>","list_archive_url":null,"date":"2017-10-05T16:25:56","subject":"Re: [Qemu-devel] [PATCH 06/20] target/arm: Check for xPSR mismatch\n\tusage faults earlier for v8M","submitter":{"id":72104,"url":"http://patchwork.ozlabs.org/api/people/72104/","name":"Richard Henderson","email":"richard.henderson@linaro.org"},"content":"On 09/22/2017 10:59 AM, Peter Maydell wrote:\n> ARM v8M specifies that the INVPC usage fault for mismatched\n> xPSR exception field and handler mode bit should be checked\n> before updating the PSR and SP, so that the fault is taken\n> with the existing stack frame rather than by pushing a new one.\n> Perform this check in the right place for v8M.\n> \n> Since v7M specifies in its pseudocode that this usage fault\n> check should happen later, we have to retain the original\n> code for that check rather than being able to merge the two.\n> (The distinction is architecturally visible but only in\n> very obscure corner cases like attempting an invalid exception\n> return with an exception frame in read only memory.)\n> \n> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>\n> ---\n>  target/arm/helper.c | 30 +++++++++++++++++++++++++++---\n>  1 file changed, 27 insertions(+), 3 deletions(-)\n\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\n\n\nr~","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; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"BsDFLWuQ\"; 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 3y7JSG0cDZz9rvt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 03:41:18 +1100 (AEDT)","from localhost ([::1]:40851 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 1e09D2-0007tV-31\n\tfor incoming@patchwork.ozlabs.org; Thu, 05 Oct 2017 12:41:16 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45830)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1e08yG-0003nd-Di\n\tfor qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:26:01 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1e08yF-0004H2-IK\n\tfor qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:26:00 -0400","from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:55712)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1e08yF-0004GM-Df\n\tfor qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:25:59 -0400","by mail-qt0-x22f.google.com with SMTP id x54so26371008qth.12\n\tfor <qemu-devel@nongnu.org>; Thu, 05 Oct 2017 09:25:59 -0700 (PDT)","from bigtime.twiddle.net ([2606:a000:7a4a:b100::1b])\n\tby smtp.gmail.com with ESMTPSA id\n\tn131sm6772690ywb.107.2017.10.05.09.25.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 05 Oct 2017 09:25:58 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=lIOUeVc8tjKYD47fm2srawDjzR/k2cScqRKVfmGlA9s=;\n\tb=BsDFLWuQuLBfxc7zc4Oj52s+Zthgek3d1+NyyZyoW9z2geM4r0AB01MUeMFFs5IbWm\n\tc5zZXO8KHsO5auhVe9vf711983pcTC7Bn2TXkBa46IpAPEDYayOrTB49wIadFD2650Xn\n\tTGzy8cLkcLt+qGC9p4n1AzqtqNgCnX8mow0yA=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=lIOUeVc8tjKYD47fm2srawDjzR/k2cScqRKVfmGlA9s=;\n\tb=oi4FSsOpnf7/BuL5nIXhM8q5TofUZwWlqdKJ/ocwU4PPOEnWFo/HdrfVHRV99EeFfB\n\trHKSFLZiFM8FRLkPgWYnqIalZA+B9gIWpCoTuWGtsMqwiD4F7mIStAW5QvJXpS3Sa59h\n\trd1cphbhA/afA9F0aiC2BFzpq2Z+uIiLJ4P5ThX06KP3aSmosKVCES/es5aTY6qrnzLG\n\taHI5Jx0b6SBaAI7QDZSxqONLqFCTZtzuPjJfVlUoMFH8xd0DvHV0jogLqsdH2XL9dRdL\n\tlIDdHq+BCR0hF1Yz4nKFmtKBh3SGhdpalp5gWTvBR9EUngYGZPzNTrxHqmfhVSSFiGAb\n\tC4vw==","X-Gm-Message-State":"AMCzsaVJ69w1A1WUh9+i7wQj7v8QVu6gEGbkG60rF61qQ+WC+N8eMTjy\n\ttXbJFMw0lQzQ+mcUmYrjonclhA==","X-Google-Smtp-Source":"AOwi7QD9Zvh933bRfNsvdIzK2bABm25YQuDrlF8Uex2nxoty8YQ2/Z/doUlZDRYvRSOUAc4i1gbPyw==","X-Received":"by 10.37.219.82 with SMTP id g79mr5648820ybf.167.1507220758865; \n\tThu, 05 Oct 2017 09:25:58 -0700 (PDT)","To":"Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org,\n\tqemu-devel@nongnu.org","References":"<1506092407-26985-1-git-send-email-peter.maydell@linaro.org>\n\t<1506092407-26985-7-git-send-email-peter.maydell@linaro.org>","From":"Richard Henderson <richard.henderson@linaro.org>","Message-ID":"<86c98e0d-ed73-6d6e-d4bd-9f28df46b4ce@linaro.org>","Date":"Thu, 5 Oct 2017 12:25:56 -0400","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":"<1506092407-26985-7-git-send-email-peter.maydell@linaro.org>","Content-Type":"text/plain; charset=utf-8","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:c0d::22f","Subject":"Re: [Qemu-devel] [PATCH 06/20] target/arm: Check for xPSR mismatch\n\tusage faults earlier for v8M","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":"patches@linaro.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>"}}]