gdm: sync with upstream