scs: Move accounting into alloc/free functions
authorWill Deacon <will@kernel.org>
Fri, 15 May 2020 13:43:11 +0000 (14:43 +0100)
committerWill Deacon <will@kernel.org>
Mon, 18 May 2020 16:47:33 +0000 (17:47 +0100)
commitbee348fab099b0f551caa874663e82a7f3bb64b3
treedb1a964bc311bc58ad1f6ad54831825977ce80c8
parent51189c7a7ed1b4ed4493e27275d466ff60406d3a
scs: Move accounting into alloc/free functions

There's no need to perform the shadow stack page accounting independently
of the lifetime of the underlying allocation, so call the accounting code
from the {alloc,free}() functions and simplify the code in the process.

Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
kernel/scs.c