From patchwork Tue Dec 20 22:20:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 35205 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3211455wrn; Tue, 20 Dec 2022 14:23:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtyesQFYqw98bIoRPJs8MqTzeQcUoeiPl3qVEY8w3M5VtxU9pTWAhXQvWIkzh7K/+qMTOiJ X-Received: by 2002:a17:906:1d4a:b0:81a:c653:4a06 with SMTP id o10-20020a1709061d4a00b0081ac6534a06mr3199891ejh.66.1671574981815; Tue, 20 Dec 2022 14:23:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671574981; cv=none; d=google.com; s=arc-20160816; b=f2PFcIiJMBl61ugX5ihzHMoYnfX/kbru+YPys4BS1nhQssUqQD8HIVF6o8xwSxwxgr 8kFsgrTJVXaas7xgaLzSagKhF2OzlOtI9JeyBOG3iuwuAkbHW7ULhVz4UxgL3/cu4HZ9 O422L+Y3buN/fr63PXM6fTDJPD4PkBWZcAkyh2t3/JvBYS2FMo8Ed3tLbjTqIfXkkE2t /9FpIQgL2ciRAEMEWhHVt5nEjUXQ35uwcBK0BoHwp9aEUv7Fxj8/59Ev7+jD7MfOTjPc j8id3SxxVNw0SaVU/NQsdmVVqGlciJ90BHuw0m94mxw3Wg+20O91BQqoLcF4ermaBTFv XAKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=04QaB/HS8ooY5ZKSOW7fTmCf5keggh3lSeQiSwB+iqc=; b=ndqBlZyUPsfvND7lwS4JQo9zPikP+8OQgEW4S+vCNT0ZVMqs1JrmMhBid5ZkPNy2NP 1LOaahQW+ZHq7XI0ThwkwT18ihLaZK8hnzlKeo+qmLINcflzEl8+OFaQi/igoIltIkdf vGaf6sWIVQu8C8/ONUIEr/NAg5KeETGUwSm10Q9LXT8NXpN7I6KD2sU0rWKT7VhHdcg+ BihEu7YerlhtAgt1IJvZfEXXQTU9pPWHNrb1QnzR895vN31Q8ctshGqucwfILdBKxi+w Pgvw+9SNTvhJHsRBXKNWUUQEbl3wOrJ2dFJVlvwCAFI3+Vpprm3USg8YlFKfwMei5kwV 2sAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AwqkV0s7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a170906358500b007ae3f78c8d5si10287905ejb.787.2022.12.20.14.22.38; Tue, 20 Dec 2022 14:23:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AwqkV0s7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234263AbiLTWVI (ORCPT + 99 others); Tue, 20 Dec 2022 17:21:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233609AbiLTWUs (ORCPT ); Tue, 20 Dec 2022 17:20:48 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD15BDF7 for ; Tue, 20 Dec 2022 14:20:45 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id e13so19559663edj.7 for ; Tue, 20 Dec 2022 14:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=04QaB/HS8ooY5ZKSOW7fTmCf5keggh3lSeQiSwB+iqc=; b=AwqkV0s7+HOHIO/KnzC+WOlXVBHG0hOmFSzbN0jr1yIm40v1zwhd9Ps3hpY0qqUdLr lR1Lv3HWmrWXFbHjq45Gw2grC0FjCakxkxgEf3J4k6pMSqDtXnUauSJL8ksHGituNnMf PwkBHznKmARO+B2nPLjJkRnOB8gkstysPoTzc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=04QaB/HS8ooY5ZKSOW7fTmCf5keggh3lSeQiSwB+iqc=; b=maKPnJCoZlt5qoywPTvsLqOgmuWmgIWKJOpGL6mvIoAjRYHtmgOR3iFlDab/3gAkfR Kju60DTmWpluW14Dnc9iDHs0abNexwdecb+FLbYN9B0Ange61FP/kaL/al+p8nfcNUd5 lcFUenymxztE7n52ePEkgbzj4DZ8QlPXi6XmUD6Ue2QfH6xw/Bb/VNFPQhA/sJ2+I9Dl aGHqFf+f75SXlaOvSj0py2izqoT03XDohi2n1QWEj4FmckRrv9sSr+pMmtlegyQX1KcB fT/PXYgg/HBDejzH0sjn2gKyv/IJmzhJx03qXhqTzl70HOpZnjDpELkmVOGFYMs5QUia VERw== X-Gm-Message-State: AFqh2kr/1kutSSvecWYmvvBkNssjqa3lyo08355mrodJOKE2WvAsl6wr Nzu6BiaIJNsAiUuVriGbtBLfBg== X-Received: by 2002:a05:6402:2b8e:b0:461:22bb:1ae4 with SMTP id fj14-20020a0564022b8e00b0046122bb1ae4mr3972707edb.17.1671574844304; Tue, 20 Dec 2022 14:20:44 -0800 (PST) Received: from alco.roam.corp.google.com (80.71.134.83.ipv4.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id f1-20020a17090631c100b007c07b23a79bsm6243545ejf.213.2022.12.20.14.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 14:20:43 -0800 (PST) From: Ricardo Ribalda Date: Tue, 20 Dec 2022 23:20:31 +0100 Subject: [PATCH 2/3] KVM: x86: Fix trivial typo MIME-Version: 1.0 Message-Id: <20221220-permited-v1-2-52ea9857fa61@chromium.org> References: <20221220-permited-v1-0-52ea9857fa61@chromium.org> In-Reply-To: <20221220-permited-v1-0-52ea9857fa61@chromium.org> To: kvm@vger.kernel.org, Andrew Morton , devicetree@vger.kernel.org, Ricardo Ribalda , Joel Fernandes , linux-kernel@vger.kernel.org X-Mailer: b4 0.11.0-dev-696ae X-Developer-Signature: v=1; a=openpgp-sha256; l=1531; i=ribalda@chromium.org; h=from:subject:message-id; bh=zSOi0LX8fXbYXAwYpRGT39p6SkmE8VPobah26uTEEi4=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjojU2hzEEgA5uTsusiMQlEj0HW+QD8b1ta/ly90My VI92iWSJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY6I1NgAKCRDRN9E+zzrEiDaiD/ 44aBfsLXTJFELd5DEIQoV9/t6dfaZAvhFdQRMpl4UImAgj3icaCwNmd4xegbaDb/up4cgLKPzARU0S atcUxeSKQsCeq9WeOCZPAjd6TZkkHAhFLxG5iop8sv6w8AlP1bgYFXYC5jfLwg6cFk43Ez7OoorkXJ 1OktJFP7WqAhy6vdB0rZFG8kGAYOFp91DfP9iUNHJ7NfZXbYhGwmqhAsRqoFLgK99G5xb7oTWOH0/V egK0fDJO6P0rIgYy12um2uDYTlG9fFlH50Mr5AMI1Bej7vghfNbH97ap8AQMX5qdKFZix8xvYZFlKK vvzgsBjyifKlrJfT0K57+ZnznixCKKs9HKoHamOg3yLZvvmbdOMGDlDhI75By2JWIV/8uslXLXPmHA 55pw0iV+KYd0+mLNsozZYltT7p8Tv1TC/eLWkeF93i+9+wZ/I1Ev6xlMKJN3JBbdP/fWrYNDCSNmX0 F0Azd02gth2pGu1h7IvWoeRIcQyf2/w8wM69U5/ssu/jTz9QAEzvT1A98DFuTDtmmYyCXeAab2RJlh 3/lUamRAy1rwD7a7KdKXvoKlgvrYhoi2EKkxje8I3/IzEPj5zJmPzfvkV3KxtSX+GZokdoo10o/MSS 9eSjJsGOMYAasaOqW2UvzmTDYnqo4gRjsrMINdCxndexVr3mc6VCXmab4rFA== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752773408372862214?= X-GMAIL-MSGID: =?utf-8?q?1752773408372862214?= Permitted is spelled with two t. Signed-off-by: Ricardo Ribalda Reviewed-by: Philippe Mathieu-Daudé --- arch/x86/kvm/emulate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5cc3efa0e21c..56e1cf7c339e 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2615,8 +2615,8 @@ static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt, return true; } -static bool emulator_io_permited(struct x86_emulate_ctxt *ctxt, - u16 port, u16 len) +static bool emulator_io_permitted(struct x86_emulate_ctxt *ctxt, + u16 port, u16 len) { if (ctxt->perm_ok) return true; @@ -3961,7 +3961,7 @@ static int check_rdpmc(struct x86_emulate_ctxt *ctxt) static int check_perm_in(struct x86_emulate_ctxt *ctxt) { ctxt->dst.bytes = min(ctxt->dst.bytes, 4u); - if (!emulator_io_permited(ctxt, ctxt->src.val, ctxt->dst.bytes)) + if (!emulator_io_permitted(ctxt, ctxt->src.val, ctxt->dst.bytes)) return emulate_gp(ctxt, 0); return X86EMUL_CONTINUE; @@ -3970,7 +3970,7 @@ static int check_perm_in(struct x86_emulate_ctxt *ctxt) static int check_perm_out(struct x86_emulate_ctxt *ctxt) { ctxt->src.bytes = min(ctxt->src.bytes, 4u); - if (!emulator_io_permited(ctxt, ctxt->dst.val, ctxt->src.bytes)) + if (!emulator_io_permitted(ctxt, ctxt->dst.val, ctxt->src.bytes)) return emulate_gp(ctxt, 0); return X86EMUL_CONTINUE;