For the M42 stuff you will
need an adapter like this. If you see that small metal pole coming out of the lens, that controls the iris. It will need to be depressed (by the adapter) to that your F-stop setting on the lens will work. These poles were generally triggered by the cameras back in the day but the new DSLR's don't have the stuff to control them any more. Make sure the adapter has the inner ring to depress that. The one I linked claims to depress the pin as it should.
Keep in mind that when you use an adapter like this the focus scale on the lens may not be accurate. Since the lens will be mounted at a slightly different flange depth it will not line up as it did on the original camera. As such on your cannon (shorter flange depth) you will get infinity focus a bit before the infinity focus stop, and you will be able to get a bit closer on the other end of the focus range.
Regards
Dave