Received: by 2002:a05:7208:b08c:b0:82:bbfa:f723 with SMTP id c12csp418440rbb; Fri, 26 Apr 2024 08:01:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/GoHM4vjBfIwNHRhR5H7mx0xofbnV8EShMQ7if68LMUReQe9oKWU+6SfrSiXcJV6zQ3XpzZ3NrRc85WiU1jlBnJX8DXaR6rymsCX7vw== X-Google-Smtp-Source: AGHT+IHGwwAPzJvcbnfIe5ine2Ec+YLIsnwpTEYtR+BawoF8kiolFgp6634vQLw6RhzrJc+GDxwm X-Received: by 2002:a05:6a00:2409:b0:6f3:854c:dee0 with SMTP id z9-20020a056a00240900b006f3854cdee0mr3737532pfh.21.1714143678375; Fri, 26 Apr 2024 08:01:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714143678; cv=pass; d=google.com; s=arc-20160816; b=VHLsMpcbMOuiWAmakjWoV3VLh+VFo+0BnMP3YVybwtrIA02pb83y7SI74WXYUijNuq 3BEM/XWzbbYB16JpVfRynQzqyqpFD73g801fNVYqDAkEANVswkQyahRvPhjCM6+5L3EH H8ty0eRhPtojs1GBWV1sVAxyTwQVqjotglqvvGnsb8wihFm6nVLZlj5Plvs4ZLAwkkFA bHmYAcQzWIcTkgAqEPS/ToSwv2XVxl7OLWCeoiP31NuTmtuGyYkW2vUaliVnXsUEEmhR 1DRiP8gIp7aFk+rjXrW0ll4qhcqspWkELlWLe/DOddWkLBQN+OOJ5nIChUr91IAA0mAy gHww== 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; bh=hynjTkENm2DySgIcF9ajnI9XKLg30GKuurwRdYjoM9Q=; fh=ybWeIib6IemaM0AJquDGgHsHDI27HmmVd0MFUs3Jim0=; b=nbRROXrjXDjLLyiy3QBDxFZGwiHybxLo+SjKa2XULrZnOLo3o7AAUIfu42ipOEFZcX gJJNI1GYzD4yoNPl3WRKBjrpFqrJ4oZ0dMDeMY6QVOtapOCVF3sueQaFpGuuMnCbpyN0 wX1AOXLnEixYbvO3OBo3kcun2kj1tRlfclACz33FXLV5qWSZ3BMy1hdf4cpbRWYCLbfZ lMfz02x3wpD0jpLuwBffmKDhNZXAvqQaX5H8maVysCw5vMnpUQKpaBn0hQJIyB+pCrPN sLD+rSvO4wnJ0zgul8spd6DYeeo0+5wwpwZ+9ws6FrNLdfwO0FIbZ+62XSjxWDPFHQM4 gBSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-160193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q5-20020a056a00084500b006ed4aba60a6si15373099pfk.2.2024.04.26.08.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:01:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-160193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C2C86B253FF for ; Fri, 26 Apr 2024 14:52:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12099148841; Fri, 26 Apr 2024 14:52:31 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8867B13F43A; Fri, 26 Apr 2024 14:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714143150; cv=none; b=XxUjZMokLmiS5OR0SdIxsGKfxKV/3lHFcr4m00JRAoF4aE93LhyqMI9p4Mui9cfrzvB6iVZvn0ge4NkBEXnj8szoDFwSvlhOIlFneZJUglKQ7warqDB4Xh1ZCKFPVTTESHici6xt9Ii17OEq31EhbFbGdNf+7Y9iWT848TDAWGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714143150; c=relaxed/simple; bh=vm7uE0ygsHjc1lkXNtHN0seN3qvRdYiwxzxP9waGNUI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DD8pEWQyDJz9hOEgUdNRxWVn8y1C7SipSG7nxD+W4gchSO4Jbk5Txu0kHa7lUmdoFFwb3k2K408kqYVBYOMBt8cHaNHFQ5VSg0lhae61FTrZlGWbUBI0ApCgbh9ajrCNAHLEqWb+Msz8SfFx/+dYtSbvdBL2Mwowhb8Nh9CPNp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1989DC113CD; Fri, 26 Apr 2024 14:52:26 +0000 (UTC) Date: Fri, 26 Apr 2024 15:52:24 +0100 From: Catalin Marinas To: Kees Cook Cc: Suren Baghdasaryan , Kent Overstreet , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak Message-ID: References: <20240425205516.work.220-kees@kernel.org> 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: <20240425205516.work.220-kees@kernel.org> On Thu, Apr 25, 2024 at 01:55:23PM -0700, Kees Cook wrote: > The system will immediate fill up stack and crash when both > CONFIG_DEBUG_KMEMLEAK and CONFIG_MEM_ALLOC_PROFILING are enabled. > Avoid allocation tagging of kmemleak caches, otherwise recursive > allocation tracking occurs. > > Fixes: 279bb991b4d9 ("mm/slab: add allocation accounting into slab allocation and free paths") > Signed-off-by: Kees Cook For the kmemleak bits: Acked-by: Catalin Marinas