Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp77548pxb; Wed, 14 Apr 2021 09:48:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBIkuzkfmIoOnRIwmrTEC5/B9ihNwmoIuToaliQ2zadDp3uZszO3XkVNEWaKipX09tIw6t X-Received: by 2002:a17:902:b28b:b029:ea:eda0:4d5e with SMTP id u11-20020a170902b28bb02900eaeda04d5emr18248218plr.68.1618418905897; Wed, 14 Apr 2021 09:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618418905; cv=none; d=google.com; s=arc-20160816; b=TDxCGcRWfJ1H9Fy8Q3MvRb2/2i4i/ogAvt5TOtTVpqn4J3C18LW2RbhOfOeCx5Amk2 w27Nj5oXRlUgWtdz14S6HyLOECORV8y2KPj7Q46Gv95rCPXcEJg9yG0MJ5f4KdSmPi6R PRYNMDfQLAFv3hUmATRv0gOkajBgSQVWID6Q7ao4wMYnE6fXtL5QfhDUJ1lH58f6Wtjo 3nOXAE5ly8cJOyrc9HFxk4Ycn/Ief49gfRH7tUWa29WlUE3q8VtaMTnjAx02ZO4a3u6T hVJpLFdq9LSDKMFcQgrlOrZbJqiMkIG3K309wpBUjO8FDh9loEtLOP+YwWhYm9wisj91 Ddig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=IWUmXHvIRv1Q6+KLmMzqs8rZ1xX3xtlUCsE3QMY698k=; b=Ux8sVWvqa7DzcqA9cTYpAv5wPk7/EzdMOJ2qQ2pNoPRAAXNqFqB4JB59QdQ1bzSA+p W/t9OWngd4jAJpcflvvPf+mPAKejQX7l2+5Ma8V5xIk7PUx6G1V6MXIn1Gt7KbkpwXf3 W+XA4k+0IlqpjyywdWhN1UPzd+W/V6TX1mBlQGGApGchjoakGxgyIM0NBdo4Ic8s0+pF u12KHGbehn6yaLqA/hNdr1HR9tQI3gRYAhgTA965slKKgG+J+iHS5WWzRL+bWpNEp/WO lCuZWp90489tmohsi2p8KR+HmsFoiH2cBLedZ2fSJ08oaJ414csfti18ZvNALKn3ziV2 UbOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=We+Ts2hH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p27si20546pgb.92.2021.04.14.09.48.13; Wed, 14 Apr 2021 09:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=We+Ts2hH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351931AbhDNOrX (ORCPT + 99 others); Wed, 14 Apr 2021 10:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351910AbhDNOrX (ORCPT ); Wed, 14 Apr 2021 10:47:23 -0400 Received: from mail-vk1-xa2c.google.com (mail-vk1-xa2c.google.com [IPv6:2607:f8b0:4864:20::a2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09F92C061574 for ; Wed, 14 Apr 2021 07:47:02 -0700 (PDT) Received: by mail-vk1-xa2c.google.com with SMTP id i2so4432863vka.13 for ; Wed, 14 Apr 2021 07:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IWUmXHvIRv1Q6+KLmMzqs8rZ1xX3xtlUCsE3QMY698k=; b=We+Ts2hHSHOHxeChgK8+e5GvO1bOhyJG3e8alHuvmBYg1sjXMvJXsRkvFie9C1LZ5Y EYo/ZdeYgWsiQFijZBgILNIU+zp8sKNqeJuFd7RLh6wkDWCLVDkeBArt+EZ90dBvcAMD z8E2Fb37ftMCoXc3LzC48d9ItTfC9IHb1XC+pQIc4C7xpTMO9sB3aQzRMvmw2G+F3khG gxN9STH6BjecBbxq5JPWFNKu+xCCEaRNnQUFeDTADBoVPs3rVB9MzQBNvup8p+CotXyO BabKwOG4lSUmSnjq4ge+yH4IVeMwCAUSnnwieSHf1c0AMTYpjtpzUnYZOgNv68oRG+gK kIxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IWUmXHvIRv1Q6+KLmMzqs8rZ1xX3xtlUCsE3QMY698k=; b=jOuiFafETxpSuZau7vR0HOeVL3kw9eIgmO58wvb77CyfrZjtVzX/X0bDuVmxDBWCSr 980LVa3ViZb4KbHrr8yhRwr8/8pHhNO7pdy8g3MR+OevDY7Ao+mRj78MIdnra0uB05Iy 270Sj9CVO/AcT/8SRd/J5G9S330NhPbuwuxf90KXEiK/A6h6f7kvwK9HMEPtkEYW1+Vu lPDrIs17CCcFYI80HU3tV5kI+TIlAF546kzvl/y6YDkev+bUL1pu/dWZ9a2j0O0Jb5QS LTzf9xNB80hcB0s/3BdUuP+/tR2RO92ZTlq3GHrom17rT//MJ/Kp6OVTuFmXHyw8WYmg bGpA== X-Gm-Message-State: AOAM533RUFn43pI/QcM8JTlV2hq6ZE0Um6x8IACw3w+3EQVTtM4VsZMb 2YDtbEPrM6G4hrv3HofnfG3Nub7syO5+4uqdAKIw0kufnRA= X-Received: by 2002:a1f:53c7:: with SMTP id h190mr28473405vkb.19.1618411620871; Wed, 14 Apr 2021 07:47:00 -0700 (PDT) MIME-Version: 1.0 References: <20210414131018.GG10709@zn.tnic> In-Reply-To: <20210414131018.GG10709@zn.tnic> From: Jue Wang Date: Wed, 14 Apr 2021 07:46:49 -0700 Message-ID: Subject: Re: [PATCH 3/4] mce/copyin: fix to not SIGBUS when copying from user hits poison To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, luto@kernel.org, =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , "Luck, Tony" , x86 , yaoaili@kingsoft.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 14, 2021 at 6:10 AM Borislav Petkov wrote: > > On Tue, Apr 13, 2021 at 10:47:21PM -0700, Jue Wang wrote: > > This path is when EPT #PF finds accesses to a hwpoisoned page and > > sends SIGBUS to user space (KVM exits into user space) with the same > > semantic as if regular #PF found access to a hwpoisoned page. > > > > The KVM_X86_SET_MCE ioctl actually injects a machine check into the guest. > > > > We are in process to launch a product with MCE recovery capability in > > a KVM based virtualization product and plan to expand the scope of the > > application of it in the near future. > > Any pointers to code or is this all non-public? Any text on what that > product does with the MCEs? These are non-public at this point. User-facing docs and blog post are expected to be released towards the launch (i.e., in 3-4 months from now). > > > The in-memory database and analytical domain are definitely using it. > > A couple examples: > > SAP HANA - as we've tested and planned to launch as a strategic > > enterprise use case with MCE recovery capability in our product > > SQL server - https://support.microsoft.com/en-us/help/2967651/inf-sql-server-may-display-memory-corruption-and-recovery-errors > > Aha, so they register callbacks for the processes to exec on a memory > error. Good to know, thanks for those. My other 2 cents: I can see this is useful in other types of domains, e.g., on multi-tenant cloud servers where many VMs are collocated on the same host, with proper recovery + live migration, a single MCE would only affect a single VM at most. Another type of generic use case may be services that can tolerate abrupt crash, i.e., they periodically save checkpoints to persistent storage or are stateless services in nature and are managed by some process manager to automatically restart and resume from where the work was left at when crashed. Thanks, -Jue > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette