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 BB4F8C27C55 for ; Mon, 10 Jun 2024 18:01:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FCF16B0092; Mon, 10 Jun 2024 14:01:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AB8E6B0095; Mon, 10 Jun 2024 14:01:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 073BE6B0099; Mon, 10 Jun 2024 14:01:38 -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 DE4CC6B0092 for ; Mon, 10 Jun 2024 14:01:37 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 61B3A161077 for ; Mon, 10 Jun 2024 18:01:37 +0000 (UTC) X-FDA: 82215746634.04.A683BC0 Received: from gentwo.org (gentwo.org [62.72.0.81]) by imf24.hostedemail.com (Postfix) with ESMTP id 8FE7C180003 for ; Mon, 10 Jun 2024 18:01:35 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gentwo.org header.s=default header.b=BI53CnhK; spf=pass (imf24.hostedemail.com: domain of cl@gentwo.org designates 62.72.0.81 as permitted sender) smtp.mailfrom=cl@gentwo.org; dmarc=pass (policy=reject) header.from=gentwo.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718042495; 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=Q5MC3qaReJfn9gANOup+XRVeWZt7xRGB6cPMWCh+LT8=; b=FThF8g3Qzuiy8xtC4Wp7L2jqoolZS5rcR5V1dv4mfUm3uY8++5A4kc///1F6ooHgRIDqRc pMaZQQnkcD2Vw8fEA4PL0FDC9OxMOLlCv47/HI6gh2AvO6GUoCD8fX7mSnY6e2ZVQAzf8O JJaC2f+jWlWS8HdLWhfWFoOgV+T5HIg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gentwo.org header.s=default header.b=BI53CnhK; spf=pass (imf24.hostedemail.com: domain of cl@gentwo.org designates 62.72.0.81 as permitted sender) smtp.mailfrom=cl@gentwo.org; dmarc=pass (policy=reject) header.from=gentwo.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718042495; a=rsa-sha256; cv=none; b=HHiRHSDxDcGKRtdqzJX1eNV5xl9Wy2X0PNY7cWZA+CuJbe2OKSkHIeyPblM7vZ9hXW9Zko aBUD4N+FFUaDxZXFilSXEfOuKWTdwJ27oZppli28rq0gY281A2reKqtBF7sJ98OcUcAQZV 19KmwxBqDGqzPhpVzxv2gsPXpFQOSwk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gentwo.org; s=default; t=1718039226; bh=WZzDraNl6RoPonM/1zyqOF3B7Wjw0fGAsj4wynKG8IY=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=BI53CnhKy1X1kUJArUEq8in9DDpJ3nNOWM9O9tHoKXrsMORVVameIHPCQEEioNhN7 86Fcj8ZWnB/3RUWfkPFJzd/hLJ1wJcViftUadbNKio6bz6cMxXmGvpdD5k2fhdpIQ3 rPG734duE/Nu8+CM8eNdkucgkq84CgH9fd44IN/Y= Received: by gentwo.org (Postfix, from userid 1003) id B676640B0F; Mon, 10 Jun 2024 10:07:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id B59954022C; Mon, 10 Jun 2024 10:07:06 -0700 (PDT) Date: Mon, 10 Jun 2024 10:07:06 -0700 (PDT) From: "Christoph Lameter (Ampere)" To: Chengming Zhou cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Feng Tang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com Subject: Re: [PATCH v3 1/3] slab: make check_object() more consistent In-Reply-To: <20240607-b4-slab-debug-v3-1-bb2a326c4ceb@linux.dev> Message-ID: <63da08b7-7aa3-3fad-55e6-9fc3928a49de@gentwo.org> References: <20240607-b4-slab-debug-v3-0-bb2a326c4ceb@linux.dev> <20240607-b4-slab-debug-v3-1-bb2a326c4ceb@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Stat-Signature: s4pdbekciyxdppxt9e3c4oxx4ysbjy9w X-Rspamd-Queue-Id: 8FE7C180003 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1718042495-604878 X-HE-Meta: U2FsdGVkX19HmdX05JOBcIzrq3tl66CFJ3r2I4RXQGLRVTgMA4di91OtBXqym8uGQaW88tfE1CgwxQXppl6+oQ1VFMIh6UlA18DCQX2qeogw2M1xBsr4JoIyuHOGwYTCjZJ9jEMg5E+BVwDAZKv3VUvS9BT9qsyjW/0xaRdnNAFxM1TagONJpiEP8VUlQNd3n70D6p8/VDvNVErReeupIPMyaMJjsashO+xR4ogNdOsuHVOoGJOXsZR4wC/gVfqNuthJQmNfY1nXJCHJmWqBueJK8+T3hU0DaT4LoEgcE38stDydQFcdKN/mp+/xkdIiktbrhn/g5DfFDnioHdYKnaI5Xe26B1guOHF/tzRqG3jqKt1ui5fOQbOHg5pSwo1o+Dg3V0rB8xl/OIHw/UI8n1NqVt0ucNgf1i5WzUn3wmZCLQpQ0vDxu9X7rbNwdWkBMFyYuRwIaX9eVHONZ2EHxdXyvZDqpp2kDpCxMMxtm0slCwFnknNE658qJqMXjBx3tHNOatYNe/KBEhmptrhERH8I603orj3EO7f9qzJTFuJGJ39qTRmpon7VI+ofs98AXeiBeY41qDmhizrBnaGe5Rq8zmnaLTYQYSQu5Gmgb37B8r4GdjwlKPe3VCkGGaEOj3nG2HW5aHjyA61FnF0oTKY+Ztb4iraB6D22ixKs03HtNVtbKuZ6kM2DFNDP8BowPFehjtYAYSD6hHG912cvZv8NpmkdS6ce/B05nkbk9JD41g2gMbLnCsY9ZVC6jE7RPRxaGyFs9/ipi2Pws3RTni7qtjk1ZJzoXrN7kUb8UawHNoUyQr43cYVicHz3lhcX6bRBtdf8MskypfhIWm9cx5s29K+1LCfqcljGn8XkmTLN5lEry50A1429B5Cos1i6Pa55d1dkMYRRHEYZR9eGzJk3VUjHrK7zSwkbsfnj8YTXP/3bR5cBEPvYps3/osLqFiX3N6w3/c7RJw8QFnE ddUPK6Zu pPeLFzufUdrUJn0gEJ+IqkNRmAeiIr0Z7vkf1iudMivaSrzP3PXnsMh0BsQ96fEcAcTE9J/+5yc/hqiCS9fdvf9XzwdtBJ8ynEtMborad3ehdjMzJosLOHsJ1nTeQ/vGOlYHOcy7G7hZHlJFriUCwzMn6a5RAFFTKNZH/CNiTKShgXsQlJ5yffStOQDTVz2hihYJM4VeRNw/lG1RDs1/UenHHA4S2lX6LgyTZ5ku95keWipQD5o9axQDp59TroVeQDzZXnXZUXF8jZSmQv9dk8Z8mKBoY0EbRnmYH X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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, 7 Jun 2024, Chengming Zhou wrote: > There are two inconsistencies in check_object(), which are alignment > padding checking and object padding checking. We only print the error > messages but don't return 0 to tell callers that something is wrong > and needs to be handled. Please see alloc_debug_processing() and > free_debug_processing() for details. If the error is in the padding and the redzones are ok then its likely that the objects are ok. So we can actually continue with this slab page instead of isolating it. We isolate it in the case that the redzones have been violated because that suggests someone overwrote the end of the object f.e. In that case objects may be corrupted. Its best to isolate the slab and hope for the best. If it was just the padding then the assumption is that this may be a scribble. So clean it up and continue.