linux_dsm_epyc7002/drivers/android
Christian Brauner e98e6fa186 binderfs: prevent renaming the control dentry
- make binderfs control dentry immutable:
  We don't allow to unlink it since it is crucial for binderfs to be
  useable but if we allow to rename it we make the unlink trivial to
  bypass. So prevent renaming too and simply treat the control dentry as
  immutable.

- add is_binderfs_control_device() helper:
  Take the opportunity and turn the check for the control dentry into a
  separate helper is_binderfs_control_device() since it's now used in two
  places.

- simplify binderfs_rename():
  Instead of hand-rolling our custom version of simple_rename() just dumb
  the whole function down to first check whether we're trying to rename the
  control dentry. If we do EPERM the caller and if not call simple_rename().

Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-22 12:25:53 +01:00
..
binder_alloc_selftest.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_alloc.c Merge 4.20-rc5 into char-misc-next 2018-12-03 07:56:15 +01:00
binder_alloc.h binder: fix kerneldoc header for struct binder_buffer 2018-12-06 15:44:14 +01:00
binder_internal.h binder: implement binderfs 2018-12-19 09:40:13 +01:00
binder_trace.h binder: use standard functions to allocate fds 2018-09-14 15:22:36 +02:00
binder.c binder: implement binderfs 2018-12-19 09:40:13 +01:00
binderfs.c binderfs: prevent renaming the control dentry 2019-01-22 12:25:53 +01:00
Kconfig binder: implement binderfs 2018-12-19 09:40:13 +01:00
Makefile binder: implement binderfs 2018-12-19 09:40:13 +01:00