China passed a law restricting exports of controlled items, allowing the government to act against countries that abuse export controls in a way that harm's China's interests, state media said.