Project import generated by Copybara.
GitOrigin-RevId: 0acb173e07e155358594d3ce7b5f19e91bb9fec3
diff --git a/include/linux/security.h b/include/linux/security.h
index bc3f183..df90399 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -118,12 +118,10 @@ enum lockdown_reason {
LOCKDOWN_MMIOTRACE,
LOCKDOWN_DEBUGFS,
LOCKDOWN_XMON_WR,
- LOCKDOWN_DBG_WRITE_KERNEL,
LOCKDOWN_INTEGRITY_MAX,
LOCKDOWN_KCORE,
LOCKDOWN_KPROBES,
LOCKDOWN_BPF_READ,
- LOCKDOWN_DBG_READ_KERNEL,
LOCKDOWN_PERF,
LOCKDOWN_TRACEFS,
LOCKDOWN_XMON_RW,
@@ -251,13 +249,13 @@ extern int security_init(void);
extern int early_security_init(void);
/* Security operations */
-int security_binder_set_context_mgr(const struct cred *mgr);
-int security_binder_transaction(const struct cred *from,
- const struct cred *to);
-int security_binder_transfer_binder(const struct cred *from,
- const struct cred *to);
-int security_binder_transfer_file(const struct cred *from,
- const struct cred *to, struct file *file);
+int security_binder_set_context_mgr(struct task_struct *mgr);
+int security_binder_transaction(struct task_struct *from,
+ struct task_struct *to);
+int security_binder_transfer_binder(struct task_struct *from,
+ struct task_struct *to);
+int security_binder_transfer_file(struct task_struct *from,
+ struct task_struct *to, struct file *file);
int security_ptrace_access_check(struct task_struct *child, unsigned int mode);
int security_ptrace_traceme(struct task_struct *parent);
int security_capget(struct task_struct *target,
@@ -313,19 +311,13 @@ int security_dentry_create_files_as(struct dentry *dentry, int mode,
struct qstr *name,
const struct cred *old,
struct cred *new);
-#ifndef CONFIG_AMLOGIC_ANDROIDP
int security_path_notify(const struct path *path, u64 mask,
- unsigned int obj_type);
-#endif
-
+ unsigned int obj_type);
int security_inode_alloc(struct inode *inode);
void security_inode_free(struct inode *inode);
int security_inode_init_security(struct inode *inode, struct inode *dir,
const struct qstr *qstr,
initxattrs initxattrs, void *fs_data);
-int security_inode_init_security_anon(struct inode *inode,
- const struct qstr *name,
- const struct inode *context_inode);
int security_old_inode_init_security(struct inode *inode, struct inode *dir,
const struct qstr *qstr, const char **name,
void **value, size_t *len);
@@ -448,7 +440,6 @@ int security_ismaclabel(const char *name);
int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen);
int security_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid);
void security_release_secctx(char *secdata, u32 seclen);
-
void security_inode_invalidate_secctx(struct inode *inode);
int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen);
int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen);
@@ -490,25 +481,25 @@ static inline int early_security_init(void)
return 0;
}
-static inline int security_binder_set_context_mgr(const struct cred *mgr)
+static inline int security_binder_set_context_mgr(struct task_struct *mgr)
{
return 0;
}
-static inline int security_binder_transaction(const struct cred *from,
- const struct cred *to)
+static inline int security_binder_transaction(struct task_struct *from,
+ struct task_struct *to)
{
return 0;
}
-static inline int security_binder_transfer_binder(const struct cred *from,
- const struct cred *to)
+static inline int security_binder_transfer_binder(struct task_struct *from,
+ struct task_struct *to)
{
return 0;
}
-static inline int security_binder_transfer_file(const struct cred *from,
- const struct cred *to,
+static inline int security_binder_transfer_file(struct task_struct *from,
+ struct task_struct *to,
struct file *file)
{
return 0;
@@ -688,13 +679,11 @@ static inline int security_move_mount(const struct path *from_path,
return 0;
}
-#ifndef CONFIG_AMLOGIC_ANDROIDP
static inline int security_path_notify(const struct path *path, u64 mask,
unsigned int obj_type)
{
return 0;
}
-#endif
static inline int security_inode_alloc(struct inode *inode)
{
@@ -731,13 +720,6 @@ static inline int security_inode_init_security(struct inode *inode,
return 0;
}
-static inline int security_inode_init_security_anon(struct inode *inode,
- const struct qstr *name,
- const struct inode *context_inode)
-{
- return 0;
-}
-
static inline int security_old_inode_init_security(struct inode *inode,
struct inode *dir,
const struct qstr *qstr,
@@ -1003,11 +985,6 @@ static inline void security_transfer_creds(struct cred *new,
{
}
-static inline void security_cred_getsecid(const struct cred *c, u32 *secid)
-{
- *secid = 0;
-}
-
static inline int security_kernel_act_as(struct cred *cred, u32 secid)
{
return 0;
@@ -1920,42 +1897,5 @@ static inline void security_bpf_prog_free(struct bpf_prog_aux *aux)
#endif /* CONFIG_SECURITY */
#endif /* CONFIG_BPF_SYSCALL */
-#ifdef CONFIG_PERF_EVENTS
-struct perf_event_attr;
-struct perf_event;
-
-#ifdef CONFIG_SECURITY
-extern int security_perf_event_open(struct perf_event_attr *attr, int type);
-extern int security_perf_event_alloc(struct perf_event *event);
-extern void security_perf_event_free(struct perf_event *event);
-extern int security_perf_event_read(struct perf_event *event);
-extern int security_perf_event_write(struct perf_event *event);
-#else
-static inline int security_perf_event_open(struct perf_event_attr *attr,
- int type)
-{
- return 0;
-}
-
-static inline int security_perf_event_alloc(struct perf_event *event)
-{
- return 0;
-}
-
-static inline void security_perf_event_free(struct perf_event *event)
-{
-}
-
-static inline int security_perf_event_read(struct perf_event *event)
-{
- return 0;
-}
-
-static inline int security_perf_event_write(struct perf_event *event)
-{
- return 0;
-}
-#endif /* CONFIG_SECURITY */
-#endif /* CONFIG_PERF_EVENTS */
-
#endif /* ! __LINUX_SECURITY_H */
+