Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1861923ybl; Thu, 30 Jan 2020 07:19:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxFnwk5ilvGhOSTvAXfRBQTNBsA/iC5dzvOGdxrNOr831A1E+3qouQuVHxmPzBfCgEqJkI1 X-Received: by 2002:aca:f10:: with SMTP id 16mr3076221oip.117.1580397552517; Thu, 30 Jan 2020 07:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580397552; cv=none; d=google.com; s=arc-20160816; b=k68b9c0eivW96zuRTAB0geYniO8J9zWw4sl1QBJfrj87b2RgBx3kYvyPgZt/kVO/UY rk7ZzMKCslEo53kJ/r7wuUbavQ+GxGTMR16hWxxtrHAiIghqXROq5wJh+f0MUvi5zf/t WZ6I2vntlzYKuyK1MApZa36EKDtjtPW11LkoAWE8hUkqIAOLiDRc9PVBBfh74GRLUr6m GNhsV5dJ8hwdmRjSe5IFtbS1EU1W2v3Py3A6P5l3J/je4JQgx0+kdYajWKxXJa0vX8Zq fAmTjtotMz1PmYoGDjQNuXeQpCeIc1GHLg5FzkV/Km3LWr8apPH6TOZLMW9KM24pmkul Pp4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=62RH6i159pjCf5mRYCuM088XJbc6cGaxujQfSC3GLZI=; b=xyN1dIMeABT6+sWjj5hMF80Lhz+0xUPKl6LiPJlTzBnm14tUnODQesk1YcTEZiuxKh YIF2vfHzB4KHB/awjaZhVAjwPtNPI2OZV+itGX0t+0NfnFX7TxkWyDLnur0LQ1YdiWaZ X1wtnszOaDOH7AW53euHNVORIfSzljZmfUUUu7dEmcstcR/K7S+DburZpvh3XQxBmgvy KElMFZYD5+hScd4dBTdEzRB5s21+uEf9q6UOAs0/BUsGC2aCX4KeGUVuYkRgZKXTPpx1 WoX90xMH6N6uN9Og7AkYweVH1wX8O159dWoPPVEuMQzehrOlTo9pwxQ9qyJtpvnSWrv8 6SNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=HVKHYXhT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si2828185oig.88.2020.01.30.07.18.58; Thu, 30 Jan 2020 07:19:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=HVKHYXhT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727247AbgA3PQ2 (ORCPT + 99 others); Thu, 30 Jan 2020 10:16:28 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:46226 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbgA3PQ2 (ORCPT ); Thu, 30 Jan 2020 10:16:28 -0500 Received: by mail-pg1-f194.google.com with SMTP id z124so1787540pgb.13 for ; Thu, 30 Jan 2020 07:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=62RH6i159pjCf5mRYCuM088XJbc6cGaxujQfSC3GLZI=; b=HVKHYXhT4o4w+zMQS2AtGEJIhzLbrsMFWeVU0nD2cG/CitiLpIQuuJaxAOu7z4dWH4 eNPjufH7RWMjuD2L3GwJua8gb8mdq3CNT2aAJJpRLOWM/rIzlajHgoLUhTQPcdk/1al6 qRb3C3jdFPyTsDl7d9qS4O0fHUA7bA1l+rX51PbXufUGIQN1ku2UTFCCpLcGIj14GhD1 R4Cti3AcvjdLkQaJ9sCMsmQimr/8o+W6GuM0P2WcP24qg7oS8DH6y+0NTZBHtSnSkJ2O KV5u7Za5OR0Q/qg79ROIJWMJfVJKiWee2V2xGEYCru1kyaxLqfuzdolr+JGFmzhlOIOG iLtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=62RH6i159pjCf5mRYCuM088XJbc6cGaxujQfSC3GLZI=; b=m3MuNXjHT6Z4sFW80I77efnYicFYl9+az5R24G+ykwxKQPziCt6HrwLuQZppqSvw2v NruBCh+JizMo5Y7ml+6A0ZrFWhW/tT85FUeNJLEFznAgbnRlrnbYhLolHmP0Sd+NuHMh S+E3CxRGkwfhvP++mRe9oqsUIZ2LwkqqQ2+BtttdBCRBRqIokqvWFXN46XeUU7YmK963 O5I59EB8ruUxq9SU0kVMldBz7b6yT4C/hdPdwwRzmLY5uF2GBTyEj5ukEc6y6ttRH/WN 0loVgHeforsum9mV8gNXlAaOrn9RRm6XEPtU6ZvxXo6PBR8Bx8CfvgsqjSTXw2Mgtu4O WCWg== X-Gm-Message-State: APjAAAV6FBOm6YCziNLWiBEmhRxaOi1aGXOZnaDSJTVRYChERD8eUT05 Pc4Yhr+gnN9+W7n2IHd0dUqvTQ== X-Received: by 2002:aa7:9aa5:: with SMTP id x5mr5604266pfi.131.1580397387669; Thu, 30 Jan 2020 07:16:27 -0800 (PST) Received: from ?IPv6:2601:646:c200:1ef2:51ac:4d36:2f8d:8208? ([2601:646:c200:1ef2:51ac:4d36:2f8d:8208]) by smtp.gmail.com with ESMTPSA id z26sm7221537pfa.90.2020.01.30.07.16.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jan 2020 07:16:27 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/2] KVM: x86: Emulate split-lock access as a write Date: Thu, 30 Jan 2020 07:16:24 -0800 Message-Id: <777C5046-B9DE-4F8C-B04F-28A546AE4A3F@amacapital.net> References: Cc: Xiaoyao Li , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Paolo Bonzini , Sean Christopherson , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" In-Reply-To: To: David Laight X-Mailer: iPhone Mail (17C54) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jan 30, 2020, at 4:31 AM, David Laight wrote:= >=20 > =EF=BB=BFFrom: Xiaoyao Li >> Sent: 30 January 2020 12:20 >> If split lock detect is enabled (warn/fatal), #AC handler calls die() >> when split lock happens in kernel. >>=20 >> A sane guest should never tigger emulation on a split-lock access, but >> it cannot prevent malicous guest from doing this. So just emulating the >> access as a write if it's a split-lock access to avoid malicous guest >> polluting the kernel log. >=20 > That doesn't seem right if, for example, the locked access is addx. > ISTM it would be better to force an immediate fatal error of some > kind than just corrupt the guest memory. >=20 > =20 The existing page-spanning case is just as wrong.=