GM can void your warranty (such as new car, power train and emissions) if they discover it - but only for portions of the vehicle that the DFM module affects (such as your engine, electronics affecting the engine, etc.).
GM has sophisticated systems to detect the DFM module modification.
Some will argue that GM “has to prove the module caused a problem”. No they don’t. They simply have to detect the installed module and then deny your warranty coverage - which is placed in their nationwide computer system for any dealer to see. You must then fight the denial, which may involve going to court.
I would never chance it.