[PATCH 5.5 314/367] libbpf: Extract and generalize CPU mask parsing logic