Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp14504imm; Fri, 21 Sep 2018 09:32:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaH/ewmFu4F9oGEgzop6To40Gn3oaSjzDoHoEyXq9r3FrlRn9dIs1mxoHV3EYHh8zi2PTFE X-Received: by 2002:a17:902:a987:: with SMTP id bh7-v6mr45933019plb.182.1537547537391; Fri, 21 Sep 2018 09:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537547537; cv=none; d=google.com; s=arc-20160816; b=OGs6eUhTLenX0ylQNGxiZwu398jWQTLpBBIfn8EKmz11bBXoVkb6iOYAEhpM8Myljp RXdGBzLSXEIkhWNNmaTIoKZDbuN5mmCw2mVatAazkPQoKhBtOafSZSU08If9tPzx3b9d Eud5yByD8RZhYt+MaZFcExFlgmnrwbNfKZjr+TtiQQFNaHMuXQJjNuSI/JGOZZZpNU7D H4rC0XzBTzZ72KmulEtfSBLcfD+qjNu4+WhsjWhOrGmESSwzyXf4/L4lvHPMGFBGOiHf J70Ar72JIEpoX2GMN4VQmZCc6/4UAabtGNzxbHRR49E/DUWySO9pswJ5CzNndPXrGwUq BaYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization; bh=2K3yRivYLBGCILqw1K3WExLARvjr+1zBWexIqF+Poas=; b=DIgiG03pSgBLChsRmdpdOCj538b0Ph75Su+IzPyFEF8e/mhRbCpFuILDkXvnXV2oa/ BJgDHLsQIBAtddt0ZgdhnMsnxRHj3k2pAYNj8ic9SjK7NqPPKKzZU3XoY1bh3arROUGt I77bJrvoO+pf3frJjQHWgjWXYtChZqizgSaiY+Aoy3NHd9F/SA9TXRTXJPN8FDMIsYaC 0HWvl7KF+jxJDIH8JhMU/+XFs2XuLVe0g7vD1JY9WTyh3uHXt2R7QlN0hx9ek3Dw8rER eSH4x8itCP50VACi9vZyIoMH39yRK06cswg/TBzzkliN9/p9Itk+F2Ahmgu5QN0sqqJ/ 00rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si27773847pgh.451.2018.09.21.09.32.00; Fri, 21 Sep 2018 09:32:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390893AbeIUWVB (ORCPT + 99 others); Fri, 21 Sep 2018 18:21:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390381AbeIUWVA (ORCPT ); Fri, 21 Sep 2018 18:21:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7D65C049D57; Fri, 21 Sep 2018 16:31:22 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E2BB8208B; Fri, 21 Sep 2018 16:31:21 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 09/34] vfs: Put security flags into the fs_context struct [ver #12] From: David Howells To: viro@zeniv.linux.org.uk Cc: torvalds@linux-foundation.org, dhowells@redhat.com, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mszeredi@redhat.com Date: Fri, 21 Sep 2018 17:31:20 +0100 Message-ID: <153754748062.17872.4161729886420137521.stgit@warthog.procyon.org.uk> In-Reply-To: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> References: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 21 Sep 2018 16:31:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Put security flags, such as SECURITY_LSM_NATIVE_LABELS, into the filesystem context so that the filesystem can communicate them to the LSM more easily. Signed-off-by: David Howells --- include/linux/fs_context.h | 1 + include/linux/security.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h index 4b7327852b7f..83c40d30868e 100644 --- a/include/linux/fs_context.h +++ b/include/linux/fs_context.h @@ -89,6 +89,7 @@ struct fs_context { void *s_fs_info; /* Proposed s_fs_info */ unsigned int sb_flags; /* Proposed superblock flags (SB_*) */ unsigned int sb_flags_mask; /* Superblock flags that were changed */ + unsigned int lsm_flags; /* Information flags from the fs to the LSM */ enum fs_context_purpose purpose:8; bool sloppy:1; /* T if unrecognised options are okay */ bool silent:1; /* T if "o silent" specified */ diff --git a/include/linux/security.h b/include/linux/security.h index 636215bf4c1b..bae191a96c73 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -61,7 +61,7 @@ enum fs_value_type; #define SECURITY_CAP_NOAUDIT 0 #define SECURITY_CAP_AUDIT 1 -/* LSM Agnostic defines for sb_set_mnt_opts */ +/* LSM Agnostic defines for fs_context::lsm_flags */ #define SECURITY_LSM_NATIVE_LABELS 1 struct ctl_table;