bpf: Do write access check for kfunc and global func