Now details about the role are known, which is said to be a small sequence akin to Daniel Craig's cameo in Star Wars: The Force Awakens.
Making Star Wars offers the following (spoiler warning):
Tom Hardy plays a First Order stormtrooper who sees a glimpse of FN-2187 (Finn) who is on a secret mission. Tom Hardy walks up behind Finn and slaps him on the ass. Finn turns around and thinks he's going to be dead and/or captured, but Tom Hardy is elated to see his old friend from back during their First Order academy days. Hardy then congratulates Finn on being promoted to a Resistance infiltrator and spy. Finn goes about his business to his amazement.
"Star Wars: Episode VIII" has a December 16, 2017 release directed by Rian Johnson starring Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley, John Boyega, Oscar Isaac, Lupita Nyong’o, Domhnall Gleeson, Anthony Daniels, Gwendoline Christie, Andy Serkis, Benicio Del Toro, Laura Dern and Kelly Marie Tran.