The US Senate has passed a cybersecurity bill which encourages information-sharing among firms and the government.