Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5643442pxb; Mon, 28 Mar 2022 15:24:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRUdU05S30g4tUHMPOgbviBeV/6QHw8inioKiF8bkA0nxygUlDR1Guk06AbTip5JQGBJps X-Received: by 2002:a54:450e:0:b0:2ef:3c3f:f61d with SMTP id l14-20020a54450e000000b002ef3c3ff61dmr712852oil.99.1648506276174; Mon, 28 Mar 2022 15:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648506276; cv=none; d=google.com; s=arc-20160816; b=HtCXywxUDKXrSe3JHRZdcRrqdwCu8VPhUzj5OV4ATxZrMKrRCTGf78kOr/gd58jjHT buHYtHze2uzleBnX490XQSeWQPzgCxxo5ZjDIZhs2OOby2CqqkSSu78LzWL9duf53067 yRBpdauOjYolj2M4cpxVE/62Y8l9bSVxOM2JLoxiNZLWV6CCQHqYmDXzIkJv28HzgfM6 Fd6h/82C8WkagOZNo0GYieIgSHPMVNwXjjHcLacBfH8TNyKsI0+kEhkbezk27RDWdIod X99+skQdb1RCnF3PiM22PIZyKbZpwYnOZtNLENNTcWLNP0KJjYIlSlLde25oSm5qHi3t xk8g== 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:date; bh=ppo3K2zHpRF3W6NpPqZPR6rC1ZfkM9Z1fhlwlWEwO9A=; b=oT/XEz2lml9v8xk35oYt//4WlzfvrKMZiPlkL3jXu1RW7DVp+1H64rQN1bFaJRPc+c VlbwdZv2C9s8zdl9SoNZBU8ayhwTKod78ys/YJvfv53aBjmoSgowOCdUFFg8XpdqK3jj y0qbqRo5+78kieVwG26fb+W/9iyLd85q5S/yXTWN5ps3vItzuVA0eyFLUOv0nD9OnitJ Wzs2O7UjsAVPU7/qjLY9AAlYINxd1bJb8Kq+ba9PoqhIPFHMYrlmqBkJNFPVcBrIaYR1 LM3n449LmXWFItqBBXBp8rioatNRRlTvZBlxPUsr2vQfe4Gn+FwD0e0mHYeX7Q5Eq5gM l0vw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p26-20020a0568301d5a00b005cb2fc138b6si10762696oth.306.2022.03.28.15.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:24:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5540A1B53B3; Mon, 28 Mar 2022 14:40:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239234AbiC1IRd (ORCPT + 99 others); Mon, 28 Mar 2022 04:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239229AbiC1IRa (ORCPT ); Mon, 28 Mar 2022 04:17:30 -0400 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 78CEF2FFD1; Mon, 28 Mar 2022 01:15:45 -0700 (PDT) Received: from netfilter.org (unknown [78.30.32.163]) by mail.netfilter.org (Postfix) with ESMTPSA id 070E963004; Mon, 28 Mar 2022 10:12:36 +0200 (CEST) Date: Mon, 28 Mar 2022 10:15:40 +0200 From: Pablo Neira Ayuso To: Vasily Averin Cc: Florian Westphal , Jozsef Kadlecsik , linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, kernel@openvz.org Subject: Re: [PATCH v2 RESEND] memcg: enable accounting for nft objects Message-ID: References: <20220228122429.GC26547@breakpoint.cc> <47f5c00f-86e8-98b5-0cff-3b9fcadb590c@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <47f5c00f-86e8-98b5-0cff-3b9fcadb590c@linux.dev> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Mar 24, 2022 at 09:05:50PM +0300, Vasily Averin wrote: > nftables replaces iptables, but it lacks memcg accounting. > > This patch account most of the memory allocation associated with nft > and should protect the host from misusing nft inside a memcg restricted > container. Applied to nf, thanks I think nft_*.c files whose NFT_EXPR_STATEFUL flag is set on need to use this _ACCOUNT flag variant for objects that are dinamically allocated from the packet path.