Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1637530iol; Fri, 10 Jun 2022 11:28:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSIbt7O6tHgK39uILR50UK31LI/WJJ04QvTnu68hf3lz1qaT1A6D8OtT2jfrheG/pDOS2O X-Received: by 2002:aa7:c34d:0:b0:42d:ce57:5df2 with SMTP id j13-20020aa7c34d000000b0042dce575df2mr52181340edr.315.1654885714335; Fri, 10 Jun 2022 11:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654885714; cv=none; d=google.com; s=arc-20160816; b=MdpVJ/07VohItwPr3J19WapJO1HmqZi2YCooB3W32iya47N+SXzHrBF95G548qCMzD wssuG7J0UhkquE86gGfSdIrqIq8w6mNWPUncAljSVDFvelHnIYJkxsjmFRGgw3x1k5yi VWd7h4UWMJgsLy1I7volBOhVIdv8IHqATuu5tOXPKKaBksPNOAZrdQra2xOiNLR2QFmz Hi9Rda7FyemdtXRCcJFo5wwomLjNVgxtlr7918CI1N7l8hM2HBKyN2q1hUKjFDUQ2IA5 t6IrDoDPGiG22BjcCuC0cTEpZ1uR7Y7DkffmwO5d+NZhXr9DStDryvgpRDDOM3JKg1p5 +Vyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=qAyA4nVQ3p7uKrJGV4R46+Hc3Djv7YaeqsyLHwIro7A=; b=xCoIj614rCuFj8nEhaKmW5IBxm9n9GxUJaXyCNtZBUgWSUxTnlvjbuCrnIVxfrfMsv JO1qPjK7z+2A339K7Ch1CZV1+bhxbnLj1I/MOf9OGdXlD+TvcO/hifMgsWkVmqRvxZW8 fARFo5Z0WE5YJyPZtKA6ene/ypglmRCwF3LAEaZkqoTBHnCiDB5m17cxJGkoiAhh/Fyr zU5u9vU/IioK4kTPFyeJjurOKOcAX9XH+DA6uujftHAwG+R30xPhRJn/g9Qei7ria9cb lDn1VsDHnFjCr1o6Y3GTNKK52FS1RDBXJRSagnFeImP0sCqGTJzaDt15tIqNh56vkEhd qf6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KVgqw1Q+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s28-20020a170906779c00b007122faebbdasi1608431ejm.494.2022.06.10.11.28.07; Fri, 10 Jun 2022 11:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KVgqw1Q+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349933AbiFJSKb (ORCPT + 99 others); Fri, 10 Jun 2022 14:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244325AbiFJSK3 (ORCPT ); Fri, 10 Jun 2022 14:10:29 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDAB03AA44 for ; Fri, 10 Jun 2022 11:10:26 -0700 (PDT) Date: Fri, 10 Jun 2022 11:10:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1654884625; h=from:from:reply-to:subject:subject: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=qAyA4nVQ3p7uKrJGV4R46+Hc3Djv7YaeqsyLHwIro7A=; b=KVgqw1Q+X/yrYv/cdlwmVUcIKnY1kS/vhacw80yfaU1AE9UERt6GHhn6f652u3AvkkY2TR 8XPPmFXB6bYilGEhZtMRp5bFYd4rrxA+lbifusIkpkQ71WRdNgvRrAPwTOjOtop7oiNxO0 xBhs5G5qlf9+f3pgpv2n8trr2XjF6ws= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Naresh Kamboju , Vasily Averin , Qian Cai , Kefeng Wang , Linux Kernel Functional Testing , Shakeel Butt Subject: Re: [PATCH] mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe Message-ID: References: <20220610180310.1725111-1-roman.gushchin@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220610180310.1725111-1-roman.gushchin@linux.dev> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2022 at 11:03:10AM -0700, Roman Gushchin wrote: > Currently mem_cgroup_from_obj() is not working properly with objects > allocated using vmalloc(). It creates problems in some cases, when > it's called for static objects belonging to modules or generally > allocated using vmalloc(). > > This patch makes mem_cgroup_from_obj() safe to be called on objects > allocated using vmalloc(). > > It also introduces mem_cgroup_from_slab_obj(), which is a faster > version to use in places when we know the object is either a slab > object or a generic slab page (e.g. when adding an object to a lru > list). > > Suggested-by: Kefeng Wang > Signed-off-by: Roman Gushchin > Tested-by: Linux Kernel Functional Testing > Acked-by: Shakeel Butt Andrew, this patch is supposed to fix boot issues on arm introduced by the commit "net: set proper memcg for net_init hooks allocations". But as no I don't see this commit in linux-next or any mm branches, so I'm not sure if it's in stable or not. So I didn't add the Fixes tag. If it isn't in stable yet, I'd just put the fix before the problematic commit. Thank you!