rosenberg: refactor match_copy_to_user()