The USB Mass Storage Mode mounts the filesystem, and then any software with suitable permissions on the PC can access it. In that respect it is no different from any other filesystem mount. The phone exports the SD as a block device, much like a SD flash reader device would. At least that's how my phone does it. The phone does not have to do anything that interacts directly with userspace code on the PC. It interacts solely with the kernel driver, if the PC is running Linux.