The agreement impacts potentially millions of permanent residents in Canada and even more in the U.S.