Porous silicon layers are chemically grafted with trimethylsiloxy groups by exposure to hexamethyldisilazane (HMDSj vapors. After treatment, infrared spectroscopy reveals that part of the initially hydrogenated surface is actually modified. Luminescence of the porous layers appears to be little affected by the treatment. On strongly luminescent samples, the photocarriers exhibit the same infrared absorption as in hydrogenated or oxidized porous silicon, evidencing the similar involvement of localized states in the luminescence process. The treated porous silicon layers also exhibit an increased stability against aging in ambient, as compared to hydrogenated porous silicon. Furthermore, the modification can be removed by simple exposure to H F vapor, thereby restoring the initial hydrogenated surface.