Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5464647pxb; Wed, 26 Jan 2022 12:37:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaq0Hyv1jNBI2Au18Rf9ST4E+5v8AtYXMT9hhk7F1d/sE6yfbhzkQ18uSRMC6OoQJGw80a X-Received: by 2002:a05:6a00:16c2:: with SMTP id l2mr173045pfc.3.1643229421600; Wed, 26 Jan 2022 12:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643229421; cv=none; d=google.com; s=arc-20160816; b=hOaB1Ta6a5mbJRKgGzcCEPzwnmZZ5QWoVJWP1SJwPzhVOAtOjmTouTvruv2pb+pbdi ZQzfSj1+AAIePIEG1zp8UmJHGoidWBKHP2o68BSmt0XOWv2Mm+T4VYXFOMSd+l4gt06w s4sDWPYSGx9xVGCa6VbNcavHLh5F2hrXQZ3ML5OKsbmlKUWrel1TZNnUP91xNIAUOUk9 G7Sufwr2YBsHssYlddWKSHDqtspDJliED8xTMWt462Stq9OuaV30ZOZ0v+R4KRaSdSQo IOVFCfZh66gB0kmuPbweO6R+viqdCG/oSP+yWPKvyAjOC403ECaAiCoNAs59NRFQxNOW kqAg== 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:dkim-signature; bh=4unz1ijUTW/csBsujXMBU4eEy88TbqnlJQ1KFXmJZeI=; b=B7zxthDGZIqJKkZZTenkOtBROeGZWfBflsKd05ALKYW0xaC2rZZoN9XhxVc5khTyGJ wCDyjmgUKRvMdQ5drdLnO83OZrORvMf+ihfzjUb/2xUnQlKW/Km/ZTP/X18ek6PHZBcJ a43xPxTKkgB2ZCW2vd7iXN/TzgiNO4xzRBRJQolETu0Q2yBXDrrwI/zDAuH2TxNmuGOt y5PrGj1yIUCRZkA9DMTx4zZykVQhG1naJSoYRDEDtjmBQA68Rfmy33oqvHzO2OcWlzFC jNL+wFCz7OunaufZ5nKBXfa3PePBWuiWAc7GYIN3Pw6Cur5FtokyPKBXk2CAgYiZ6nVH 4jjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fz3RmuSX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si279985pga.45.2022.01.26.12.36.48; Wed, 26 Jan 2022 12:37:01 -0800 (PST) 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=pass header.i=@kernel.org header.s=k20201202 header.b=fz3RmuSX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238548AbiAZIra (ORCPT + 99 others); Wed, 26 Jan 2022 03:47:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbiAZIr3 (ORCPT ); Wed, 26 Jan 2022 03:47:29 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106DDC06161C; Wed, 26 Jan 2022 00:47:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 807C760A51; Wed, 26 Jan 2022 08:47:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8114C340E3; Wed, 26 Jan 2022 08:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643186847; bh=fYjYvin/ncOZkgLTguVdtStT4rh5GTFzqtSVTzTJ5zc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fz3RmuSXApVcPfd2W5IX7BNuEBYQ4d/CA4tiX/LmenrLmCpArMF2qcdlYLQqGghN4 kcz87olbwJ69uqNx2KuvfDqsGLid6phMh1y7QQ6ZDZkna1T3qDXoi3B54/PL4HxhAk qjJsJKbt74o7ckNIdM5WXtP8wLuxGZmlqPPeZxACkgBgoxnPLDQBDsYvZlNZCeEMYg r72iPq8g4MXzgih9XPna4tWSThd95NHiJg2TUilTWFMRaid5MshhbHKH9ve+Zx7u3i PhGYuWoPHAEXHVLJnnqfliypniJ+DOQbrG9blbksF7BIhGznT10Mb5v+/tRN/MW5b7 Yn5BnOWWVQrcA== Date: Wed, 26 Jan 2022 09:47:15 +0100 From: Christian Brauner To: Stefan Berger Cc: linux-integrity@vger.kernel.org, zohar@linux.ibm.com, serge@hallyn.com, christian.brauner@ubuntu.com, containers@lists.linux.dev, dmitry.kasatkin@gmail.com, ebiederm@xmission.com, krzysztof.struczynski@huawei.com, roberto.sassu@huawei.com, mpeters@redhat.com, lhinds@redhat.com, lsturman@redhat.com, puiterwi@redhat.com, jejb@linux.ibm.com, jamjoom@us.ibm.com, linux-kernel@vger.kernel.org, paul@paul-moore.com, rgb@redhat.com, linux-security-module@vger.kernel.org, jmorris@namei.org, Stefan Berger Subject: Re: [PATCH v9 05/23] ima: Define ima_namespace struct and start moving variables into it Message-ID: <20220126084715.b2wtmlbzoaqtipbp@wittgenstein> References: <20220125224645.79319-1-stefanb@linux.vnet.ibm.com> <20220125224645.79319-6-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220125224645.79319-6-stefanb@linux.vnet.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 05:46:27PM -0500, Stefan Berger wrote: > From: Stefan Berger > > Define the ima_namespace structure and the ima_namespace variable > init_ima_ns for the host's IMA namespace. Implement basic functions for > namespacing support. > > Move variables related to the IMA policy into the ima_namespace. This way > the IMA policy of an IMA namespace can be set and displayed using a > front-end like securityfs. > > Implement ima_ns_from_file() to get the IMA namespace via the user > namespace of the securityfs superblock that a file belongs to. > > To get the current ima_namespace use &init_ima_ns when a function > that is related to a policy rule is called. > > Signed-off-by: Stefan Berger > > --- For the approach of introducing struct ima_namespace and moving a bunch of variables in there at the same time to prepare subsequent further namespacing: Acked-by: Christian Brauner I can't speak to the actual ima changes.