We study the polarization characteristics of x-ray photons scattered by hydrogenic atoms, based on the Dirac equation and second-order perturbation theory. The relativistic states used in calculations are obtained using the finite basis set method and expressed in terms of B-splines and B-polynomials. We derive general analytical expressions for the polarization-dependent total cross sections, which are applicable to any atom and ion, and evaluate them separately for linear and circular polarization of photons. In particular, detailed calculations are performed for the integrated Stokes parameters of the scattered light for hydrogen as well as hydrogenlike neon and argon. Analyzing such integrated Stokes parameters, special attention is given to the electron-photon spin-spin interaction, which mostly stems from the magnetic-dipole contribution of the electron-photon interaction. Subsequently, we find an energy window for the selected targets in which such spin-spin interactions can be probed.