From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CC410352032 for ; Fri, 22 May 2026 06:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779432226; cv=none; b=UmwHvIZSjP7pGr4zLQtemT5z/uJ8fXS7i9d69qRdP8ek5H8nK8UNI4DTU2wIFREo02lWddElDr3Eeik2gPSHJuRODK7IAp0TJaz2CTzzMRRY/dmlwofP7pHNIz64gysrV3/F2xWv2iKWvk6IXDX0Pzm64Z59u2bSe24r1QUiGLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779432226; c=relaxed/simple; bh=R80/AWzdliy6mRF8L/zp6I2Gn6uovO7le4AmAU8Nxkk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e4vti9Dplwmt4G/bJTLue96/JZ3SWSOst4XVWEwVkRqJMkEoB6WI3flq+ythnY4CZBg2kc23qXr6axTPsTPyQ2HODUea/z6gCyckrbuM8Wks/no9ztx9bCPl9UYXD4WdrqI4Mzz8+L64e/ZAWkATSBksie9ULWH0bpv5ap/SfZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RcvsNjb1; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RcvsNjb1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E3E01F000E9; Fri, 22 May 2026 06:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779432225; bh=biF+ouRtY89p1pL4sTu4taHmkX2yen+lW/Wuq/AnoKM=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=RcvsNjb15fzr+4Z7dHAxMo1Iia90big6KI/HwskLZRrlIC2H8APnZX+0Rc/31+AX4 fuDot/glB+tpt5/lZbVvRKtzyZVXSVd1dQdpwTjMdGTxgQOd+4wF1xS3csCSMKl9QZ Gql3rJbibgLp91tXTkObSdPiicc093EzscwOlccZgLUT8svKdA0bvJijdT5jyw9lpR g5TyDqhH+MxoPmaibC/g7GGPOh4R83M96M8B6e2ldMObGd/1//iX81IJ7kHmV05IRe 8gHNGEHIOEu90cyrkPqmBoag3TzPAZmLqS9q5kujy67K8zYDKX+r6dJhLdyNcaqTcv RtLS3td7q8YzQ== Message-ID: <093abd25-939a-4f67-9049-24206aab1c3f@kernel.org> Date: Fri, 22 May 2026 08:43:42 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH] ipc/msg: Use dedicated slab buckets for msg_msgseg To: Philipp Weber , akpm@linux-foundation.org Cc: kees@kernel.org, brauner@kernel.org, jack@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20260518182636.58134-1-kernel@phwe.de> From: "Vlastimil Babka (SUSE)" Content-Language: en-US In-Reply-To: <20260518182636.58134-1-kernel@phwe.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/18/26 20:26, Philipp Weber wrote: > System V message queues already allocate struct msg_msg from dedicated > kmem buckets, so user-controlled variable-sized message allocations do > not share generic kmalloc buckets. > > Large messages allocate additional struct msg_msgseg objects for the > remaining payload. These allocations are also user-controlled in size > and contents, but still come from generic kmalloc-cg buckets. > > Allocate msg_msgseg objects from a dedicated bucket set as well, so the > segmented payload path follows the same heap-isolation model as the > main msg_msg allocation. > > The free path remains unchanged because these allocations are freed > with kfree(), matching the existing msg_msg bucket allocation. > > Signed-off-by: Philipp Weber Acked-by: Vlastimil Babka (SUSE)