summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_rdt.h
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2018-07-01 07:17:32 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-07-03 08:38:40 +0200
commit392487def48e4b596526a4a8c2c2ec4cfe73bf13 (patch)
tree32edcad4c6ad473e2bf61b4524fac436aef45997 /arch/x86/kernel/cpu/intel_rdt.h
parentx86/intel_rdt: Fix cleanup of plr structure on error (diff)
downloadlinux-392487def48e4b596526a4a8c2c2ec4cfe73bf13.tar.xz
linux-392487def48e4b596526a4a8c2c2ec4cfe73bf13.zip
x86/intel_rdt: Support restoration of subset of permissions
As the mode of a resource group changes, the operations it can support may also change. One way in which the supported operations are managed is to modify the permissions of the files within the resource group's resctrl directory. At the moment only two possible permissions are supported: the default permissions or no permissions in support for when the operation is "locked down". It is possible where an operation on a resource group may have more possibilities. For example, if by default changes can be made to the resource group by writing to a resctrl file while the current settings can be obtained by reading from the file, then it may be possible that in another mode it is only possible to read the current settings, and not change them. Make it possible to modify some of the permissions of a resctrl file in support of a more flexible way to manage the operations on a resource group. In this preparation work the original behavior is maintained where all permissions are restored. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/8773aadfade7bcb2c48a45fa294a04d2c03bb0a1.1530421961.git.reinette.chatre@intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt.h')
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h
index 2d9cbb9d7a58..4e588f36228f 100644
--- a/arch/x86/kernel/cpu/intel_rdt.h
+++ b/arch/x86/kernel/cpu/intel_rdt.h
@@ -512,7 +512,8 @@ void rdt_ctrl_update(void *arg);
struct rdtgroup *rdtgroup_kn_lock_live(struct kernfs_node *kn);
void rdtgroup_kn_unlock(struct kernfs_node *kn);
int rdtgroup_kn_mode_restrict(struct rdtgroup *r, const char *name);
-int rdtgroup_kn_mode_restore(struct rdtgroup *r, const char *name);
+int rdtgroup_kn_mode_restore(struct rdtgroup *r, const char *name,
+ umode_t mask);
struct rdt_domain *rdt_find_domain(struct rdt_resource *r, int id,
struct list_head **pos);
ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,