Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp385305lqh; Tue, 7 May 2024 02:03:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7hEBZoerOVbNjDnj4svbMKrfZiDl0jUxqAjMR2WigOnqU+aEYoZWE3WfOm1RoY8zg3t6mueqBhqxsflMSp+FZtSgybiX5DwICnfhbig== X-Google-Smtp-Source: AGHT+IE969MvySLnOBqW1egdFRo/ik9j9GcX2mtf/e6ZdWqhTkKQ4/Bt/A7ky62fS0pTRm3RX8SU X-Received: by 2002:a05:6402:22d7:b0:570:35e:9a09 with SMTP id dm23-20020a05640222d700b00570035e9a09mr10532241edb.7.1715072618385; Tue, 07 May 2024 02:03:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715072618; cv=pass; d=google.com; s=arc-20160816; b=T/5aI5iA/W87c6iitM1KSyXCVJXUlwtGROxsHRDBKtOfEbwSu0z9lRrcaT5Pakt0y6 JzSCQRWXCksEpHCwpC57ou8ThndguXraHUwYJv6nzs5o43wiPX29YfT/efyfsORdkaNY Lrd3jG/NuAlJ8hcESyYhAxBkpJbquf+zZlpOyYcNCMfNwQ3n1PlQvFiQ2QACQ2QKvwkh c1Q5hlo1lGImDTh0tj3/RtmjOpti/zCqv0kBxRO2+f3BaHYkiV4EWCUTVgYtxKFdtfJa rI+DMZzFuIf5l7cPi/RjnpHVXAhhtTyWkmiQU8dTGaaEH8yI7p7l4tmvQ3S0bBBXF0z0 r3KA== 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:dkim-signature:dkim-signature :dkim-signature; bh=ixaChRQaGvKUHEvNH8Bz6whyZ7S1illey/rZiGocvi8=; fh=daKuXPVNXVUxnAsUBFjF7HHYSk3cdiaLzDZb9QT58K0=; b=XUziu1GV9Am4Eti54NOoV2YCkVc05lWW0O28etinq4zXcza7JH0gBCLmKITWkwR56y 4LFKc4vs72MPBOxE29LU7G4yx8ak+1Y8G61eWGIuKxnvLBpinESqQQTA4goU+9qXXqnI llxWXSvsjoAy/Q6GSH5daAQ3/MF22oVjDp6r4o5BHytKCKtbQzMcCUTXJAHNquW54aCp cJ74Q7x8gyZ4ymJRoh99s3nz01SfsAZrziwCyxJWurOXA0YL8SLSJk5PLFCBi07qHVoZ 2a2KjERlX8snP9nXfAaz8fuxDrr8ezYrIB67p/FzEziDbA5/X8zROwuNCWDrvBAPOrvR 3++w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=jXT81tP+; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=jXT81tP+; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-170909-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s9-20020aa7d789000000b00572aced39e8si5959495edq.196.2024.05.07.02.03.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170909-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=@suse.de header.s=susede2_rsa header.b=jXT81tP+; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=jXT81tP+; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-170909-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.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 F08681F222B3 for ; Tue, 7 May 2024 09:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC0E714E2CF; Tue, 7 May 2024 09:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jXT81tP+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LfRkAYkX"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jXT81tP+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LfRkAYkX" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D0D614D44E for ; Tue, 7 May 2024 09:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072562; cv=none; b=hZY8JdSRGW3mG1CfiKbUAPn3FeoT1ggUdIKK+HSQPhp0ZWTRLomyA1T3FYQ6z3AixxZf31DzKlffPgMcjeq6TU9BO/0aA1E0PQz7y7xi06DZ6m1GenrQJg8BdOi+vuWDQhopQaPcdNPJZEaO0LJM0ZIIRU3IGducUVJiIUHWL9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072562; c=relaxed/simple; bh=60jS181WO5k71seEepe3WjZoVHuIO2PGj2XzHCB4kn8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=THdezfaDRkqdc/fPzW99oaJGKnqLUUNbQ3fOPlqU+eg95pKtFtMQQYh+pgDqhVP6Rl5ODI27tBC1Fsi29dsuSlHezecU/TjVbYGd71sMCToqoPnWeMxwb702w+tGbcmudxbwflf0I+cxYuDp9FvNnapeFHQzBW0JRhDZaEfV20Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jXT81tP+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=LfRkAYkX; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jXT81tP+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=LfRkAYkX; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D18DD206B1; Tue, 7 May 2024 09:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715072552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ixaChRQaGvKUHEvNH8Bz6whyZ7S1illey/rZiGocvi8=; b=jXT81tP+Re2hes4VND70fiagI72rujWt0OqRG9tVRAwmfQC3zILCE6avtnrzRQZ41VinIz 2KBi5Brli5rTF11eq++jiWUYuz7XE3x9p0oRgGSjKEp62voTVY3ld+2BoEOBAX0iZiFlCk GgA6LfygyR6rao2k7JjHjmaFh8wjYig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715072552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ixaChRQaGvKUHEvNH8Bz6whyZ7S1illey/rZiGocvi8=; b=LfRkAYkX5N7Oao+7Jux7Gwo6vYjLRALURbKFhHMeME0iBTC6jyCpshpWJI0+Si3xJfUzQV TEO2jM4i60bS72DQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715072552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ixaChRQaGvKUHEvNH8Bz6whyZ7S1illey/rZiGocvi8=; b=jXT81tP+Re2hes4VND70fiagI72rujWt0OqRG9tVRAwmfQC3zILCE6avtnrzRQZ41VinIz 2KBi5Brli5rTF11eq++jiWUYuz7XE3x9p0oRgGSjKEp62voTVY3ld+2BoEOBAX0iZiFlCk GgA6LfygyR6rao2k7JjHjmaFh8wjYig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715072552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ixaChRQaGvKUHEvNH8Bz6whyZ7S1illey/rZiGocvi8=; b=LfRkAYkX5N7Oao+7Jux7Gwo6vYjLRALURbKFhHMeME0iBTC6jyCpshpWJI0+Si3xJfUzQV TEO2jM4i60bS72DQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6FA5B139CB; Tue, 7 May 2024 09:02:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OIEOGCjuOWalRgAAD6G6ig (envelope-from ); Tue, 07 May 2024 09:02:32 +0000 Date: Tue, 7 May 2024 11:02:30 +0200 From: Oscar Salvador To: Jane Chu Cc: linmiaohe@huawei.com, nao.horiguchi@gmail.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm/memory-failure: try to send SIGBUS even if unmap failed Message-ID: References: <20240501232458.3919593-1-jane.chu@oracle.com> <20240501232458.3919593-2-jane.chu@oracle.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=us-ascii Content-Disposition: inline In-Reply-To: <20240501232458.3919593-2-jane.chu@oracle.com> X-Spam-Flag: NO X-Spam-Score: -2.78 X-Spam-Level: X-Spamd-Result: default: False [-2.78 / 50.00]; BAYES_HAM(-2.98)[99.91%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[huawei.com,gmail.com,linux-foundation.org,kvack.org,vger.kernel.org]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] On Wed, May 01, 2024 at 05:24:56PM -0600, Jane Chu wrote: > For years when it comes down to kill a process due to hwpoison, > a SIGBUS is delivered only if unmap has been successful. > Otherwise, a SIGKILL is delivered. And the reason for that is > to prevent the involved process from accessing the hwpoisoned > page again. > > Since then a lot has changed, a hwpoisoned page is marked and > upon being re-accessed, the process will be killed immediately. > So let's take out the '!unmap_success' factor and try to deliver > SIGBUS if possible. I am missing some details here. An unmapped hwpoison page will trigger a fault and will return VM_FAULT_HWPOISON all the way down and then deliver SIGBUS, but if the page was not unmapped, how will this be catch upon re-accessing? Will the system deliver a MCE event? -- Oscar Salvador SUSE Labs