Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp511796lqp; Mon, 10 Jun 2024 10:33:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGF9XT0+bM95S6edCqIC6iqcJkUvy1HHu3rESdLeENJmdSZMyvAojtWsAx7KOXF70sBdR7rkXAwCeYL2D3xleHNNj7aJ6dUVRFO3peUg== X-Google-Smtp-Source: AGHT+IHpXuvNvQTD2T/BHlkrnRPFeIIcLKwxTpeeGhb3e+Qhi0dZ+U7266Uxo5L4zIIrR2MBvD5L X-Received: by 2002:a05:6358:7202:b0:19f:5394:c26d with SMTP id e5c5f4694b2df-19f5394c3demr323355455d.18.1718040816666; Mon, 10 Jun 2024 10:33:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718040816; cv=pass; d=google.com; s=arc-20160816; b=VpYXS4R+JcU/URYj1I/L6z4bWb1rG9u3sMtmiAXT73AiyM4lyc3VhIeKsw+YA3COxl fA8Z9bBO41nK3TfpFjSNmqvkqR2OYIe1NuKICP8BTX6UhJ8HgX3I36HN+qjf/bQ3qt0P KHnfFiSehA+g9xsNIHY4Oaik//mhr4gAvQ+4hujjVDjSnNRdOlkNs84FLn/I87SNnAdC 8duBLFscBWoa8Rb9c1UBozciY1EDDZA9kK3OWccjEVEZbC0dFGDlTS0JkQWjwb7iIlNT ENq/wBKRebblxJr+vxg9i+7yXgcyaOXGbowS9P1xU11rwNdvCVFp1IxNGKwgZstMLR46 uZ9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=Q5MC3qaReJfn9gANOup+XRVeWZt7xRGB6cPMWCh+LT8=; fh=NxG/QNXZMeQK7+DR7iD9/cLDYuxcj8obtd2iRMZ/6lg=; b=G1ZZ6cL5MiSrlSkHm7j+cKUtbORMrcT/VlYGzU3yCKY0FRf9uyu3lBbWXUak/NaA/C PIXNJ93bhb4uz8DRp/bStUFyqvh1S+am0GpRx5W7TQNlabfqWOs/xvX2RHONRbqPkyip /I8LSuCNtwTEKGjYGiBuciaQvEdtb8XwnRciUH/foAPYNWHGwqQh0idKFnykUxLOzzQE yV+bORS+FccWM/Po7C5sTWULErircJoL6TpuvBS6pKztdAjv2BaeRw61Cvm2d+jhvL3E kwV2NFJ4te5/MdCcYFJknsSUwa4veRV9Ov38MMihk7cs+FUbQxGETQSktBrl1IwHQYGy wVFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gentwo.org header.s=default header.b=BI53CnhK; arc=pass (i=1 spf=pass spfdomain=gentwo.org dkim=pass dkdomain=gentwo.org dmarc=pass fromdomain=gentwo.org); spf=pass (google.com: domain of linux-kernel+bounces-208654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208654-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gentwo.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e452d806bbsi4683675a12.853.2024.06.10.10.33.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 10:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gentwo.org header.s=default header.b=BI53CnhK; arc=pass (i=1 spf=pass spfdomain=gentwo.org dkim=pass dkdomain=gentwo.org dmarc=pass fromdomain=gentwo.org); spf=pass (google.com: domain of linux-kernel+bounces-208654-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208654-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gentwo.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6F1FF283CAD for ; Mon, 10 Jun 2024 17:31:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2A921494B9; Mon, 10 Jun 2024 17:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gentwo.org header.i=@gentwo.org header.b="BI53CnhK" Received: from gentwo.org (gentwo.org [62.72.0.81]) (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 694508F6D for ; Mon, 10 Jun 2024 17:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.72.0.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040696; cv=none; b=bue782HqJwNulfyzTrZHp+A1bQB28z9cG3R1RkMxC1tjTMhH8VOMaqMXJFVAlWoxhhHgR30/Zw+qw5AJmsr7mp9MEsFj6TCc55Zy88D2gvxSj0uPxwtgwT9m3HRq+XflKbXSfD3Tgog/IU9qyz+9GsAjALYuBsN+9f53pM+A28g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040696; c=relaxed/simple; bh=WZzDraNl6RoPonM/1zyqOF3B7Wjw0fGAsj4wynKG8IY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=p69vOrGJjJA+Ct2sG9blNOoTsvSbg7iu4y+X3slOfpa3fMlHK6eZ9/pN5TAZuhYe9oVcpMY+RkTAxWPFqih5uSwPSRDqoIbPCKhUNTtyVpEfB9CldsMIVs0tKJlQYM7F9QlqJKF6SA5JJqpUPIOi3bgdJza5t0vLBrl7fzWCMmM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=gentwo.org; spf=pass smtp.mailfrom=gentwo.org; dkim=pass (1024-bit key) header.d=gentwo.org header.i=@gentwo.org header.b=BI53CnhK; arc=none smtp.client-ip=62.72.0.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=gentwo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentwo.org 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> 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; format=flowed 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.