Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp598646ybm; Wed, 27 May 2020 03:24:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKISX2LOBwaoEX/awbgBmw7DWWxfhFB5s8qF4JfMYR6K1ct8nTFTpdOakxgpFf78x4XynV X-Received: by 2002:a17:906:509:: with SMTP id j9mr3626817eja.341.1590575085552; Wed, 27 May 2020 03:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590575085; cv=none; d=google.com; s=arc-20160816; b=yi2ocTS63szurl9k95zFovfz/L/zqMgKErUpUUDSVq5mBffCUbO6uZYr0aVKGbbRa+ gCqjV2T/+miZgj4oCBWzxxONMmZLjcn775now/f7QkKo123GD+VPQ41FeXmzI/YR7e2C TIXxiDP5HrpTn3lDmLDlvtqjZWDopbn2qU6py4wP0iMv4GpIdCO9rQLUjW6pygALGIvQ Ms4mGP9ZawfgnhsJp0hkRPS0MMtBl2nxrSXh2Hfu9lEb1V2USqPCXLDGprAZ/fSLDv4y kchMrMYHyoiBVn8cLX2eRnR/pPd+dR3uVtKx4xw1YNJcFaclF/dlpkTE4vkyl2/M6y/Q +pBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XC2Shs5lNCGSRyWc4oHtMietNdOJX+rOUehgxOJwmi0=; b=AhW+7Tu21z7br7WHGoSZXitnJIg8B6S7yBrr3YGJScnLjd5pkeuYla0r5cNegNlyp4 L0AzBdTsHwZSgS9HttcV5uX49Dj0Uipmb9eGyWavyFA0vJil2lmtLE2T/xAYfe7JJZRY P5ADkz4Rg5k+j36IO1uCk3AgeYP1JUbzKREZcws/xvovyW3WjAXeJpD/07Kjy1Gxk7Rw 3VTrbNcKhu2aW1y1IY+sGaUFjJMupNqwZ/PTp2Vt91rU6b94fszju82b/damt/FPxeoG wff4nko+bTiJNg1oZoJZ7pp9Hh3eG4hCv4LQehUeGDuWTjRKvqNnemsh0DFv0/Um+4CH Bw9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ka1XYDa8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p1si1246704edb.406.2020.05.27.03.24.22; Wed, 27 May 2020 03:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ka1XYDa8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727770AbgE0FIb (ORCPT + 99 others); Wed, 27 May 2020 01:08:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbgE0FIa (ORCPT ); Wed, 27 May 2020 01:08:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B56DFC061A0F; Tue, 26 May 2020 22:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XC2Shs5lNCGSRyWc4oHtMietNdOJX+rOUehgxOJwmi0=; b=ka1XYDa8ifbdK426quZ1uqtWdj Zi6vV97cDDIL4upmEch9K8LFoJFKV5fINg4EjpgJK0nqDSxSMk1q2rQtAwwC1uQIbiEzqnDI1z9Cn qEFFnSP4My9HuxZ90+W9+Q5V2Ri5QzD6F9qSMSRE/UM5R1zqo4L7vgQvNEHf1XIc6MAcpysCeMmmN agyuFe2MwhAFEbJx8U3BoE95NXZp/zvGVtGl1XPcjTZsfPtghEzMBhWgW+AcUXfATsY8Fu8NKiFh5 WU+KGw6JXidH38HMCImS3JbCxELvaKn/gwaFvoUHEs1G6en5TmZBTSHrHa+RPIgF6QgjFyggFuB4g FKtMtTfw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdoIh-0008P7-UA; Wed, 27 May 2020 05:08:23 +0000 Date: Tue, 26 May 2020 22:08:23 -0700 From: Christoph Hellwig To: KP Singh Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , James Morris , Alexander Viro , Martin KaFai Lau , Florent Revest Subject: Re: [PATCH bpf-next 2/4] bpf: Implement bpf_local_storage for inodes Message-ID: <20200527050823.GA31860@infradead.org> References: <20200526163336.63653-1-kpsingh@chromium.org> <20200526163336.63653-3-kpsingh@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526163336.63653-3-kpsingh@chromium.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 06:33:34PM +0200, KP Singh wrote: > From: KP Singh > > Similar to bpf_local_storage for sockets, add local storage for inodes. > The life-cycle of storage is managed with the life-cycle of the inode. > i.e. the storage is destroyed along with the owning inode. > > Since, the intention is to use this in LSM programs, the destruction is > done after security_inode_free in __destroy_inode. NAK onbloating the inode structure. Please find an out of line way to store your information.