From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 3BD463D333A for ; Tue, 2 Jun 2026 17:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780422713; cv=none; b=FKjCPrmPb84htoLshy+SEWovTEw6rG5lVC84BtmTN+ezEbgmIiU8yHt3nALI45TQZEY4GbQD7ihpchr/CrDjVbVg2z/i3CPvw8lo5a9z7MzI3RGmjVkSttYduAo5FmQMZPPcQRfznd8ftoBqSCyc6Lt6Wfee3vdcMUwpaIQ1wok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780422713; c=relaxed/simple; bh=yYXaAq1+AfJIYw+UB5LlmNe69eV4NUCXmpdurYJVBso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WpVlVqm2/x5Qrl/nsLgJI6FjZmMQKn6LhnvMNX8j5v578cRuGW42xW4NluDmQMeHNc/mcSQEcIQRmQYWDzsDuGLM+cFkgvwk/zyWJLsaFZaQHTKK+XDXtGQQqnMii3bttVgQlfLcyAC4X9Od/EpPp5PFOpIM0KT/O0bTodTyxfM= 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=wwoT85iY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IEshOL8y; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wwoT85iY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IEshOL8y; arc=none smtp.client-ip=195.135.223.130 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wwoT85iY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IEshOL8y"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wwoT85iY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IEshOL8y" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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-out1.suse.de (Postfix) with ESMTPS id 371D26ABEB; Tue, 2 Jun 2026 17:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780422710; 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=MvITR44WCuFYVJmAIwWLkD9hwei9C/qyk5kTPLnWeLM=; b=wwoT85iYQDuk9420zJxLqa2JQmMyA2iGfLx1QWmD0jLBFbkHmKt2/D3n5VEe9SJZdD1w/M eLofZGn6DnoflSIFovA/36b3XmgGQBF8EXDNhkyRmarBNffcIammF/KCplv9NqwXFH+DVV SIjWMO0alybgfoV7i3tMMABhWkQDIc4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780422710; 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=MvITR44WCuFYVJmAIwWLkD9hwei9C/qyk5kTPLnWeLM=; b=IEshOL8yfHLc8hClgbRdHQV6SC4ySrGwPP11nDbFMV595zfO6nna0dkk3ZK9U3/n4KqSXE fPkPTHeuAWRKIYCA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wwoT85iY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=IEshOL8y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1780422710; 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=MvITR44WCuFYVJmAIwWLkD9hwei9C/qyk5kTPLnWeLM=; b=wwoT85iYQDuk9420zJxLqa2JQmMyA2iGfLx1QWmD0jLBFbkHmKt2/D3n5VEe9SJZdD1w/M eLofZGn6DnoflSIFovA/36b3XmgGQBF8EXDNhkyRmarBNffcIammF/KCplv9NqwXFH+DVV SIjWMO0alybgfoV7i3tMMABhWkQDIc4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1780422710; 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=MvITR44WCuFYVJmAIwWLkD9hwei9C/qyk5kTPLnWeLM=; b=IEshOL8yfHLc8hClgbRdHQV6SC4ySrGwPP11nDbFMV595zfO6nna0dkk3ZK9U3/n4KqSXE fPkPTHeuAWRKIYCA== 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 07C41779A7; Tue, 2 Jun 2026 17:51:48 +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 BXvYOTQYH2pVOQAAD6G6ig (envelope-from ); Tue, 02 Jun 2026 17:51:48 +0000 Date: Tue, 2 Jun 2026 18:51:47 +0100 From: Pedro Falcato To: Usama Arif Cc: Andrew Morton , jannh@google.com, liam@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ljs@kernel.org, vbabka@kernel.org, chrisl@kernel.org, kasong@tencent.com, baoquan.he@linux.dev, youngjun.park@lge.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, kas@kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm/mincore: handle non-swap entries before !CONFIG_SWAP guard Message-ID: References: <20260602172247.279421-1-usama.arif@linux.dev> 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: <20260602172247.279421-1-usama.arif@linux.dev> X-Spam-Flag: NO X-Rspamd-Action: no action X-Spam-Level: X-Spamd-Result: default: False [-5.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_LOW(-1.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[17]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SUBJECT_HAS_EXCLAIM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[pedro-suse.lan:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,linux.dev:email,suse.de:email,suse.de:dkim] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 371D26ABEB X-Spam-Score: -5.51 On Tue, Jun 02, 2026 at 10:22:47AM -0700, Usama Arif wrote: > mincore_swap() also fields migration/hwpoison entries (and shmem > swapin-error entries), which can exist on !CONFIG_SWAP builds when > CONFIG_MIGRATION or CONFIG_MEMORY_FAILURE is enabled. The > !IS_ENABLED(CONFIG_SWAP) guard ran before the non-swap-entry early > return, so mincore_pte_range() can spuriously WARN and report these > pages nonresident on !CONFIG_SWAP kernels. > > Move the guard below the non-swap-entry check so only true swap > entries trip the WARN, and migration/hwpoison entries take the > existing "uptodate / non-shmem" path. > > Fixes: 1f2052755c15 ("mm/mincore: use a helper for checking the swap cache") > Signed-off-by: Usama Arif LGTM, thanks! Reviewed-by: Pedro Falcato Maybe Cc: stable@kernel.org ? -- Pedro