That said, on the matter of Villainous M. . . bad bad idea. Part of the core iconic concept of James Bond is "Agent of MI6". If you use M as the villain of the story, it is *really really hard* to come back to Bond still working for MI6 after he murders his former boss ( because that is absolutely the necessary ending for such a story ). Even if you make Evil M 100% rogue and unsanctioned in their evil ( ie, it is absolutely unambiguous that the organization itself isn't the bad guy ), it would be really hard to avoid either a "Why exactly would the government trust Bond again enough to continue employing him" problem, or alternatively "Why would Bond even want to continue working there" problem. And this is assuming its a new M in a newly rebooted series, where you can sort of handwave the implicit backstory; if its *not* new, then its both much more of a swerve and also much less plausible that their influence and sanction is limited to just themselves. If you did it, the only way to make it function would be to pretty much immediately forget it ever happened the next movie. . . and if you need to memory hole a plot, it probably wasn't a plot worth doing in the first place.
Its the kind of thing that could work in a Bond *homage*, but lots of things can work in a homage that would be bad ideas to do in the actual original story.