This is a discussion on [PATCH 03/24] CRED: Alter security_task_getsecid() and similar to return both task SIDs - Kernel ; Alter security_task_getsecid(), selinux_get_task_sid() and associated functions
to return both the objective/victim and subjective/action task SIDs. Both
results are optional by submitting NULL result pointers.
Interestingly, AF_NETLINK calls directly into SELinux. I suspect this to be
incorrect. It should probably use ...

[PATCH 03/24] CRED: Alter security_task_getsecid() and similar to return both task SIDs

Alter security_task_getsecid(), selinux_get_task_sid() and associated functions
to return both the objective/victim and subjective/action task SIDs. Both
results are optional by submitting NULL result pointers.

Interestingly, AF_NETLINK calls directly into SELinux. I suspect this to be
incorrect. It should probably use security_task_getsecid() instead.