One Alim in our area has long moustache in the two corners in upper lip and he said he is following the Sunnah of Umar bin Khattab (Radhi Allahu Anhu) who used to pull his moustaches hair near the lips when he was in deep thought of something and from this it is established that Umar (Radhi Allahu Anhu) had hair on both sides of the lips.
A: Haamidaw wa Musalliyaa
It is not permissible to allow the hairs of the moustache to touch the upper lip (the top part of the upper lip).This area should always remain free of any hair touching it. If the hair is to touch this part of the lip, ones moustache will be deemed to be too long and hence, impermissible. Rasulullah Sall-Allahu Alayhi wa Sallam has mentioned that whosoever lengthens his moustache (i.e. allows it to touch the upper lip) will not attain my intercession (on the Day of Judgment).
Lengthening the moustache on the sides without allowing the hair to touch the upper lip as you have mentioned with regards to the practice of Hazrat Umar Radhi Allahu Anhu is acceptable and perhaps even preferred during the days of Jihad.
However, under normal circumstances the more preferred method to adopt is to trim the moustache completely in such a way that the skin beneath the moustache is visible.
And Allah Ta'ala Knows Best
Shafiq Jakhura (Mufti)