A notorious underworld gunman who exchanged friendly greetings with five inmates in an exercise yard in Victoria's maximum security Barwon Prison was allegedly moments later viciously stabbed and slashed by them.