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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B0CC433F5 for ; Wed, 23 Feb 2022 17:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243412AbiBWRkK (ORCPT ); Wed, 23 Feb 2022 12:40:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232607AbiBWRkJ (ORCPT ); Wed, 23 Feb 2022 12:40:09 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2BCB48; Wed, 23 Feb 2022 09:39:41 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 999C71EC054C; Wed, 23 Feb 2022 18:39:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645637975; 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=g0YIzePoWzAZ4Uvnm49byjS7oxjoYq8edIxADQrVPyU=; b=hyLDcdco9pcxOsUFOHfBuUy1pDsGbEWFw7QZ8l1lk4KR6O3F3DAk2Geu11gbBFR2DCTr0X ChUcIMCnN4QFufWvZ28wdusRe8NKKw3ltJcDyKbikFRanyNu76QCRILf0XbaMfODp5sfQt AXblI4oinJ2VQnql++MhoYKvyMaSpRU= Date: Wed, 23 Feb 2022 18:39:38 +0100 From: Borislav Petkov To: luofei Cc: tony.luck@intel.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, naoya.horiguchi@nec.com, akpm@linux-foundation.org, hpa@zytor.com, gregkh@linuxfoundation.org, rafael@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v5 1/2] mm/hwpoison: Avoid the impact of hwpoison_filter() return value on mce handler Message-ID: References: <20220223082135.2769649-1-luofei@unicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220223082135.2769649-1-luofei@unicloud.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 23, 2022 at 03:21:35AM -0500, luofei wrote: > When the hwpoison page meets the filter conditions, it should > not be regarded as successful memory_failure() processing for > mce handler, but should return a distinct value, otherwise > mce handler regards the error page has been identified and > isolated, which may lead to calling set_mce_nospec() to change > page attribute, etc. > > Here memory_failure() return -EOPNOTSUPP to indicate that the > error event is filtered, mce handler should not take any action > for this situation and hwpoison injector should treat as correct. > > Signed-off-by: luofei > --- > arch/x86/kernel/cpu/mce/core.c | 8 +++++--- > drivers/base/memory.c | 2 ++ > mm/hwpoison-inject.c | 3 ++- > mm/madvise.c | 2 ++ > mm/memory-failure.c | 9 +++++++-- > 5 files changed, 18 insertions(+), 6 deletions(-) Much better, thanks. Acked-by: Borislav Petkov -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette