Galois rings and generalized Reed-Muller codes