[PATCH] apparmor: Adjust offset when accessing task blob.

Tetsuo Handa penguin-kernel at i-love.sakura.ne.jp
Mon Jan 21 01:25:10 UTC 2019


AppArmor will no longer be the only user of task blob
after TOMOYO started using task blob.

Signed-off-by: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
---
 security/apparmor/include/task.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/include/task.h b/security/apparmor/include/task.h
index 039c1e6..311e652 100644
--- a/security/apparmor/include/task.h
+++ b/security/apparmor/include/task.h
@@ -16,7 +16,7 @@
 
 static inline struct aa_task_ctx *task_ctx(struct task_struct *task)
 {
-	return task->security;
+	return task->security + apparmor_blob_sizes.lbs_task;
 }
 
 /*
-- 
1.8.3.1



More information about the Linux-security-module-archive mailing list