Outright going out of your way to murder entire groups of people is not okay, regardless of circumstance.
"He who fights with monsters should look to it that he himself does not become a monster. For if you gaze long into an abyss, the abyss also gazes unto you."