[userprog] add string validation, stdin processing