It is required for Kernel AddressSanitizer, as the shadow offset is not known at the compile time,To get shadow offset this patch uses function __asan_get_shadow_ptr. Wouldn't be more effective just to read variable instead of function call?
Depends on how much logic you want to hide there. If it's just "return something" than sure but if you need some synchronization or complex calculations, accessing global would not be enough.
-Y