Pretty much the entire problem in the USA, in a nutshell. Past generations had no trouble being very "mean" when it was needed. China, Russia, and Iran will have no problem with it, either.
Legal immigrants need to be willing and able to make a positive contribution. All that is needed is to make our laws match what other modern countries require. It would remain relatively straightforward for high-ability people to enter the country and re-impose a huge barrier for undesirables: cartel operatives, Muslims, manual laborers, 60 IQ refugees, and Marxist radicals.
There is too much LEGAL immigration PERIOD.