Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp155219rwi; Wed, 26 Oct 2022 22:30:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vue1t28kWsWIeUpn4UWWuusu1hkjWZ37zkIsZTWfsSlwNYZ8fExhKvbNA0AgSCClsAUv3 X-Received: by 2002:a17:907:3da2:b0:78d:51c4:5b80 with SMTP id he34-20020a1709073da200b0078d51c45b80mr39814327ejc.716.1666848655493; Wed, 26 Oct 2022 22:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666848655; cv=none; d=google.com; s=arc-20160816; b=DPSo9Ho6BC8it6RGGuXCodoxVtO40F2TtWA3ibhChsPu/RmuqjpxYJ1VmiLkcz3dI8 qQknRT4DNC2Ddye1kWAtRpDu/9WibqPOTzNCZPvuFlcLSNwwoRhWeJPTdJLVEAnhlnws RHD2tpt1rMdpkylqt+64mzIR8OzPwaCZs1usfUoSKvje7QKId656lHME0ndGDdAPYC6Z fEy1dIa5e4bbqAIIoebdtWMnqQsV2D/mjOhWPjeef8MNsrShP8wE4xgdHWhJ0F0OD3pn o8aWvAiE+h1MeZgCR98nkGJIirffRRbdy2OEI6m4r2GOov/vTDS4s+WkjXMvB8mcKYU1 49+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CmDiMYe/I0ri6Zj03hdpur3rJrgB7k+DhMOzSt5LxUI=; b=p345gIldPj0iM5upT3fcKdrCIRx4L6CpbhRK9ZhyHDVwW5xifHLsUDpbsnd69tz4q8 iWY6AR5dP60Jkrer5DJZpjU5b+ije37Zflj4gw+O7CS94RK4U3YPz+UzPPYzfzgMRuiI Lrs5eRYnNGMZwM5tiOZoQsZAhROPTHX0HrVokwZWVHcKYAjUXP7whEdeLyCUGBcTWolD 9tPSp/JbMJLiyRg2Y4THH2aB2KT/4HW7SmPEP0ahVQyH8abpekXrFRukJRo8FYEDLBfD Rv2qtl97vYjOlG18JKqj2truppFwSN5zaQ5UuA4Bbnd1PaEMbYAuy6kF+YTFW5EIGDCU A/ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hM2tehQX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a1709063e4b00b007ad8ba757dcsi331697eji.415.2022.10.26.22.28.14; Wed, 26 Oct 2022 22:30:55 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=hM2tehQX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234294AbiJ0FMu (ORCPT + 99 others); Thu, 27 Oct 2022 01:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233379AbiJ0FMq (ORCPT ); Thu, 27 Oct 2022 01:12:46 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463151581B6 for ; Wed, 26 Oct 2022 22:12:44 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id hh9so383401qtb.13 for ; Wed, 26 Oct 2022 22:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CmDiMYe/I0ri6Zj03hdpur3rJrgB7k+DhMOzSt5LxUI=; b=hM2tehQXR8rhpVF9g+WAkkYLHO2gza5eLp8A5C/rbyeAH+vIL+0k9xuLSF+aoysY0p IV1nDGd1W14gsvEe5BwPL4dUnIhQCffmmyoeMjIojAuiHXiHb+Ie5vwStIIBxDhNXewv /dltDWdPmrIJFQIVGWMHCocFEs0VnC/F9cURrfBBLE0LJlpgsCtACKSzUMBUYEZAI1sC 6gwir6oqL+FXUXdWdrErNn2TE/QivqIgFJNw3nTSb/oyj/nkLCBNgtRKdyOawG3jRc7P 3mpr8LC0Om5GHXwU7pticVUP/D2vnWd5uetBTwlf0SG8WY88g06v2iVV2BcZMezV/Ss5 34mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CmDiMYe/I0ri6Zj03hdpur3rJrgB7k+DhMOzSt5LxUI=; b=XdSIPXimKwlp7hS0IvLcVKIhhsihrX/56QjXfbBvhUqdhqgmP8bZeDnFav3jekedsS XFeAF+UnfI+XHmRL+j70Q/Sq2iXhRRmBA1fVuxM4n4rWOTlxV8VkPn0OvVlQkep9o1dV AYc4lKZgoDHmi1/PfhshO1SgwSyNSPWxye9M9VL+nb7e6BTzx6hydrwO0tRmXMRDNson H374ijrsozbUo58p1ghRVLotLfPKfFocPh5vG+7xrwrSWRPFs5DPnCg3HJnRSZ7VZhZq UwM9HJsf7yvGavQZH6KYW6lyNPskRixCd7qskXv1SMC7EPe46bLadGEw6dEHiXD+a6W0 hyJw== X-Gm-Message-State: ACrzQf3cs+z28jwzzvjuoSUrSv0cUJ6HAJiAycWzJ/AC67H4nKW2KR2H x0EYfn89CNeL9VDFwgkTwGPCNdN/UISSsi78rrY1hcUy X-Received: by 2002:a05:622a:164f:b0:3a4:f141:92fa with SMTP id y15-20020a05622a164f00b003a4f14192famr4761116qtj.447.1666847563200; Wed, 26 Oct 2022 22:12:43 -0700 (PDT) MIME-Version: 1.0 References: <20221007013708.1946061-1-zyytlz.wz@163.com> In-Reply-To: From: Dave Airlie Date: Thu, 27 Oct 2022 15:12:31 +1000 Message-ID: Subject: Re: [PATCH v3] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry To: Zheng Hacker Cc: Zheng Wang , gregkh@linuxfoundation.org, alex000young@gmail.com, security@kernel.org, airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, 1002992920@qq.com, intel-gvt-dev@lists.freedesktop.org, zhi.a.wang@intel.com, Zhenyu Wang , Jani Nikula Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Thu, 27 Oct 2022 at 13:26, Zheng Hacker wrote= : > > Dave Airlie =E4=BA=8E2022=E5=B9=B410=E6=9C=8827=E6=97= =A5=E5=91=A8=E5=9B=9B 08:01=E5=86=99=E9=81=93=EF=BC=9A > > > > On Fri, 7 Oct 2022 at 11:38, Zheng Wang wrote: > > > > > > If intel_gvt_dma_map_guest_page failed, it will call > > > ppgtt_invalidate_spt, which will finally free the spt. > > > But the caller does not notice that, it will free spt again in error = path. > > > > > > Fix this by spliting invalidate and free in ppgtt_invalidate_spt. > > > Only free spt when in good case. > > > > > > Reported-by: Zheng Wang > > > Signed-off-by: Zheng Wang > > > > Has this landed in a tree yet, since it's a possible CVE, might be > > good to merge it somewhere. > > > > Dave. > > > > Hi Dave, > > This patched hasn't been merged yet. Could you please help with this? I'll add some more people who can probably look at it. Dave.