The present invention relates to pyridinylaminopyrimidine derivatives represented by the following formula (I), and pharmaceutically acceptable salts, preparation process and use thereof, wherein R 1 , R 2 , R 3 , R 4 , R 5 , m and A are defined as in the description. Pyridinylaminopyrimidine derivatives of the present invention can selectively inhibit the activity of mutant-type epidermal growth factor receptor (EGFR), have a good inhibition for the cancer cell proliferation, and therefore can be used as a therapeutic agent for treating tumors and relevant diseases.