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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA70FC3DA4A for ; Fri, 9 Aug 2024 08:33:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 571976B009C; Fri, 9 Aug 2024 04:33:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 521276B009E; Fri, 9 Aug 2024 04:33:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E8596B009F; Fri, 9 Aug 2024 04:33:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 21AD16B009C for ; Fri, 9 Aug 2024 04:33:19 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C896E140A59 for ; Fri, 9 Aug 2024 08:33:18 +0000 (UTC) X-FDA: 82432042476.17.470F9CA Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by imf04.hostedemail.com (Postfix) with ESMTP id 6F14C4001C for ; Fri, 9 Aug 2024 08:33:16 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=alien8.de header.s=alien8 header.b="gqCsp/Fk"; spf=pass (imf04.hostedemail.com: domain of bp@alien8.de designates 65.109.113.108 as permitted sender) smtp.mailfrom=bp@alien8.de; dmarc=pass (policy=none) header.from=alien8.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723192363; a=rsa-sha256; cv=none; b=gPY8zXJeov5kHml5ZOxverrpdjEWporRZkUAEYM8aKB6/fXE57L4xZu1RPZJC0VS1m6Hnl MvckyW3aQFJ/XsEXo29sZUk2cpO5tmOcn2i9/cSt2xLigf4oBGbJtvT3v27wmJAvvYl9Yl ziOlJB/JOIW+qhZcFQVeqrbthhI2S2g= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=alien8.de header.s=alien8 header.b="gqCsp/Fk"; spf=pass (imf04.hostedemail.com: domain of bp@alien8.de designates 65.109.113.108 as permitted sender) smtp.mailfrom=bp@alien8.de; dmarc=pass (policy=none) header.from=alien8.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723192363; h=from:from:sender: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:dkim-signature; bh=mL+0Ufw6+fU09Yd6bywSJf+EsstuDQyFiAfOqpKLYG4=; b=MWA+OGBuqobRvpF32GK87kdsKuUEWOwShSJZN04C0pXXM8fYcWHQ+QtTfIEmIYPnBjs1eM iiroFimZqrgFWgZYebmHaD0LYC/EJisSvsCxETiYESsXSvT7X9IfhAwwaUxzH3av/u9P+A jkcUjUe8NMc2ZAroxFtj8Pp2ZGAgWBw= Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id E7BF640E0269; Fri, 9 Aug 2024 08:33:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.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 Tbamw100d6V2; Fri, 9 Aug 2024 08:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1723192390; bh=mL+0Ufw6+fU09Yd6bywSJf+EsstuDQyFiAfOqpKLYG4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gqCsp/Fk2X3Y0KeOYFm5NohZB/FSTIQo/XJn1M3HCNBPsIbhrAvwNZJgDHa+52oRB 2u1wLEHXBw9O+Jeq+1zI7x4+OFhSVy6vEf9xvxJq4ZHt+rC5j9Yyl62o877KCJgHSZ 95GV5kPHU6Vid6tNeOBleHSZMwNXw/BhiLipiHbtDWJTT+LD7sefOpu4gAZVEnaauz WyGFEUYG2aCTf/MjHTWAJB4VEXsTql/5Ui1Lxz6CGxV+mP9bVyDGrUpSXoUYpHEuGe CzvC04u9ZOhclaS/0LKRwpL0ip8ppOlGh0Xl+kJq7CSzy/M8Lupw4MBHHRZpH8WcNR eyB5ZzuUD0JfHMWKnkR1E+RXcsq7QgsxVlABXjohVh7dcbyxpnC7Wph8nH3GIMbLzM dzt2EHlkb4hmuubKfCUAZX5+qwX+zGBpZZ0zj+DxCipVHI8LVmkW+kgCtWJFv8hTau AKtPhnENFpFnZQ7k5v3dMO41GBB0CCbTVTsRR2P9gtjqoMN4fCe9nEWL+3D52+oQuU d2LmRzJciVgm05SnXbF7FQutRwAHLQJ0oMnKhW8e7DWSO9i/LCn76JEYG4Ju3rajJP b94oxf+pI29MRKbJrE9BFTD3jkkHSzYm6gyr5MAR26lEP4YApNF9c6Tvlci85EJZd6 ZrTVX6dBwwInr4LltfKOhUVo= Received: from nazgul.tnic (unknown [87.120.165.225]) (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 A25FF40E0263; Fri, 9 Aug 2024 08:33:04 +0000 (UTC) Date: Fri, 9 Aug 2024 10:34:00 +0200 From: Borislav Petkov To: Andrew Zaborowski Cc: "linux-edac@vger.kernel.org" , "linux-mm@kvack.org" , Eric Biederman , "x86@kernel.org" , Tony Luck Subject: Re: [RESEND][PATCH 1/3] x86: Add task_struct flag to force SIGBUS on MCE Message-ID: <20240809083229.GAZrXUHfjgVcHSZPsb@fat_crate.local> References: <20240723144752.1478226-1-andrew.zaborowski@intel.com> <202408052135.342F9455@keescook> <6273D749-9CEC-45E4-8C56-FA3A1DBE1137@alien8.de> <20240808145331.GAZrTb60FX_I3p0Ukx@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Stat-Signature: sh9qwrco7jwpxtfw71jsmr6z4d9w79k9 X-Rspamd-Queue-Id: 6F14C4001C X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1723192396-930813 X-HE-Meta: U2FsdGVkX183ZheHPF2YGTyRPkfgoRK/NxIrMDCzFZMIT9lp6TJhwmjjyE0wSjA1IVwB1xucIcKBbT6CwmRXrD4u5FsMdIk5SJ1rcD43ZoRaVuGMDBgQtc7Q0YwSI8CXN+gr0MJmuo245Ysz5quVx+XMec1zH9cG8sQTqA0E4/gsZInA/TU8r6sQXcDkp2EnZRslvfI+oIB6WnUbYY6InugwhwM0JLn5k8tDK/Zh/Mgq7bGAv/Sbz1ub9ppLbCCXdH5k7N63Ot+IR4GzEbeQZ9FnU7fTGyexmHt9O0BHxEor2o/8xWEfMPwWApiRXXos6EAkL8cv5su7iAgru66pSxNqmgdLm0Mn0udegvS9Lcodm1kT8OnnLp8evkSpKqp/bYnlWU8wX+/rzaS9XI7rHQLWb+Ccixomi5IrWQXxa3KBwqwWLYrBkTJnuQA2pj+XEPWggOgY6lGrzr01tn1GUYsbzQei0c3DaR1kLrBUea4aI8XhltA3ft6tYWKByp93p9A0Zv1m3XFopLbKjqIzEIkdwy5FfEXR6zxCZk/cCnLhdhdEI/WSecn1rGS4r9fXNS0UjC41qTrFRUfgUwrY06SQ3xPgQTAzBqEXJqkoWNseCdTWmqTCcFs0R4N5vXRiM5+dzZA7w0CUXmWMnbMwBTe5L3S3UhVvhMu7prmYBYJbL2td6ELK+oZyAcH2kncMK2HuRE3gtvwgKJC8ZuiUxNJ/w6+yyduqGEce79/sp9oXCXhZvBFdH+P3BmyihdrVWaCv/PlYeuwtUxYPHJUVsYGJnMmBqA/cdMFl2Ext9n01WGUl7lNMLY+qb0/mkM/7p0er7TG5kqBmN2ZezDeBL/rZpjpc87V7WTPAvJNcQGOW/OESiqRr5F1yMjgSUcIe3ZFHwBI1DT+dZVdCpALoUudsDYVa2jCIP4y/6dGx8ZDnWACSrhq2oX0kRv5ZiX2D7bvP+7BzkUVag8q22nw 1lV7OMKd 8+F48iyYnnlXYe34njnoLUc8XHV28bssQuBUNPArjy7lChm6XDz+E+dmFt0BBBMMgF/W84sPctqftWo3GrauPxlbq7UxIBYJgRaNp8+5lzvhjiBsivxcN1aU0uzIiMoXRHUipRiyrqpn1wl96DZMKyJTI2vByrXUsCpouNfl2GoNUP8Em2HN123HyWbAUnWYq9kIuvEeIZTFvzh0YM2owcMn8brl4iWyZPD/2u8r7roWSl8DKw1/LOzmhmQlrxT5uDbPnLubMiD3kmg4qTKrEjq6yC6fOEaT1FO4ZCHJ5SmNAsHeulkVgyBchOw1RL06gBYfr X-Bogosity: Ham, tests=bogofilter, spamicity=0.001243, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Aug 09, 2024 at 03:22:19AM +0200, Andrew Zaborowski wrote: > I don't have a "real world" use case, we hit these two bugs in HW > testing. You inject MCEs or what testing do you mean here? In what pages? I presume user... So instead of the process getting killed, you want to return SIGBUS because, "hey caller, your process encountered an MCE while being attempted to be executed"? > Qemu relies on the SIGBUS logic but the execve and rseq > cases cannot be recovered from, the main benefit of sending the > correct signal is perhaps information to the user. You will have that info in the logs - we're usually very loud when we get an MCE... > If this cannot be fixed then optimally it should be documented. I'm not convinced at all that jumping through hoops you're doing, is worth the effort. > As for "all that code", the memory failure handling code is of certain > size and this is a comparatively tiny fix for a tiny issue. No, I didn't say anything about the memory failure code - it is about supporting that obscure use case and the additional logic you're adding to the #MC handler which looks like a real mess already and us having to support that use case indefinitely. So why does it matter if a process which is being executed and gets an MCE beyond the point of no return absolutely needs to return SIGBUS vs it getting killed and you still get an MCE logged on the machine, in either case? I mean, I would understand it when the parent process can do something meaningful about it but if not, why does it matter at all? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette