security: add LSM task_post_alloc hook to copy_process

Add an LSM hook called after a task is allocated. The original
task_alloc hook is too early get all needed information to identify the
new task and its parent.

BUG=b:148390640
TEST=Ran all internal testing.
SOURCE=KTD

Signed-off-by: Peter Martincic <martincic@chromium.org>
Change-Id: I5a893eb650191721d99397647f41c6ecc3b80eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/lakitu-kernel/+/2062508
Commit-Queue: Thomas Garnier <thgarnie@chromium.org>
Commit-Queue: Vaibhav Rustagi <vaibhavrustagi@google.com>
Reviewed-by: Thomas Garnier <thgarnie@chromium.org>
Reviewed-by: Peter Martincic <martincic@google.com>
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
4 files changed