Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp834320rdb; Fri, 2 Feb 2024 05:39:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnD4d5VbowCXebIEvUPKRhqGen6/V9PTPgyoGKS/PVdU7LqiGSG++0N4Z7DYwEOcpkBDe7 X-Received: by 2002:a17:906:3515:b0:a36:2dc:1903 with SMTP id r21-20020a170906351500b00a3602dc1903mr4050114eja.68.1706881194090; Fri, 02 Feb 2024 05:39:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706881194; cv=pass; d=google.com; s=arc-20160816; b=QsgysG52Sm33WnBqKRJgKo1E+jAu8Xtkn8GaJj3fBRYiLgMxUdxMy2GNbJSMUn5brO dq+p44cp1ujlYH+3udFK3UJa7tNBmiaZuUyP20kjq6PhlhdIW7ZqbMUwqruGG17X/KhP 3rBi3w7A1SdLf0N26SF8WJzFPx2F3DS3PR3eBU4L/ovuRYkMxS3HeHRikL4CdNLlgQ/X q/drLrLeYY+xti0OrkpQuNtVkQ7GVRrEWALqbYyPhaMlyF19kqL/aHLArwJBv4aN6/qG +iSm0cZJmE3vLwoDzHXy5EQBF+QFld5hwI4i+mqpwaJcqZ45Ro+kWqyYop4ErqL8mrnb o3ZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i41MKt90HCy/J6mZcV7OB0Wu4vTJEn+w5XEKHKNjBAM=; fh=ZKuhVnKlI51B7Ak6BZmEigyKjeF3RGEoIwf4mYJ65mQ=; b=w20f292kDU90zRoPwZdYaieAoW+LqufYP/ruWzwpHcJRxY7SprhnU5LNbh4KxlGNfo sP0zpw0E2F/LQJom6lkupxBq/GnKwmExb0c1wkbvuJ+Jzy4/eUzDoxAIf2OzWxi9/itg kwRLoVgSoDJDrsUoQnDcNIC+6k8N6/uBvIfOmBsvOBpmf05kDw5NUuz968O8VPEWL/4X UX7HdU2wmgJI8j+6R6wFJmVju/qYL+MZzHkbXcwnwnwYtKoFVvdcF3InXuyjQhlWX0ZF wbGuwAE3oF1m04yJAMeXNZ5FVOxbKLoPjAUTSf5bK1L9AsXivO7vwnUDYcWuGElnvWYp bhIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=KiiExzXL; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-49913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de X-Forwarded-Encrypted: i=1; AJvYcCUeMxl6kxX1ASW+2wk01LhW4ciMX8ZgQWelHybFRx9ajLzQc5nQNo/0wEijfy5tOZYTbrVV8XmW15G3wJo8YsYXvUoY3THbp4zHOQLLEQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ks9-20020a170906f84900b00a35d5ce2950si841248ejb.573.2024.02.02.05.39.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:39:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=KiiExzXL; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-49913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CB75E1F2533C for ; Fri, 2 Feb 2024 13:39:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEFAA46557; Fri, 2 Feb 2024 13:39:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="KiiExzXL" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B48A46B9A; Fri, 2 Feb 2024 13:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706881182; cv=none; b=tOS/1Nvdo9as0jjh+gCHLqQ6VSnb8RkIuMiOOMLcIlv1gS/B/jR62DGOFznioGaxDpX1miQEStpVFMORz4sWg7wcWaPQocKcX1MzheX96A511n1a1uaA2iNVEraMXQFCYT2CuBvFVKlPMQzyjO3Vk0QJ5VhNkvLhd7sOmYHLPos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706881182; c=relaxed/simple; bh=miDAUqH++egcoxWAD5wW30DmvWxqjaeshiXLXeM5glY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TzR32TAD+ogAImLtdzEbmFY3l+tYEpciqreUG29Gf6DKDLZcvq+gxgzY2zyIVxgBvrlhChooCWNB9q1lMBluko1p34rAJB2GHd7P77dwH4F3qMVk0H1NhdXa1Vji+ufEc3Bt7gq2wZbZLfy7blgniqfKCdUCpEp7KOXCxVv2pBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=KiiExzXL; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id B7DF740E01A2; Fri, 2 Feb 2024 13:39:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uci-jhhF5SNC; Fri, 2 Feb 2024 13:39:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1706881173; bh=i41MKt90HCy/J6mZcV7OB0Wu4vTJEn+w5XEKHKNjBAM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KiiExzXLJY4+AspZZQa0Av26b2H8HFzHlmtkPc/0vs3Q33lr2CivSmBLYVAwvoTN2 rxdQq9xq/zktgGVr7XpYMFHB+zptXlm7E+L/Sw8ToT7duFQCmALMqZLhP4Beokw4uO Jg97HZ0IDCzAIw4j8MkrHx2o1iaVpRQufanVh/ia0J3IBa9RxqdMK74Xd1NtDIl54N jvIWUxk5sxX6IwGs4+PhEHuwFbWbFt9n383ROsRBuLk70IZssOk1JHYK8tmCyoWIlR xtMLpRxJP2hNFD5m3I+iyvWuZlsdnPz+Hs5jC+o/Z58TM05iEZnzRGMt7NH352O7UZ uDcgei3r65O9ZwTTNSTT3ETGmaXktkUT+vwFVbgZdVPMAYyJwp03ZSTMTU8g3AULB5 ZQw/Zk1Pq09G2gdhTTJDe/d5Eqb9DNtbVAspzxIlQYDA2klONS9fssRqLCigoRBiug xadCEFvVJ2XegD11ZH3/M4Di+8/kCmwnJjx+gh/jB5E3D7xacBNYMriVUs/ZvG1xDo pBRblQhKOCN7Ds7hK4mHVt6hK1dY2UU5eZeH7hn19sjBqRs7LI3pwhIwgp+e086Mp/ 0g3MWRpmI3iGTue+P8O6/aXow+C0F4F7LTVeaXQeYUakyI0AXak8Y4XmRlVQl3g3aB Zr69JeKncVzcY6dm/LXlM0Yw= Received: from zn.tnic (pd953021b.dip0.t-ipconnect.de [217.83.2.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AC6BE40E016C; Fri, 2 Feb 2024 13:39:17 +0000 (UTC) Date: Fri, 2 Feb 2024 14:39:11 +0100 From: Borislav Petkov To: Tong Tiangen Cc: Thomas Gleixner , Ingo Molnar , wangkefeng.wang@huawei.com, Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Tony Luck , Andy Lutomirski , Peter Zijlstra , Andrew Morton , Naoya Horiguchi , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-mm@kvack.org, Guohanjun Subject: Re: [PATCH -next v4 2/3] x86/mce: rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC Message-ID: <20240202133911.GBZbzwf-M37M-J3EJX@fat_crate.local> References: <20240111135548.3207437-1-tongtiangen@huawei.com> <20240111135548.3207437-3-tongtiangen@huawei.com> <20240131070258.GGZbnwov0g918F-FGz@fat_crate.local> <3009aadd-69d6-c797-20b4-95cf926b6dd9@huawei.com> <20240201142016.GFZbuooG9CRoK90U2C@fat_crate.local> <39c1e4d2-b1d0-91ae-595e-1add4698dd7f@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <39c1e4d2-b1d0-91ae-595e-1add4698dd7f@huawei.com> On Fri, Feb 02, 2024 at 03:51:12PM +0800, Tong Tiangen wrote: > Currently, there are some kernel memory copy scenarios is also mc safe > which use copy_mc_to_kernel() or copy_mc_user_highpage(), these kernel- > to-kernel copy use fixup_type EX_TYPE_DEFAULT_MCE_SAFE. In these > scenarios, posion pages need to be isolated too and the current So you have, for example: unsigned long __must_check copy_mc_to_kernel(void *dst, const void *src, unsigned len) Now imagine you get a MCE for *dst which is some kernel page which cannot be poisoned: direct map, kernel text, and so on. Attempting to poison such a page would not work, to put it mildly. So, again, what *exactly* are you "fixing" here? When I read "Currently, there are some kernel memory copy scenarios" and there's nothing more explaining what those scenarios are, I'm tempted to ignore this completely until you give a detailed and concrete example what the problem is: What exactly are you doing, what goes wrong, why does this need to be fixed and so on... If there isn't such a real-life use case you're encountering, then this all is waste of time. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette