aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2016-10-06 15:53:38 -0700
committerMister Oyster <oysterized@gmail.com>2017-09-30 15:36:12 +0200
commitb27b15551563f102db2d56cb4f716a1fae260e69 (patch)
treed86919b2f12d84b8e860c8d58e1933ae03fa91cb /include/linux
parent7694623a1eb0af6225cf3c9f8f4d1cdc27c668fc (diff)
CHROMIUM: remove Android's cgroup generic permissions checks
The implementation is utterly broken, resulting in all processes being allows to move tasks between sets (as long as they have access to the "tasks" attribute), and upstream is heading towards checking only capability anyway, so let's get rid of this code. BUG=b:31790445,chromium:647994 TEST=Boot android container, examine logcat Change-Id: I2f780a5992c34e52a8f2d0b3557fc9d490da2779 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/394967 Reviewed-by: Ricky Zhou <rickyz@chromium.org> Reviewed-by: John Stultz <john.stultz@linaro.org> (cherry picked from commit 6895149f8bf0719aa70487e285fa6a8ad3d2692d) Reviewed-on: https://chromium-review.googlesource.com/399858 Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Mister Oyster <oysterized@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cgroup.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 46f1bcdc1..bbd9b756c 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -589,7 +589,6 @@ struct cgroup_subsys {
void (*css_offline)(struct cgroup *cgrp);
void (*css_free)(struct cgroup *cgrp);
- int (*allow_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
int (*can_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
void (*cancel_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
void (*attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
@@ -882,17 +881,6 @@ unsigned short css_id(struct cgroup_subsys_state *css);
unsigned short css_depth(struct cgroup_subsys_state *css);
struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id);
-/*
- * Default Android check for whether the current process is allowed to move a
- * task across cgroups, either because CAP_SYS_NICE is set or because the uid
- * of the calling process is the same as the moved task or because we are
- * running as root.
- * Returns 0 if this is allowed, or -EACCES otherwise.
- */
-int subsys_cgroup_allow_attach(struct cgroup *cgrp,
- struct cgroup_taskset *tset);
-
-
#else /* !CONFIG_CGROUPS */
static inline int cgroup_init_early(void) { return 0; }
@@ -916,11 +904,6 @@ static inline int cgroup_attach_task_all(struct task_struct *from,
return 0;
}
-static inline int subsys_cgroup_allow_attach(struct cgroup *cgrp,
- struct cgroup_taskset *tset)
-{
- return 0;
-}
#endif /* !CONFIG_CGROUPS */
#endif /* _LINUX_CGROUP_H */