Before you proceed, take a note that CFAR may sometimes prove unstable for Android 6.0.1 Marshmallow. If you are just looking just for root and not a custom recovery, then all you need to do is download the CFAR file from below and flash it via Odin software and add the CFAR into AP. This procedure is simple and will help you root your device with ease. Soon the files may show up for other variants as well.
However, the CF-Root file is available only for the SM-G900M and Korean variants for the Android 6.0.1. All these devices run on the latest TouchWiz firmware and the CF-Auto-Root is one of the safest option available to gain root privilege. Now, Chainfire, the developer who brought root access to Android devices, has stepped into releasing a CFAR root procedure for the Galaxy S5 just like other Samsung devices including the Note 5, the Galaxy S6 (Edge, Plus), Galaxy S7 (Edge) and Note 4 with CF-Auto-Root. The latest ones being the South Asian region, Europe, Korean regions. variants like the Galaxy S5 SM-G900M, SM-G900F and the Korean variants like SM-G900S/L/K are some of the devices running Android M in many regions. The Samsung Galaxy S5 and many of its variants have been receiving the official Android 6.0.1 Marshmallow update.