From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7932EC433ED for ; Wed, 14 Apr 2021 13:05:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C901961176 for ; Wed, 14 Apr 2021 13:05:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C901961176 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A8CC6B009B; Wed, 14 Apr 2021 09:05:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 430566B009D; Wed, 14 Apr 2021 09:05:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 282F76B009E; Wed, 14 Apr 2021 09:05:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 089E26B009B for ; Wed, 14 Apr 2021 09:05:22 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9FD08181AF5D8 for ; Wed, 14 Apr 2021 13:05:21 +0000 (UTC) X-FDA: 78030993642.23.9E0F142 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP id 77698E000104 for ; Wed, 14 Apr 2021 13:05:10 +0000 (UTC) Received: from zn.tnic (p200300ec2f0e8f0048923c048b418a85.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:8f00:4892:3c04:8b41:8a85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9DEEB1EC0258; Wed, 14 Apr 2021 15:05:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1618405514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=pDuekF9w0MXd1qItoeFQ9QxXI7Xjo0WpNUInm4OD5SM=; b=gqITvJI1pOnfp6ueiuu+dKNSWjZG9ml543//8THt7p8wjk2BrwH8JGAXY8GI/KQezikMhP uuWiOhv5p4q9YuJLTybHUAZJEHdw1tN/A7bCMpe9tm/Ek+KRxUO2MUHHJy/upYGo0TWq3R QzheHW9yXsTHICoO4yesmocUjMWgln8= Date: Wed, 14 Apr 2021 15:05:09 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Andy Lutomirski , Aili Yao , HORIGUCHI =?utf-8?B?TkFPWUEoIOWggOWPo+OAgOebtOS5nyk=?= Subject: Re: [PATCH 3/4] mce/copyin: fix to not SIGBUS when copying from user hits poison Message-ID: <20210414130509.GF10709@zn.tnic> References: <20210326000235.370514-1-tony.luck@intel.com> <20210326000235.370514-4-tony.luck@intel.com> <20210407211816.GP25319@zn.tnic> <20210407214310.GA479383@agluck-desk2.amr.corp.intel.com> <20210408084958.GC10192@zn.tnic> <20210408170852.GA485019@agluck-desk2.amr.corp.intel.com> <20210413100722.GC16519@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 77698E000104 X-Stat-Signature: 4t6ar3r9ai6dkstxiuqybn31xcthewgb Received-SPF: none (alien8.de>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mail.skyhub.de; client-ip=5.9.137.197 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618405510-988830 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 13, 2021 at 04:13:03PM +0000, Luck, Tony wrote: > Even if no applications ever do anything with it, it is still useful to avoid > crashing the whole system and just terminate one application/guest. True. > There's one more item on my long term TODO list. Add fixups so that > copy_to_user() from poison in the page cache doesn't crash, but just > checks to see if the page was clean .. .in which case re-read from the > filesystem into a different physical page and retire the old page ... the > read can now succeed. If the page is dirty, then fail the read (and retire > the page ... need to make sure filesystem knows the data for the page > was lost so subsequent reads return -EIO or something). Makes sense. > Page cache occupies enough memory that it is a big enough > source of system crashes that could be avoided. I'm not sure > if there are any other obvious cases after this ... it all gets into > diminishing returns ... not really worth it to handle a case that > only occupies 0.00002% of memory. Ack. > See above. With core counts continuing to increase, the cloud service > providers really want to see fewer events that crash the whole physical > machine (taking down dozens, or hundreds, of guest VMs). Yap. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette